Optimization of sensor deployment for acoustic detection and localization in terrestrial environments

The rapid evolution in miniaturization, power efficiency and affordability of acoustic sensors, combined with new innovations in smart capability, are vastly expanding opportunities in ground‐level monitoring for wildlife conservation at a regional scale using massive sensor grids. Optimal placement of environmental sensors and probabilistic localization of sources have previously been considered only in theory, and not tested for terrestrial acoustic sensors. Conservation applications conventionally model detection as a function of distance. We developed probabilistic algorithms for near‐optimal placement of sensors, and for localization of the sound source as a function of spatial variation in sound pressure. We employed a principled‐GIS tool for mapping soundscapes to test the methods on a tropical‐forest case study using gunshot sensors. On hilly terrain, near‐optimal placement halved the required number of sensors compared to a square grid. A test deployment of acoustic devices matched the predicted success in detecting gunshots, and traced them to their local area. The methods are applicable to a broad range of target sounds. They require only an empirical estimate of sound‐detection probability in response to noise level, and a soundscape simulated from a topographic habitat map. These methods allow conservation biologists to plan cost‐effective deployments for measuring target sounds, and to evaluate the impacts of sub‐optimal sensor placements imposed by access or cost constraints, or multipurpose uses.


Introduction
Emerging technologies for small, low-cost, power-efficient and smart monitoring devices are rapidly changing the scope of possibilities for monitoring cryptic human exploitation activities as well as biodiversity (Pimm et al. 2015;Cressey 2017;Kwok 2017;Berger-Tal and Lahoz-Monfort 2018). Sizes and costs of acoustic monitoring devices have reduced 20-fold in the last 2 years with the emergence of fit-for-purpose and customizable alternatives to commercial options (Browning et al. 2017;Whytock and Christie 2017;Wrege et al. 2017), and collective purchasing schemes (Wheat et al. 2013). The development of smart acoustic devices that store information only in the event of a target sound triggering the device has the potential to vastly increase the autonomy of devices. This has particular relevance to monitoring in tropical forests, which often have difficult access. For example, the AudioMoth acoustic sensor is programmable with classification algorithms that trigger event logging (Hill et al. 2018). This open-source smart device combines low-energy acoustic detection with small size (58 9 48 9 4 mm, 10 g without batteries) and low cost (US$50 per unit). Price is minimized by collective purchasing (GroupGets 2017). The combination of these attributes has the potential to revolutionize acoustic monitoring by making it affordable and logistically feasible to flood large areas of inhospitable ecosystems with sensors.
Given the new possibilities for grid deployments using numerous acoustic devices to monitor a large contiguous area, the question arises as to where best to place them to maximize the chance of detecting rare events, such as gunshots, chainsaws or animal calls. Optimal placement will depend on a complex combination of topography, vegetation and weather, as well as the acoustic characteristics of the target sound, the number of devices available for deployment and their detection capability. Sensor placement problems of this type have previously been studied theoretically and they typically involve utility functions (in this case the probability of detecting a rare sound) that exhibit diminishing returns with increasing numbers of deployed sensors (Krause et al. 2008a). Technically, this property is known as submodularity, and it allows efficient optimization using a greedy-heuristic algorithm. This algorithm places the first device at the location that maximizes the probability of detection, and then the second device at the next location to maximize the probability of detection given the location of the first. It continues through to placement of all available devices, or to attainment of a desired overall probability of detection. Sensor placements that result from this greedy heuristic are provably close to optimal placement (Krause et al. 2008a). They have been shown to out-perform more computationally expensive alternatives in a number of challenging problems, including detecting contaminated water in a large water distribution network (Krause et al. 2008b). To date, however, such probabilistic approaches have not progressed beyond theoretical studies; they have neither been tested with field deployment of sensors, nor applied to acoustic sensors. Indeed, simulation tools capable of modelling the spread of sound across topographically complex landscapes have only recently become widely available for generic applications ).
Here we develop probabilistic methods for determining near-optimal placement of acoustic devices for monitoring wildlife resources, and for localization of sound sources. We describe a case study of a deployment of AudioMoth devices (Hill et al. 2018) in Tapir Mountain Nature Reserve, Belize (TMNR, 17°07 0 N, 88°54 0 W). TMNR is a 25-km 2 area of mature tropical moist forest on undulating topography of 100-400 m elevation (Fig. 1), which suffers from illegal hunting. To our knowledge, this is the first field test of optimization theory and first deployment for a terrestrial application.
We started by developing the probabilistic theory for optimization of device placement and localization of detected gunshots. The Methods section describes the design of data collection in the field for calibrating and testing the procedure. The Results section gives the prediction for near-optimal number and placement of devices, and analyses its sensitivities. The results of field deployment and testing demonstrate the sensitivities of the gunshot localization procedure.

Theory of detector placement and gunshot localization
Greedy heuristic for near-optimal placement of detectors We consider a landscape with a set of possible gunshot locations, G, and a set of possible detector locations, D. We assume that the probability of a gunshot occurring at any location i 2 G is given by P i G normalized such that P i2G P i G ¼ 1. This probability will typically be the same for all locations such that P i G ¼ 1= G j j. We have an acoustic propagation model that predicts the sound pressure level when a gunshot occurs at location i 2 G and is received at detector location j 2 D. This sound pressure level is given by SPL i,j .
The effectiveness of the acoustic sensor device is assumed to depend on the sound pressure level received at the detector location. The probability of a device actually detecting a gunshot of given received sound pressure level is described by function g, such that the probability of the detector location j 2 D detecting the gunshot that occurs at location i 2 G is given by P i;j Á . This function may take any form, such as a step or a logistic, illustrated in Figure 2A.
The probability of detecting a gunshot that occurs at any location in G when a single device is deployed at location j is given by: The probability of detecting a gunshot that occurs at any location in G, when N j j devices are deployed at the set of locations N ; is given by: Note that Equation (2) expresses the probability of at least one device detecting the gunshot, and that this probability equals one minus the probability of all devices failing to detect it. Equation (2) further assumes independent detection by each sensor. Although beyond the scope of this paper, it would be straightforward to relax this constraint. The expression reduces to Equation (1) when N j j = 1. Given the model above, our aim is to deploy N j j devices to maximize P N D . When N j j = 1 this is easily done by choosing the single location, j 2 D, that maximizes P j D . This case permits an optimal algorithm. When N j j > 1, the problem is combinatorial in that we must choose N j j locations from a possible D j j locations. Large landscapes preclude an optimal algorithm. We can note, however, that this optimization problem is submodular (Nemhauser et al. 1978). A real-valued function F defined on subsets A and B of a finite set V is called submodular if for all A B V and for all s 2 V, it holds that Submodularity reflects the property that adding another member s to the smaller subset A has greater impact on F than adding it to the larger subset B. Submodularity often occurs in problems involving sensor coverage, due to the form of for N 1 N 2 D, s 2 D and s 6 2 N 1 ; s 6 2 N 2 . It results in a proof that solving the optimization problem using a greedy heuristic achieves at least a proportion 1 -1/ e % 63% of the optimal solution (Krause et al. 2008a). Experimental tests in silico support the greedy heuristic as providing near-optimal solutions for a range of real-world competitive sensor placement challenges (Krause et al. 2008a,b). The greedy heuristic in our setting takes the following form as an algorithm: ALGORITHM 1 Greedy placement of devices Data : P i G and P i;j D for i 2 G and j 2 D Result : Set of device locations N N ; Algorithm 1 allocates the first of N devices optimally, and then greedily places subsequent devices. At each iteration, it finds the optimal location to add one additional device given the locations of the devices that have already been placed. The algorithm has complexity Þwhen directly implemented. This can be improved by a factor of N by caching the values of Q j2N 1 À P i;j D at each iteration. Algorithm 1 can accommodate a number of simple extensions. For example, the expected distribution of the gunshots need not be uniform over the set G of all possible locations. Rather, it could reflect a reality of gunshots having higher likelihood at some locations than others. The only requirement is that the distribution is appropriately normalized such that P i2G P i G ¼ 1. Similarly, the stopping condition of the greedy-heuristic algorithm need not be based on a predetermined number of devices. The algorithm can be stopped when the marginal decrease in detection-failure probability from an additional sensor does not suffice to warrant its extra cost.

Gunshot localization
Given a record of gunshot detections, it is possible to calculate the most likely source of the gunshot. Consider the case that a subset of the deployed sensor devices at locations N D 2 N detects a gunshot within some time period, while the others at locations N n N D fail to do so. The likelihood that this set of observations resulted from a gunshot at location i 2 G is given by: The posterior probability that the gunshot occurred at location i is thus given by Bayes' theorem: This describes a normalized discrete probability distribution over all possible gunshot locations such that P i2G P 0i G ¼ 1.
If more than one sensor detects the gunshot and we have access to the time that each detection occurred, we can extend the analysis to further refine this distribution. Consider that the gunshot actually occurred at unknown time t G at location s 2 G. Each sensor at location j 2 N D will detect the gunshot at a later time t j D due to the propagation of the sound from the source of the gunshot to the location of the sensor. This detection time is given by: where c air is the speed of sound in air, d s,j is the distance between gunshot location s and sensor location j and j is a random variable that represents noise in this observation. This noise results from two sources: (i) the drift of the real-time clock within the sensor and (ii) uncertainty in the exact propagation path and speed of the sound. Both sources of noise can be addressed through the same formalism by imposing an arbitrary order over all sensor locations j 2 N D such that the noise can be considered to have been drawn from a multivariate Gaussian distribution given by: where Σ defines an jN D j Â jN D j covariance matrix. Now, for any individual possible gunshot location i 2 G, we can impose the same order as above to define a vector of times, t i , whose elements are given by: It only remains to choose the appropriate noise model and define Σ accordingly. In the case of noise resulting from drift of the real-time clock within each sensor, the noise is independent between sensors and Σ is a diagonal matrix given by: where r 2 drift is a variance describing the typical accuracy of the real-time clock. Note that in this case, the covariance matrix is identical for all possible gunshot locations i 2 G.
In the case of additional noise due to uncertainty in the exact propagation path and speed of the sound, we consider an additional term given by: which is proportional to the distance between gunshot location i and sensor location j. This noise is not independent between sensors. Two sensors that are close together will likely be similarly affected by the same propagation uncertainties; those that are far apart will not. Thus, we define the correlation between the noise at sensor locations j and k as cor i j;k such that each element of the covariance matrix is now given by: where the correlation function expresses the fact that sensor locations close together are more correlated than those that are further apart, and is given by: Finally, the likelihood that the observed time differences, t i , were generated by a gunshot occurring at location i 2 G is given by: where we maximize over the unknown time at which the actual gunshot occurred, and where q(t i ; 0, Σ i ) is the standard multivariate Gaussian density function: Combining this result with that of Equation 3, and again using Bayes' theorem, gives the posterior probability that the gunshot occurred at location i as: Note that the values of r 2 drift and r 2 prop determine the balance of evidence between the probability of detection and the timings of the detections. Reducing the drift of the real-time clocks within the sensors, or deploying an external time signal that can be used to re-synchronized them, will reduce the value of r 2 drift improving the accuracy of the estimate of the source of the gunshot. Similarly, we would expect more homogenous deployment environments to exhibit smaller values of r 2 prop .

Characterization of detection probability
AudioMoth sensors were prepared for deployment by programming the on-board software with a classification algorithm to record an event upon each detection of a gunshot (Hill et al. 2018; P., Prince, A.P. Hill, E. Piña-Covarrubias, C.P. Doncaster, J.L. Snaddon, A. Rogers, in submission). Field tests at the deployment site characterized the decay in detection probability with diminishing sound pressure level (SPL) in decibels (dB) away from a gunshot. The field tests used three independent transects in April 2018 in forest contiguous with TMNR ( Fig. S1). At each transect, four AudioMoths were placed at one end with a SPL meter (Peaktech 8005). A 12-gauge shotgun (Baikal MP-18EM-M) was fired in a perpendicular orientation to the devices at approximately 200-m intervals along each transect, up to a distance of about 1 km from the devices. This procedure was repeated in daylight and nocturnal conditions. A total of 57 records of gunshot detection success/ failure were obtained with associated SPL of the gunshot and ambient noise at the device, in A-weighted decibels (Data S1). A logistic model was fitted to the data on gunshot noise above ambient, shown in Figure 2B. Its parameter estimates defined the form of the function g underpinning the greedy-heuristic algorithm.

Characterization of sound spread
For the characteristic loudness of a gunshot at source, we used data from 167 replicate outdoor shots given in Murphy and Tubbs (2007) for a 12-gauge shotgun (Remington model 11-87). They obtained an average SPL of 132.6 dB at 1 m from the gun, in the 1250-Hz one-third octave bandwidth. This frequency is closest to the centre of the 400-2000 Hz bandwidth detected by the AudioMoth sensor.
In order to characterize the spread of gunshot sound from a gun that might be fired anywhere within the boundary of TMNR, we simulated a grid of gunshots at 200-m intervals covering the entire reserve. This was done with the SPreAD-GIS tool contained in the Sound Mapping Tools package  and implemented in ArcGIS. SPreAD-GIS modelled sound spread in a raster stack of 829 gunshots, using 133 dB for the SPL at source. The simulation assumed a background ambient noise of 45 dB, based on empirical nocturnal measures within TMNR taken from the transects. Most background noise was attributable to orthopterans. It also assumed an average nocturnal temperature of 25°C, humidity of 60% and wind speed of 5 km/hr from due East, based on yearly average meteorological conditions at the nearest weather centre, 70-km to the SE in the city of Dangriga (National Meteorological Service of Belize 2016). For each gunshot, the simulation produces a raster map of sound spread from the source under the given weather conditions, for a vegetation of hardwood or deciduous forest covering a topography given by an elevation map of TMNR (Technology Transformation Service 2016). In the homogeneous forest of TMNR, sound spread depends most sensitively on topography and wind speed and direction (Fig. S2).
To test the sensitivity of predictions to SPreAD-GIS input parameters, further runs replicated all its input parameter values, except (1) changing the gunshot grid from 200 m to 150 m; or (2) changing wind speed from 5 km h À1 to 0 km h À1 ; or (3) changing the generic 'seasonal condition' parameter from 'clear, calm summer night' to 'clear, windy summer night'.

Simulation of gunshot detection probability with distance
The logistic model shown in Figure 2B was applied to the raster stack of 829 simulated gunshots across TMNR to translate its soundscape into a detection probability landscape. The predicted distribution of SPL in decibels as a function of distance from source, collated across all gunshots, converts to a distribution of detection probabilities that is conditional on topography, and reflects local weather and vegetation ( Fig. 3; example of a contributing gunshot in Fig. S3). The probability distribution predicts that detection within TMNR is frequently possible up to 500 m distance from a gun, but much rarer above 1000 m. This distribution aligned with our wider experience of testing gunshot detectability in the forest habitat of this region (Fig. S4).
The greedy-heuristic algorithm derived above was applied to the detection probability landscape. This was done in the R environment (R Core Team 2017) using the script listed in Data S2. The algorithm calculates the number and location of devices for near-optimal placement, given a logistic function for detection probability and a gunshot soundscape. It assumes equal probability of gunshots occurring anywhere within TMNR. It places devices only within the boundary of TMNR, which is also the boundary of the gunshot grid that generates the soundscape. The algorithm ceases to add more devices when the marginal decrease in detection-failure probability from an additional sensor becomes less than 0.001.

Test deployment and localization of gunshots
A total of 10 AudioMoth devices were deployed in the NE sector of TMNR in April 2018, at all near-optimal locations in that sector predicted by the greedy-heuristic algorithm. The hilly terrain and hurricane-damaged forest impeded access to the extent that some devices could only be placed to within 100 m of the target location. The efficiency of the deployment was tested by firing nine gunshots within the sector. The 12-gauge shotgun was oriented in a range of directions over the nine shots, under clear and calm daytime weather conditions with ambient noise levels varying between 33 and 52 dB (median 36 dB). Deployed AudioMoths logged events only to the nearest second. We therefore tested the accuracy of gunshot localization based on actual detection successes/ failures and the detection time-lags between devices imputed from knowledge of actual gunshot locations.

Placement of devices
The greedy-heuristic algorithm predicted a requirement for 79 devices within TMNR when applied to the soundscape from 829 gunshots on a 200-m grid (Fig. 4A). The near-optimal placements were distributed throughout the reserve, mostly on local high ground or slopes overlooking valleys (Fig. 4B). The actual deployment of 10 devices targeted the 10 placements in the north-easternmost corner of TMNR (ringed in Fig. 4B).
Further simulations with a finer-scale grid of 1486 gunshots at 150-m intervals across TMNR produced the same predicted number of devices and similar ordering, but took 79 hrs to create the raster stack in SPreAD-GIS compared to 44 h for the 200-m grid, on a PC with 12 Gb RAM and 3.20 GHz processor. Differences in predicted locations were deemed insufficient to warrant the extra time requirement.
The near-optimal placement of 79 devices across the full extent of TMNR was predicted to achieve a residual detection-failure probability of 0.013 (Fig. 5A, right-most end of blue trace). In effect, this deployment would miss less than 2% of any gunshots fired anywhere within Figure 4. Near-optimal placement of AudioMoths within TMNR predicted by the greedy-heuristic algorithm, given function g (Fig. 2B) and a gunshot soundscape (Fig. 3A) TMNR. Even in the event of all the five highest ranking devices failing, the probability would rise only to 0.025, with lower-ranked devices tending to compensate for failed neighbours. In putative alternative placements of 79 devices across the full extent of TMNR, residual detection-failure probabilities rose to a predicted 0.110 for regular spacing on a 600-m grid, and 0.171 for random spacing (Figs S5 and S6). Detection-failure probabilities no greater than these magnitudes were achieved with near-optimal placements of only 40 and 32 devices respectively. The near-optimal placements can therefore halve the number of devices required to achieve a given detection efficiency for a deployment. These savings are robust to the threshold level of detection efficiency. Thus the residual detection-failure probability of 0.013 that requires 79 near-optimal placements would need 143 regular placements (on a 450-m grid). For a more relaxed threshold or more limited availability of devices, regular placements of 50 devices within TMNR (on a 750-m grid) would achieve a residual detection-failure probability of 0.237, which is just bettered by near-optimal placement of only 26 devices.
In the absence of wind, only 46 devices were required to achieve a predicted detection-failure probability of 0.013. Using the SPreAD-GIS simulation of seasonally windy instead of calm conditions, and 5 km h À1 wind, near-optimal placement required 90 devices to achieve a residual detection-failure probability of 0.017. The larger number of devices reflects the noisier background induced by wind. Under these conditions, the placement of 79 devices that was near-optimal for seasonally calm conditions would achieve a residual detection-failure probability of 0.04 (Fig. S7). The difference in detection probability is negligible for the first 30 devices, which tend to get placed at, or close to, the same locations for both conditions.
The actual deployment of 10 devices in the NE sector of TMNR had a predicted residual detection-failure probability of 0.874 for gunshots occurring all across TMNR (Fig. 5A, right-most magenta dot). This probability would have dropped to 0.858 if we had managed to place the devices precisely at predicted near-optimal locations, instead of 3 to 100 m distant (Fig. 5A, inset map). The detection-failure probability diminishes to 0.045 for gunshots occurring only in the NE sector (Fig. 5B, right-most magenta dot). It would have dropped to 0.001 if we had placed 16 devices precisely at predicted near-optimal locations for gunshots only in this NE sector (Fig. 5B, rightmost end of blue trace), instead of 2 to 453 m distant from these placements (Fig. 5B, inset map).

Detection and localization of gunshots
Of the nine trial gunshots in the NE sector, all triggered at least one of the 10 deployed AudioMoths, with four shots triggering two devices and one shot triggering three devices (Fig. 6A). The number of detecting devices had no apparent relation to ambient sound level. Regardless of gun orientation, gunshots tended to trigger the closest AudioMoth(s), at distances of 168 to 370 m, except for gunshot #9 which triggered a device at 872 m (Fig. 6A). Each detected gunshot could be located to the Dirichlet tile(s) of its detecting AudioMoth(s), on the assumption that no other devices lay closer to the gunshot (Fig. 6A). This held true for most trial gunshots; however, potential for error is illustrated by the northernmost AudioMoth, which detected gunshot #9 from further away than four other devices, only one of which also detected the gunshot.
The accuracy of gunshot localization by the probabilistic method depended on the number of detecting devices and the availability of time-lag data. For example, if the northernmost device had detected gunshot #9 later than the only other detecting device by 1.457 s, this would indicate that the gunshot occurred 506 m further from the northernmost device than from the other device, assuming unimpeded sound travel at 347.3 m s À1 through air at 25°C and 60% humidity. Grey contours in Figure 6B identify the region of highest likelihood of gunshot location based only on this information and estimates of timing uncertainty. With negligible error in timings, the region resolves into a hyperbola, familiar in 'hyperbolic navigation' by detection time-lags in audio or radio signals (detailed in Fig. S8; Li et al. 2016). The best estimate of gunshot location is given by the simulated gunshot that maximizes P 0i G in Equation 14, with a best-matching probability of replicating the observed set of detection successes and failures and observed time-lag. In this case, the estimated gunshot lay 519 m from the actual location (Fig. 6B, showing its sound spread; R script for the procedures in Data S3). The magnitude of separation probably reflects influences on detection success by time-specific and local ambient conditions that deviated from the modelled conditions.
Timed detection of a gunshot by more than two devices allows triangulation of relative distances, which greatly improves the location power. For example, small time differences in the event logs of the three devices detecting gunshot #5 localize the gunshot to a small region in Fig. 6c (geometric analysis in Fig. S9). The estimated gunshot lies 60 m from the actual gunshot (black star), and 87 m closer than the best estimate without time-lag data.
Applications of the probabilistic method to other gunshots obtained locations to within 170 m of the actual gunshots even when two detecting devices lie in close proximity to each other (Fig. S10). The method also works for gunshots picked up by only a single device, or not picked up by any device (Fig. S11). In these cases, the data contain no time-lags with which to maximize the likelihood. It is then based only on the simulated gunshot that best replicates the single observed detection success, or absence of any success, and the detection failure of all other, or all, devices (Equation 4). The case of no detections usefully identifies the area of weakest coverage by devices (Fig. S11b).

Discussion
The methods established here, of sensor deployment and sound-source localization, address one of the major challenges to the promise of non-invasive monitoring, of collecting ecologically relevant data suitable for hypothesistesting science (Pimm et al. 2015). To date, almost no systematic records exist anywhere on hunting frequency in tropical forests, other than indirectly sourced estimates from questionnaire surveys (Foster et al. 2016). Monitoring in the Korup National Park in Cameroon using 12 passive acoustic devices continuously recording for 2 years detected a high level of shooting within a 54-km 2 grid (Astaras et al. 2017). The study was able to quantify an increase in gunshot frequency between years that was not detected in foot patrols of the area, and a prevalence of nocturnal over diurnal hunting. Such studies are rare because until now monitoring devices have been expensive to purchase, and bulky to deploy in areas of interest that often encompass remote habitat. The Korup study used SM2+ acoustic loggers (Wildlife Acoustic Inc, Maynard, MA) each weighing 680 g without batteries (200 9 200 9 64 mm) and costing over US$800. Their passive acoustic listening requires quarterly battery changes, and monitoring applications require analysis of thousands of hours of audio data. The new availability of cheaper, more power-efficient and smart devices opens up new options for monitoring large contiguous areas with massive grids of devices.
Our probabilistic method of device placement quantifies the sensitivities of acoustic monitoring to topography, wind and distribution of sound sources. Analyses of alternative scenarios allow conservation biologists to measure impacts of sub-optimal deployment, imposed by access or cost constraints, or by using deployments to serve multiple purposes (e.g. to detect gunshots and chainsaws). For a desired threshold of detection efficiency, near-optimal placement on hilly terrain can halve the number of devices otherwise needed for square or random grids, thereby more than halving monitoring costs. The method is applicable to any of the habitats modelled by current sound-spread packages , to passive as well as smart sensors, and to biotic as well as anthropogenic sounds (Blumstein et al. 2011). It advances substantially on the current recommended practice of modelling the detection probability as a function of distance, or using a fixed detection radius for conservation applications (Thompson et al. 2010;Browning et al. 2017). The probabilistic method of localizing the sound source makes use of whatever data may be available on detection timings or simply on detection successes and failures, and also allows prior beliefs about the most likely sources of gunshot to be incorporated within the same principled framework.
The closest work to our own is a desktop study of gunshot sensors by Gonz alez-Castaño et al. (2009), developed for the different setting of externally powered acoustic sensors. This required a multi-objective optimization, which was solved by searching for solutions on the Pareto front, where no other solution has both higher coverage and lower cost in terms of distance to a power line. Our battery-powered sensors present the simpler task of optimizing detection with a cost that is proportional only to the number of deployed sensors. Gonz alez-Castaño et al. (2009) modelled detection with a step function (cf. Fig. 2 fitted smooth function) and sound propagation over two-dimensional habitat (cf. Fig. 3 SPreAD-GIS three-dimensional habitat). For gunshot localization, they assumed independent uncertainties in detection timings caused by both clock drift and propagation path, which ignores the reality of correlated propagation paths (Equations (9)-(11)). Their resulting leastsquares estimate of gunshot location equates to our maximum likelihood estimate from timings alone (Equation (12)) with zero propagation noise. Our probabilistic framework additionally incorporates a prior over possible Figure 6. Detection of nine trial gunshots by ten devices in TMNR. (A) Gunshot locations (green dots, arrow indicating gun orientation), and deployed AudioMoths (magenta circles, dotted lines linking to detected gunshot(s)). Dirichlet tiles (magenta tessellations) each contain all points within TMNR that lie closer to the device at its centroid than to any other device. (B) Actual gunshot #9. (C) Actual gunshot #5. Plots show actual gunshot (green dot), detection success/failure by devices (closed/open magenta circles), the best estimate of gunshot location (black star, Equation 14), and decay in its SPL away from this source (white contours at 3-dB intervals, each equivalent to halving loudness). Dark-and lightgrey stars show 2nd and 3rd best estimates of gunshot location. Grey contours show 20% intervals in likelihood of gunshot location based only on detection time-lag(s) between detecting devices (Equation 12, r 2 drift = 0.001, equivalent to 0.03 s drift in device clocks; r 2 prop = 0.000045, equivalent to 10% drift in~1.5 s propagation time over 500 m).
locations, and evidence from detection itself (Equation (4)). This facilitates extension to more complex settings, for example localizing the most likely single source of rapid fire, or a repeating chainsaw or biotic signal, even when each repeat may trip different sets of sensors.
The probabilistic methods described here have limitations common to any environmental detection system, in soundscape modelling, sensor design and detection capability, which all require evaluation by site-specific ground truthing. The SPreAD-GIS soundscape that underpins detection probabilities requires significant processing times for deployments across complex topography. This is a one-off cost for a given environment, however, as the same soundscape is used for both device placement and sound localization. We recommend that users trial alternative mesh sizes for modelling sound grids, which largely dictate processing time. In our tests, we constructed the soundscape from regionally averaged values of background noise, wind speed and direction, and influence of habitat type on sound spread. With more local-scale knowledge, these could be set to specific values for each modelled gunshot. Although the orientation of the shotgun made little difference in our localization tests using a dense network of devices, the source amplitude will vary with the direction and elevation of the barrel. The omnidirectional sound dispersion modelled by SPreAD-GIS means that sensor placement assumes an absence of directional bias in gunshots, and gunshot localization will be greatly improved by accurate measurement of time-lags. Sensor clocks will typically have crystals giving an accuracy of 20 parts per million, equivalent to 2 s day À1 . Clock synchronization can be achieved on AudioMoths using external plugin modules, such as a GPA receiver with accurate satellite timing, or a radio transmitter synced to a receiving base-station clock. The benefit of synchronization needs weighing against the extra cost and power consumption of the plugin. The same probabilistic algorithm can be used either with or without clock synchronization, however, and without it, the evidence for the gunshot location is derived from the detection events only, rather than their timings. Any sound-detection algorithm programmed into sensors requires thorough validation against continuous recording within the monitored habitat, and manual review. The advantage of smart detection in reducing power consumption and data storage nevertheless remains set against the inherent limitation that target sound detection cannot be validated with respect to concurrent background noise at each sensor. This trade-off will have particular relevance to target sounds with less easily calibrated signal attenuation, such as wild animal calls.
Sound-source localization across tens of metres, for example of bird calls, may be too fine-scale for soundscape mapping by GIS or localization based on detection probability. In such cases, an array of networked sensor nodes, each containing a sub-array of multiple microphones can be used to detect direction as well as time of arrival of sounds from continuously synchronized clocks. Collier et al. (2010) deployed this system in a two-dimensional landscape with a sufficiently small array of nodes to localize bird calls from the sum of cross-correlations between microphones, achieving accuracies to well within a metre.
Our empirical tests constituted the first stage in a planned deployment for near-optimal detection of gunshots across the full extent of TMNR, at the invitation of the Belize Forest Department. Their interest is in sustainable exploitation of the tropical forests that still cover 40% of Belizean land mass. A shortage of rangers for patrolling forests puts a high premium on automated monitoring. Ongoing developments in equipping devices with classification algorithms for detecting chainsaws and animal calls (P., Prince, A.P. Hill, E. Piña-Covarrubias, C.P. Doncaster, J.L. Snaddon, A. Rogers, in submission) raise the prospect of efficient multipurpose deployments. New advances in radio communication promise the future capability for real-time detection and localization of exploitation activity, by linking networked devices to a base station. Commercial systems of this sort already exist for camera trapping (e.g. Cuddelink product page 2018), and are undergoing development for open-source Audio-Moth sensors (Hill et al. 2018).