{'fraction_non_alphanumeric': 0.030524534686971236, 'fraction_numerical': 0.008934010152284264, 'mean_word_length': 4.446185035016587, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
RadioHound: A Pervasive Sensing Network for Sub-6 GHz Dynamic Spectrum Monitoring

We design a custom spectrum sensing network, called RadioHound, capable of tuning from 25 MHz to 6 GHz, which covers nearly all widely-deployed wireless activity. We describe the system hardware and network infrastructure in detail with a view towards driving the cost, size, and power usage of the sensors as low as possible. The system estimates the spatial variation of radio-frequency power from an unknown random number of sources. System performance is measured by computing the mean square error against a simulated radio-frequency environment. We find that the system performance depends heavily on the deployment density of the sensors. Consequently, we derive an expression for the sensor density as a function of environmental characteristics and confidence in measurement quality.


A. Motivation
Knowledge of radio-frequency (RF) power in time, space, and frequency is valuable with several potential applications. For example, such knowledge can inform spectrum policies and verify claimed spectral utilization. Additionally, it can enable opportunistic spectrum access (OSA) through which a secondary user (SU) accesses the spectrum while the licensed primary user (PU) is not active on the band [1], [2], which helps to improve spectrum utilization [3]- [5]. Finally, knowledge of RF power can enable RSSI (radio signal-strength indicator) localization of transmitters [6], which itself has several potential applications, including the enforcement of spectrum policies.
To obtain information about RF power over time, frequency and space, a sensor network such as shown in Figure 1 is needed. Wide-scale deployment with a large number of sensors is of particular importance for obtaining an accurate representation of activity. For a given cost budget, it may be preferable to deploy a large number of low-performance sensors versus few high-performance sensors; however, quantification of this tradeoff needs study. After describing the RadioHound system, we focus on the study of required sensor density.
The RadioHound system can scan from 25 MHz to 6 GHz, the frequency range which contains the bands of interest for This work was supported in part by the National Science Foundation through grant CNS-1439682 and by the Lab for Telecommunications Sciences. OSA. The sensor network "sniffs" the spectrum for activity and records RF power usage in the form of periodograms tagged with a location and time, all of which is sent to a centralized database for further analysis and application.
In an effort to drive down cost, size, and power consumption of the sensors, we need to assess what aspects of the network are important to maintain quality of the estimated spectral activity. In this paper we focus on sensor density as one aspect that determines cost, and formulate a method to quantify sensor density requirements as a function of environmental characteristics and confidence in measurement quality.

B. Previous Work
Spectrum sensors that cover the desired sub-6 GHz band are commercially available. The less expensive examples include the AD9364 RFIC and HackRF [7], [8]. However, the cost of these sensors is still approximately $200 to $300. Our near-term target is sub-$40, with a long-term goal sub-$10. Our current sensors leverage low-cost, off-the-shelf RTL-SDRs with a custom printed circuit board (PCB) extension hosted by a Raspberry Pi (RP). In order for a spectrum sensor network to be densely deployed, cost should not be a significant obstacle.
The use of a RP in conjunction with an RTL-SDR as a lowcost spectrum sensor has been previously applied. Grönroos et al. found comparable performance between a network of four such sensors and an expensive, professional RF sensor [9]. Additionally, IBM is utilizing the RP and RTL-SDR combination as part of their Internet-of-Things (IoT) project called Blue Horizons [10], in which a user can generate waterfalls of spectrum activity and listen to an FM radio station in the locality of the sensor. The authors in [11] use an RTL-SDR with a smartphone as a platform to investigate the feasibility of temporally monitoring the spectrum and localizing a transmitter based on [12]. Finally, the vendor Adafruit has instructions for developing a personal spectrum scanner from an RTL-SDR and RP [13].
Our work differs in the following respects. First, we have a custom-made front end that attaches to any off-the-shelf lowcost down-converter and digitizer such as the RTL-SDR. We thereby achieve tuning range continuously to 6 GHz. Second, we collect tagged time and location-dependent periodograms, and store them in a centralized server for later retrieval and synthesis. In [9], the authors focus on a the problem of detecting the presence of a transmission. We focus instead on accurate reproduction of spectral activity, independently of the random number of sources present.

C. Contributions
The RadioHound system is described in detail in Section II. We outline the components of the low-cost sensors and discuss the underlying infrastructure to connect the sensors, save data, and interact with users. The deployment of the RadioHound system brings with it several questions on performance. This paper explores the initial results on two related problems.
First, to generate an RF power map, Section III considers two-dimensional interpolation of irregularly-spaced data points. Although the general problem has been explored in, for example, [14]- [17], we must decide how at a given location to condense or fuse the reported periodograms over time and frequency into a single value that bears statistical significance. With this value, we can then apply any of the various methods of interpolation. As we will see, deployment density of the sensors has a significant effect on this interporlation.
Second, Section IV examines the proper deployment density of sensors. We define constraints based on desired qualities of the RF power map and derive an equation for the sensor density using a propagation model and tools from stochastic geometry.

II. RADIOHOUND SYSTEM
The RadioHound (RH) system contains three major components: a set of client sensors, a centralized database/server/controller, and a user interface. The high level interaction among these three components is shown in Figure 2. The user interface requests data for visualization or sends commands to the RH sensors via a server. The client sensors receive commands from or report data to a server. Consequently, the server is essentially a broker managing messages. The server either stores data to or queries data from a database, or the server passes messages between the relevant parties.
We present more details in the following sections for the sensor hardware, the software infrastructure, and the user interface of the RH system.

A. Sensor Design
The sensors consist, in part, of an RTL-SDR hosted by a RP. The RTL-SDR can scan from 25 MHz to 1.750 GHz [18], but we have created a custom front-end circuit that extends the range of the RTL-SDR to 6 GHz. The RP host is a surrogate for a smartphone as the eventual host, and the RTL-SDR is a surrogate for a simple downconverter and digitizer that will eventually supplant. Figure 3 shows a block diagram of the RadioHound sensor hardware. The RP provides the interface to the controller, conducts sampling and on-node processing, and pushes samples to the database for visualization and further processing. The RTL-SDR acts as a fixed IF analog-to-digital converter and is capable of capturing 2 MHz of bandwidth with 8bits of resolution. The custom RF front-end provides the tunable radio interface using a Hartley image-reject downconversion stage to the IF. To support a variety of lowcost downconverters-digitizers (of which the RTL-SDR is an example) we selected a fixed IF of 110 MHz. The RF front-end provides wideband and high-speed tuning, down-conversion to the fixed IF, and variable amplification for increased dynamic range. In particular the custom RF front-end: 1) Expands the tunable range to cover the 25 MHz to 6 GHz band and adds provisions for future millimeterwave front-end modules covering the anticipated 5G bands up to 90 GHz.  band without resorting to very large antennas. For example, the 25 − 100 MHz band can use a ferrite-loaded coil antenna, and the 0.4 − 6 GHz band might employ printed spiral antennas. Figure 4 shows the prototype RadioHound sensor based on commercially available RFIC evaluation boards. The prototype is currently being integrated onto a single PCB with overall dimensions of 65 cm×56.5 cm, matching the RP and mounting holes placed for direct installation on top of the RP board.
The final design of the sensor will incorporate the entire RF chain on the PCB board, eliminating the need for the RTL-SDR. The final cost of a sensor will be sub $10 and will have the flexibility to run from a variety of hosts, including laptops, RPs, and smartphones.
The sensor in its current version consumes over 3 Watts. The next version reduces the power consumption by half. In order to maintain 24-hour battery life with a smartphone host, the final version should consume less than 0.5 Watts.
We use low-cost components to implement the front-end. This results in many imperfections affecting the received signal such as LO drift, amplifier non-linearities, and IQ imbalance which reduces rejection of image signals. However, we postulate that such hardware imperfections will not significantly limit our system as we are interested in power measurements and not the demodulation of the data. A system with many scattered sensors allows fusion and compensation of the impaired measurements of any individual sensor. This idea of crowd sourcing RF measurements from a low-cost front-end is not new [19], but further investigation is needed to quantify the performance of such a system.
B. Software Infrastructure Figure 5 presents a high level overview of the RadioHound software infrastructure which can be subdivided into three primary components: control (management), sensing (Radio-Hound nodes), and the data back-end (storage, querying, visualization). Figure 6 breaks down the control and sensing aspects of RadioHound in further detail.
Each RadioHound node runs a local software loop responsible for processing jobs as given by the Master Controller. A job is nominally a request for scanning across a particular frequency range along with the requisite settings for conducting the scan as well as intermediate processing. The local software loop takes commands via an MQTT client that attempts to maintain a persistent TCP connection with the MQTT server running at the Control server. MQTT is used because it is a simple publish / subscribe protocol with human readable strings and numerous open-source implementations that is frequently used for IoT systems .
A localized broker running at the client accepts the MQTT commands and distributes the commands to a localized pro-cessing loop of C code and Python code using ZMQ (Zero Message Queueing) as a connector. Native C code is used for interacting with the RTL-SDR device (and accompanying Ra-dioHound hardware). Python processing is used for conversion of the raw data into a periodogram via the Welch method [20]. The periodogram is then conveyed via an HTTP POST to the Check-In server as a JSON.
The Check-In server (realized via Django) is responsible for maintaining a connection to the Data Warehouse (storage) for storing the information in the Postgres database. Postgres was selected for scaling purposes due to the potential for extremely large numbers of data records. The Data Warehouse also serves as a data visualization front-end which provides data both through a web interface as well as data directly for download via an HTTP REST interface. A stand-alone GUI for visualization has also been developed that leverages the REST interface.

C. User Interface
The user interface acts as a means of controlling sensors and various pieces of the RadioHound system functionality. Additionally, the user interface acts as the means by which a person can visualize the collected data. Given that RF power varies in time, frequency, and space, three key visualizations of the data are of interest. First, a waterfall diagram demonstrates the variability of RF power over time for a fixed frequency range and location. Second, a periodogram demonstrates variation in frequency for a fixed time and location. Finally, an RF power map enables a user to see variation over space for a fixed frequency and time range. All three visualizations will be available from the user interface, but our focus for this paper will be on the RF power map.

III. RF POWER MAP
One capability of the RadioHound system is estimating RF power as a function of space based on sensor measurements. A user can clearly visualize the spatial variability of spectrum utilization via an RF power map. Consequently, we evaluate the system performance by generating RF power maps through a simulated RF environment in which the true RF power is known. We then determine the mean square error (MSE) of the RF power maps measured across a rectangular mesh grid.

A. Current Method
First, we discuss our current method of estimating the RF power as a function of location, which we achieve through interpolation. In general, we need triples (x, y, z) in order to generate a surface. The x and y coordinates are the longitude and latitude, respectively. The z value needs to be a statistically significant value relating to the power measured at that location over the specified frequency and time range. Currently, we integrate each of the collected periodograms over the specified frequency range and compute the average value across periodograms. We discuss this issue more in Section V-B. As we mentioned previously, numerous methods of interpolation of irregularly-spaced data exist. Currently, we implement a simple planar interpolation that we briefly describe here.
First, a two-dimensional Delaunay triangulation is performed on the (x, y)-coordinates of the data [21]. See Figure 7 as an example that we will expand upon. The result is a partitioning of the plane into triangular regions with data points as the vertices of each triangle. For each triangular partition, we calculate the planar equation f (x, y) = ax + by + c that passes through the data points at the vertices. Consequently, we have a piecewise continuous function f (x, y) from which we can generate interpolated values. Note that we perform planar interpolation on the dBm values of z in order to better approximate the polynomial nature of path loss.

B. RF Environment Simulation
Now we describe the simulation of the RF environment, which is based in part on stochastic geometry. We present more details of stochastic geometry in Section IV, but here it suffices to say that a homogeneous Poisson point process (PPP) for a specified region has a Poisson random number of points that are independently, uniformly distributed over the region [22].
First, we choose a 1 km 2 square region and simulate the location of the sources as a two-dimensional, homogeneous PPP with intensity λ T = 3 sources/km 2 , which means we have an average of three sources per square km. We assume that each source transmits isotropically with a power of 30 dBm on the same frequency.
To simulate the value of the RF power everywhere, we use the path loss law (r) = Kr −α with α = 3 and K set according to the example in Section IV-C. We do not simulate shadowing or fading here.
Next, we simulate the locations of the sensors as another homogeneous PPP with intensity λ S . For each point, we use the path loss model to calculate the sum power from the sources that is measured by the sensor. From these measurements, we interpolate a fine mesh grid of values using the method described above.
We look at two cases: λ S = 94 and λ S = 313 sensors/km 2 . (These values correspond to a 50% and 90% confidence, respectively, that we will calculate in Section IV.) The results are in Figure 8, and the true RF power map is given in Figure 8c.
The measured MSE between the results in Figures 8a and 8c is 6.99, while the MSE between the results in Figures 8b and 8c is 2.40. Thus, increasing the sensor density by approximately a factor of 3 reduced the MSE by approximately a factor of 3.

IV. DEPLOYMENT DENSITY
From the previous section, we see that sensor density greatly impacts the quality of the RF power interpolation across space. Consequently, we would like to explicitly relate sensor density with a confidence in the quality of the RF power map.
In general, the problem of determining a proper sensor density for a "good" RF power map is ill-posed. As a result, we place a spatial constraint on problem informed by our current interpolation method. Since the interpolation values can never be larger than the maximum value of the sampled data, we need at least one sensor to be geographically close to each source.
If a sensor is not close enough to a given source, the source is essentially invisible on the planar-interpolated RF power map. On the other hand, one well-placed sensor can detect the power of two or more proximate sources for an RF power map, though a spatial resolution problem results. In other words, if one sensor is between two nearby sources, the RF power map will appear to have one large source. To ensure proper localization of sources without resolution problems requires a higher density of sensors. If we limit our goal to finding opportunities for spatial reuse of the spectrum, we only need a general idea of the location of the RF source(s) without necessarily needing to resolve the location of each antenna. This will allow for a lower density of sensors. Consequently, for the sake of obtaining an estimate of sensor density, we argue for at least one sensor to be geographically close to each source, though one sensor can cover multiple sources.

A. Spatial Constraint
We enforce the constraint that a sensor should, with high probability, be within a radius r of any source, or else the source will not be detected by any sensor. We assume the source locations are unknown and random and therefore model the locations as a stochastic point process. Similarly, since the deployment of sensors will be based on an uncoordinated crowd of volunteers, we cannot influence their locations, even though we assume we know them. Consequently, we also model the sensor locations as a stochastic point process. In particular, since the Poisson point process (PPP) models the independent random movement of mobile users and the (a) Sensor density λ S = 94 sensors/km 2 (or β = 0.5 in (8)).
(c) True RF power map.    deployment of base-stations fairly well [22], we will model the irregularly spaced sources and sensors as PPPs.
We anticipate that in reality, both sensors and sources will form cluster point processes since people tend to congregate in some desirable areas while avoiding other areas, such as lakes, canyons, or "bad" parts of town. The results based on the PPP will offer us the density, on average, that we will need.
We use the notation found in [22]. Let Φ T , Φ S ⊂ R 2 be independent, homogeneous PPPs with intensities λ T and λ S , respectively. Φ T and Φ S represent the locations of the sources (transmitters) and sensors, respectively.
Naturally, we would like to draw disks around the sources and determine the probability that at least one sensor falls within each disk. However, it is instructive to reverse the roles of the sensors and sources to cast a coverage problem. After all, if a sensor is within the disk of a source, that source also falls within a disk of the same radius around the sensor. See Figure 9. Now our desired result is to have all sources fall within the union of disks around the sensors.
Mathematically, let be the union of the disks with radius r centered around the points of Φ S . Since the regions (the grains) surrounding the point process are independent and identically distributed (IID) and the points in Φ (the germs) form a uniform PPP, Ξ is a Boolean model [22,Def. 13.4], which is a sub-class of germgrain models. Next, we want to know the necessary density of sensors for a given probability that an arbitrary source will be covered by the sensors. More explicitly, let E be the event that an arbitrary point in Φ T is within the coverage region of the sensors: E = {x ∈ Φ T : x ∈ Ξ}. We want to find P(E) = g(λ S ) > β, where g is some function, and solve for λ S in terms of β.
Fortunately, there is a useful theorem regarding coverage and vacancy in Boolean models that will make our calculation relatively straightforward. Specifically, for a Boolean model with a PPP of intensity λ and IID grains S, the probability that a location is not covered is exp(−λE|S|) [22,Th. 13.5]. This is also the fraction of a region not occupied by the union.
Applying this theorem yields Solving for λ S in the inequality P(E) > β gives us The choice of r remains. We next translate the spatial requirement of r into a relative power requirement.

B. Relative Power Constraint
The spatial constraint translates into a power constraint when an RF propagation model is considered. For a sensor to have a specified receive power relative to the source power, the sensor must lie within some region near the source. The size and shape of this region depends on the path loss, fading, and shadowing. If we denote the sensor received power as P R and the source transmit power as P T , we state this constraint as (P R /P T ) dB ≥ −A dB.
Here we make the following simplifying assumptions about the propagation environment. We will only consider path loss and shadowing while ignoring fading for ease of exposition and a first-order estimate. Additionally, we assume that the sources and sensors have omni-directional antennas. Finally, we assume that all sources transmit with high enough power such that -A dB below the source power is above the receiver sensitivity of the sensor.
Next, let (r) be the path loss function, where r is the distance between a sensor and a source, i.e. r = x i − y j where x i ∈ Φ T and y j ∈ Φ S . In general, many path loss functions exist [22], [23], and (r) can be changed as desired. We define (r) Kr −α for this exposition, where K is a constant based on antenna characteristics and frequency, and α is the path loss exponent with a value usually between 2 and 4.
To model the effects of shadowing, we let Z i be IID lognormal random variables with parameters µ and σ. We can model the received power at sensor i as P R = P T (r i )/Z i . In decibels, P R,dB = P T,dB + 10 log 10 K − 10α log 10 r − Z i,dB , where Z i,dB has a Gaussian distribution N (µ, σ 2 ) [23].
With this function, we can determine a spatial requirement for the locations of the sensors relative to the sources, keeping in mind that the sources transmit isotropically. In general, if we want a sensor within −A dB of the peak power of a source, then we have −A = 10 log 10 P R P T = 10 log 10 (r i )/Z i . Solving for r i for our particular path loss function gives Hence, a sensor must be within a random distance R i of the source. If we consider this requirement in two-dimensional space, the sensor must consequently lie within some region S, which has a random shape since shadowing is direction dependent.
From the theorem cited in the previous section, we will only be concerned with the average area of the S. This will help us make some simplifications. First, let us consider the two dimensional space in polar coordinates. We know the radius is a function of the angle θ due to shadowing. Let us divide the region into sectors by dividing 2π into n equal sectors. Next, let us determine the average radius R j for each sector j. The area of S becomes |S| = n j=1 πR 2 j n . To determine the average area of S, we have where the last equality follows from Z j being IID. The result in (4) shows that the average area does not depend on n. As a result, we can simplify the problem to be a sensor falling within a random radius R i of the source.
We will again use the germ-grain model, where now is the union of the disks with IID random radius R i centered around the points of Φ S . Again, the regions surrounding the point process are IID, so Ξ is a Boolean model for which we can apply the previously mentioned theorem. For this case, from (4) we have where ζ = ln 10/10 is a scaling factor due to the base 10 of the logarithm. Substituting (6) into (2) results in Again, solving for λ S in the inequality P(E) > β yields . (8)

C. Example
As an example, we consider the case in which we use the path loss law (r) = Kr −α . We select K = c 4πf r0 2 r α 0 , where f is the signal frequency and r 0 is a reference distance that we set to c/2f m, corresponding to the far-field distance of a half-wavelength dipole antenna [24]. This K corresponds to a free-space path loss [23]. For this example, we choose A to be a -90 dB difference, and the parameters µ = 0 and  10. Sensor density as a function of the probability (β) that an arbitrary source is within radius R i of any sensor at a 1 GHz frequency. Given by (8). σ = 4 which corresponds to an outdoor setting [23], [25]. Plotting (8) as a function of β for a frequency of f = 1 GHz gives us Figure 10. Similarly, plotting (8) as a function of frequency f for β = 0.95 gives us Figure 11. As a practical example, let us consider deploying Radio-Hound sensors across South Bend, IN, which has an area of 41.88 square miles (108.47 km 2 ). Assuming the city experiences a path loss of approximately α = 3, we see from Figure 10 that to have a 90% confidence that we have sufficiently detected each source, we would need about 300 sensors/km 2 . Consequently, we would need on the order of 30,000 RadioHound sensors to have a 90% confidence that the sources in South Bend are sufficiently detected.

A. Deployment Density
To further refine the estimate of sensor density, we can consider the effects of fading, which we expect will increase the required density. Fading can be treated by having the radius of coverage be a random process of the angle (with some smoothness conditions). To make the problem more tractable, we can make use of our former strategy by dividing the coverage region into sectors and calculating the average radius for that sector. From there, we can calculate the average coverage area and apply the Boolean model. Additionally, we may consider different regimes of operation for our system. In particular, we may consider the case of unique coverage in which a sensor covers a source uniquely and leverage the results of [26]. This would tell us how much higher the sensor density would need to be in order to resolve the locations of closely-spaced sources.
On the other hand, we may consider the density needed to form a percolation with high probability [22,Ch. 9]. In this regime, we have a lower sensor density but form a giant connected component of coverage. The benefit of such a large component of coverage is that a traveling source would not be able to evade detection when traveling from north to south or from east to west across the region.

B. RF Power Map
One open question surrounding the RF power map is how to obtain the z value for the triples used to generate the map. On one front, we need to determine the relevant value to compute from a single recorded periodogram. Currently, we integrate the periodogram over the specified frequency range to obtain a power measurement. Nonetheless, another choice may be to use the mean, median, or maximum value of the periodogram within the frequency range, which would enable comparison across different bandwidths of specified frequencies. It is not immediately clear which option should be implemented. On a second front, it is possible that multiple measurements exist for a given location and time range. Consequently, we must fuse multiple records into a single value. Once again, we could take the average, maximum, or median value, each with potential benefits and drawbacks.
Next, we can improve the interpolation method used to generate the RF power maps. One of the problems with planar interpolation is that the interpolation values can never be larger than the maximum value of the sampled data. In other words, max f (x, y) ≤ max z, which is inconsistent with standard path-loss models, for example.
To overcome this drawback, we could use radial basis functions to model the sources and perform interpolation via a feed-forward neural network such as that used in [27]. The problem then becomes where to place the sources.
We propose using an iterative method to help place the sources until the resulting interpolant converges and describes the sampled data well enough according to some threshold on the MSE. The first iteration could be planar interpolation to help determine where radial basis functions should be placed initially. Then several iterations of the neural network could be performed to adjust the locations and/or number of sources until convergence is achieved. The drawback to such an approach is the computational complexity and the amount of time required to generate an RF power map. A potential benefit is that we may not need as high of a deployment density of sensors since the interpolation method could infer the presence of a far-away source by placing a radial basis function in the corresponding location.