Acoustic firearm discharge detection and classification in ...

11
Washington University in St. Louis Washington University Open Scholarship Mathematics Faculty Publications Mathematics and Statistics 5-2016 Acoustic firearm discharge detection and classification in an enclosed environment Lorenzo Luzi Eric Gonzalez Paul Bruillard Mahew Prowant James Skorpik See next page for additional authors Follow this and additional works at: hps://openscholarship.wustl.edu/math_facpubs Part of the Applied Mathematics Commons , Other Civil and Environmental Engineering Commons , and the Other Electrical and Computer Engineering Commons is Article is brought to you for free and open access by the Mathematics and Statistics at Washington University Open Scholarship. It has been accepted for inclusion in Mathematics Faculty Publications by an authorized administrator of Washington University Open Scholarship. For more information, please contact [email protected]. Recommended Citation Luzi, Lorenzo; Gonzalez, Eric; Bruillard, Paul; Prowant, Mahew; Skorpik, James; Hughes, Michael; Child, Sco; Kist, Duane; and McCarthy, John E., "Acoustic firearm discharge detection and classification in an enclosed environment" (2016). Mathematics Faculty Publications. 30. hps://openscholarship.wustl.edu/math_facpubs/30

Transcript of Acoustic firearm discharge detection and classification in ...

Page 1: Acoustic firearm discharge detection and classification in ...

Washington University in St. LouisWashington University Open Scholarship

Mathematics Faculty Publications Mathematics and Statistics

5-2016

Acoustic firearm discharge detection andclassification in an enclosed environmentLorenzo Luzi

Eric Gonzalez

Paul Bruillard

Matthew Prowant

James Skorpik

See next page for additional authors

Follow this and additional works at: https://openscholarship.wustl.edu/math_facpubsPart of the Applied Mathematics Commons, Other Civil and Environmental Engineering

Commons, and the Other Electrical and Computer Engineering Commons

This Article is brought to you for free and open access by the Mathematics and Statistics at Washington University Open Scholarship. It has beenaccepted for inclusion in Mathematics Faculty Publications by an authorized administrator of Washington University Open Scholarship. For moreinformation, please contact [email protected].

Recommended CitationLuzi, Lorenzo; Gonzalez, Eric; Bruillard, Paul; Prowant, Matthew; Skorpik, James; Hughes, Michael; Child, Scott; Kist, Duane; andMcCarthy, John E., "Acoustic firearm discharge detection and classification in an enclosed environment" (2016). Mathematics FacultyPublications. 30.https://openscholarship.wustl.edu/math_facpubs/30

Page 2: Acoustic firearm discharge detection and classification in ...

AuthorsLorenzo Luzi, Eric Gonzalez, Paul Bruillard, Matthew Prowant, James Skorpik, Michael Hughes, Scott Child,Duane Kist, and John E. McCarthy

This article is available at Washington University Open Scholarship: https://openscholarship.wustl.edu/math_facpubs/30

Page 3: Acoustic firearm discharge detection and classification in ...

Acoustic firearm discharge detection and classification in anenclosed environment

Lorenzo Luzi,1 Eric Gonzalez,1 Paul Bruillard,1 Matthew Prowant,1 James Skorpik,1

Michael Hughes,1,a) Scott Child,2 Duane Kist,2 and John E. McCarthy3

1Pacific Northwest National Laboratory, Richland, Washington 99354, USA2Kennewick Police Department SWAT Team, 211 West 6th Avenue, Kennewick, Washington 99336-0108, USA3Department of Mathematics, Washington University in Saint Louis, Campus Box 1146, St. Louis,Missouri 63130, USA

(Received 19 October 2015; revised 19 April 2016; accepted 26 April 2016; published online 13May 2016)

Two different signal processing algorithms are described for detection and classification of acoustic

signals generated by firearm discharges in small enclosed spaces. The first is based on the logarithm

of the signal energy. The second is a joint entropy. The current study indicates that a system using

both signal energy and joint entropy would be able to both detect weapon discharges and classify

weapon type, in small spaces, with high statistical certainty. [http://dx.doi.org/10.1121/1.4948994]

[MRB] Pages: 2723–2731

I. INTRODUCTION

We report on methods to both detect and classify fire-

arm discharges in small, enclosed, environments with high

statistical certainty. Some algorithms reported on here are

capable of running on an embedded microcontroller system

(Texas Instruments FRAM micro-controller unit number

MSP430FR5989) that, with an associated microphone

(InvenSense INMP404ACEZ-R7 microphone), is capable

of signal acquisition and analysis. Moreover, such a system

and software are suitable for wide-scale deployment in

classrooms, movie theaters, and other public gathering

places.

Implementation on a microcontroller limits the sophistica-

tion of algorithms that may be employed. In addition, we have

found that the governing dynamics of acoustic propagation

and signal acquisition are highly nonlinear. Consequently, we

have focused on approaches that reduce a waveform, or a sub-

segment of a waveform f(t), to a single number. This number,

or receiver value, is then intended to be used as the basis for

signal identification. Signal energy, or its logarithm, denoted

log½Ef �, combined with careful signal filtering has been shown

to provide a good balance between computational complexity

and statistical sensitivity. Our results show that signal energy

analysis is able to clearly discriminate between firearm dis-

charges and other acoustic background events, but not neces-

sarily between firearm types.

This information is a critical factor in determining first

responder tactics and strategy. To address the need to iden-

tify weapon types from their acoustic signatures, we have

investigated various entropies as previous studies have dem-

onstrated their utility for analysis of ultrasonic signals in

both materials characterization and medical ultrasonics.1–13

The current study demonstrates the utility of entropies for

analysis of acoustic signals in the audio range as well. When

used in conjunction with energy analysis it appears that

acoustic discrimination of weapon type is also possible.

There is an extensive literature on firearm discharge

detection and source identification. Previous investigations

of firearm discharge have focused on outdoor source loca-

tion,14–16 and identification of firearm and ammunition type

using shockwave analysis.17,18 Other investigators have stud-

ied correlation and linear predictive coding for firearm detec-

tion and source recognition.19 Threshold detection schemes

using six different waveform characteristics, e.g., magnitude

of signal absolute value, median filter, Teager energy opera-

tor, correlation against a template, among others mainly for

outdoor gunshot detection and source classification have

been described by Chac�on-Rodr�ıguez et al.20 More gener-

ally, extraction of acoustic cues for forensic purposes has

been investigated by Hong and colleagues.21

The current study is different from prior work in that it

considers signals acquired indoors, in relatively small enclo-

sures. Moreover, shockwave analysis or linear analysis tech-

niques for source identification are not used at all.

II. DATA ACQUISITION

Two different groups of acoustic data were collected for

this study. This first group consisted of “threat-type” signals,

which were acquired by discharging several different fire-

arms into a ballistic trap: 223 caliber automatic rifle [M-16

assault rifle (Colt’s Manufacturing Company, LLC,

Hartford, CT); Fiocchi 45 grain frangible (Fiocchi of

America, Inc., Ozark, MO)]. 40 caliber semi-automatic pis-

tol [Compact Smith & Wesson (Smith & Wesson,

Springfield, MA); S&W 125 grain frangible], 45 caliber

automatic pistol [Taurus PT 145 PRO (Taurus Inc, Miami

Lakes, FL); Fiocchi 155 grain frangible], 9 mm semi-

automatic pistol [Springfield Armory (Springfield ArmoryVR

Geneseo, IL) XD9; Fiocchi 100 grain luger], 22 rifle [Marlin

model 60 (Marlin Firearms, subsidiary of Freedom Group

Madison, North Carolina); Remington 22LR 40 grain], 22

pistol [Intratec TEC-22 (Intratec Firearms, Miami, FL);

Remington (Remington Arms Company, LLC, Madison,

NC) 22LR 40 grain], 357 magnum (S&W Magnum; PMCa)Electronic mail: [email protected]

J. Acoust. Soc. Am. 139 (5), May 2016 27230001-4966/2016/139(5)/2723/9/$30.00

Redistribution subject to ASA license or copyright; see http://acousticalsociety.org/content/terms. Download to IP: 128.252.66.144 On: Mon, 13 Jun 2016 21:16:14

Page 4: Acoustic firearm discharge detection and classification in ...

158 grain), 380 caliber pistol [Taurus (Taurus International

Manufacturing, Miami Lakes, FL) PT 738; Fiocchi 380

auto], 38 special (S&W.38 Special AirLite; American Eagle

158 grain), and AK 47 [SAIGA 7.62� 39 Legion

(Kalashnikov Concern, Izhevsk, Russia); Tula 7.62 � 39 R

124 HP]. All firearms but the M16 where provided by the

Kennewick, WA police department from their evidence

locker, the M16 was provided by their special weapons and

tactics team. This was done in order to sample an ensemble

of acoustic sources that captures the variability found in non

military/police arms, i.e., in “street” weapons. A second

group of control data was also acquired. These consisted of

“false” alarms: a book slapped on a table, an air-filled paper

bag “popping,” and a wrench striking a metal ladder.

Signals were collected in three different rooms of differ-

ent dimensions: a large auditorium (12.8� 8.4 m; height

2.7 m), a medium sized meeting room (4.6� 6.1 m; height

2.7 m), and a small office (3.7� 3.7 m; height 2.7 m).

Acquisition of all data were completed during one 10 h inter-

val. Firearm discharge data were obtained with the assistance

of the Kennewick, WA special weapons and tactics team,

whose members volunteered to operate all firearms used in

this study. We will report on results collected in the small

room shown in Fig. 1 since this constitutes the most chal-

lenging environment in which to distinguish between threat

and nonthreat acoustic events and to discriminate between

different types of threats. The figure shows the dimensions

of the room, the placement of the microphones, location of

trap, and firearms operator. During acquisition of data, the

door to the room was closed.

Acoustic signals were converted to electrical signals

using a InvenSense INMP404ACEZ-R7 microphone con-

nected to custom built amplifier circuitry. These signals were

digitized, single-shot fashion, by a Teledyne LeCroy MSO

104MXs B digital sampling oscilloscope to obtain raw data

consisting of one million point waveforms (12-bit numbers;

1.0 MHz sampling rate). At least five waveforms for each type

of acoustic source were acquired and stored for later analysis.

III. ANALYSIS

A. Experimental nonlinearities

Several observations indicate that the experiment is gov-

erned, at least partially, by nonlinear dynamics occurring

during the propagation of sound as well in the microphone

during data capture. During acquisition of firearms signals,

the marksman reported the ceiling tile immediately above

the trap was being visibly displaced by the weapon dis-

charge. Subsequent inspection of the digital waveforms on a

fine time scale (not shown) reveals evidence of shock-like

features. Moreover, the amplitude of firearm discharges in

typically in over 100 dB and this is close to the rated limit of

the microphone used in our study.

As an initial test of this hypothesis, we acquired wave-

forms for a single- and five-round discharge from the 223 cali-

ber assault rifle. Figure 2 shows, in its top panel, the

waveform recorded from the discharge of one round, f1(t).The waveform, f5ðtÞ, for five automatic discharges is shown

in the middle panel. Both waveforms were Fourier

transformed to obtain, respectively, F1ðxÞ and F5ðxÞ. If the

propagation was linear, or even weakly linear, then the inverse

Fourier transform of F5ðxÞ=F1ðxÞ should produce a time se-

ries having five delta function spikes. To avoid division by

zero we actually divide by a modified version of F1ðxÞ,specifically

F5 xð Þ~F1 xð Þ

; (1)

where

~F1ðxÞ ¼F1ðxÞ if jF1ðxÞj � q;

q if jF1ðxÞj < q;

((2)

and q ¼ 10�6 is a regularizing term. The inverse Fourier trans-

form of this function was computed and is shown in the bottom

panel of the Fig. 2. It is evident that there is no pulse train.

The strong nonlinearities exhibited by the acoustics pre-

clude identification of signal source using signal processing

techniques based on linear systems theory such as matched fil-

ters. Instead, we will focus on techniques that take subseg-

ments of the acoustic waveform and produce a single number

or receiver value. Moreover, repeated monitoring of micro-

phone performance was undertaken during and after the ac-

quisition of firearm discharge waveforms to detect signs of

damage resulting from exposure to large amplitude sound

waves. These are reported on more fully in the Appendix.

FIG. 1. Geometry used for acoustic signal acquisition.

2724 J. Acoust. Soc. Am. 139 (5), May 2016 Luzi et al.

Redistribution subject to ASA license or copyright; see http://acousticalsociety.org/content/terms. Download to IP: 128.252.66.144 On: Mon, 13 Jun 2016 21:16:14

Page 5: Acoustic firearm discharge detection and classification in ...

B. Energy and entropy analysis of waveforms

We will denote the acoustic waveforms acquired for our

study by f(t). We will also employ the convention that the

domain of f(t) is [0, 1].

For f(t), the signal energy is

Ef ¼ð1

0

f ðtÞ2dt: (3)

We may also compute a joint entropy of acoustic wave-

forms, f(t), using a reference function g(t). In the case where

f(t) and g(t) are differentiable functions this entropy is given

by6

Hf ;g � �1

2

ð1

0

dtmin jf 0 tð Þj; jg0 tð Þj

� �max jf 0 tð Þj; jg0 tð Þj

� ��ð1

0

dt log max jf 0 tð Þj; jg0 tð Þj� �� �

: (4)

The strategy for choosing the reference waveform, g(t), in

the case where subtle changes in f(t) must be detected has

been described elsewhere.7 Although these techniques are

not technically applicable for the present investigation, we

will take them as an operational starting point. The justifica-

tion for this approach is twofold. In previous studies,8,9 it

has been observed that the joint entropy calculation has

many of the attributes of a matched filter. In particular, Hf ;g

is often extremized for waveforms “close” to f(t), when g0ðtÞis a step-like function, with transitions located at the critical

values of f(t). In addition, Theorem 1 of a previous study of

the variational properties of joint entropy7 also suggests that

this strategy would be successful. Consequently, we will use

this approach, described in greater detail below (Fig. 4) to

discriminate between different classes of firearms.

C. Signal preprocessing

The goal of this study was to discover a suite of signal

receivers that are suitable for two different tasks: discharge

detection vs firearm identification. Consequently, after an

initial “gating” operation to remove the noise-only pre-trig-

ger portion of the digital waveform, two different prepro-

cessing schemes were applied to the raw data, prior to

computation of either signal energy or entropy.

For signal energy computations the data were decimated

(i.e., only every tenth point was kept) and then bandpass fil-

tered to exclude frequencies outside of the range extending

from 1 to 26 kHz. This was accomplished in the frequency

domain by multiplying the Fourier transform of the raw data

by the conjugate symmetric form of

tanhf � fl:b:

a

� �þ 1

� tanh

fu:b: � f Þa

� �þ 1

� 4

; (5)

where fl:b: ¼ 103; fu:b: ¼ 26� 103, and the sharpness param-

eter for the filter was set to a¼ 10. All computations are per-

formed using units of Hertz.

The logarithm of the signal energy was computed,

according to Eq. (3) using 2.56 ms segments of the acoustic

waveforms. The analysis was performed using a “moving

window” analysis where the 2.56 ms window was placed

initially at a point coincident with the signal arrival and the

logarithm of the signal energy was computed. Subsequently,

the window was moved in 2.56 ms steps, until the end of the

data were reached. In this way, an array of signal energy

log values was produced. In this study it was observed that

analysis with the window placed at zero time was adequate

for source classification.

For entropy calculations only 32 ls segments of the

acoustic waveforms were analyzed in moving window fashion,

with a moving window shift of 1 ls. The rationale for the

shorter window length was that its structure would be primar-

ily determined by the attributes of the firearm and not those of

the environment. As in the signal energy case, it was found

that analysis with the window placed at zero time was

adequate for source classification. This observation and sensi-

tivity to placement and length of the moving window will be

more fully explained below in connection with Fig. 6.

IV. RESULTS

A. “Threat” vs “nonthreat”

Each of the waveforms acquired for each source type

were analyzed as described above to obtain either log

energy, log½Ef �, or joint entropy, Hf ;g. The mean and stand-

ard deviations of the ensemble for each source were then

computed.

Figure 3 shows the results obtained for the log½Ef �analysis. The error bars in the plot are equal to one standard

deviation. There is wide separation between the threat-type

and nonthreat-type bars. However, there appears to be little

separation between either the 223 caliber (M16) and AK47

(“long rifles”) and any pistols. This would be useful informa-

tion in certain circumstances.

In order to quantify this separation, the pair-wise differ-

ences between each acoustic source were computed

along with associated standard deviation using the standard

FIG. 2. (Color online) Top panel: Acoustic signature of one discharge of 223

caliber assault rifle. Middle panel: acoustic signature of automatic discharge

of five rounds. Bottom panel: The deconvolution, as discussed in connection

with Eqs. (1) and (2) below, of the five discharge by the single discharge sig-

nature. In a linear system such a deconvolution should produce a series of five

delta functions. The fact that these are not evident supports the conclusion that

acoustic wave propagation is not linear in the current study.

J. Acoust. Soc. Am. 139 (5), May 2016 Luzi et al. 2725

Redistribution subject to ASA license or copyright; see http://acousticalsociety.org/content/terms. Download to IP: 128.252.66.144 On: Mon, 13 Jun 2016 21:16:14

Page 6: Acoustic firearm discharge detection and classification in ...

methods for error propagation.22 From these, the mean dif-

ference, which can be either positive or negative, divided by

the associated standard deviation was computed in order to

obtain a noise-normalized measure of change between re-

ceiver values for different acoustic sources. This ratio, which

we will use to quantify the sensitivity of analysis techniques,

is often defined as the statistical confidence,23 and is the re-

ciprocal of the coefficient of variation of a random variable.

Larger values are better as they imply greater statistical sep-

aration between random variables, in our case signal

receivers. Small values suggest that the sources are statisti-

cally indistinguishable to the signal receiver.

The confidence values characterizing the relation

between threat-type and nonthreat-type-signals are summar-

ized in Table I. We observe that all confidences are larger

than one, suggesting that these types of signals should be

easily distinguished using only log½Ef �. Moreover, energy

calculation is simple and well suited to our goal of reduc-

tion-to-practice on low cost hardware.

B. Threat-type discrimination

As mentioned previously, discrimination between

threat-type waveforms would be useful information. Table II

summarizes the absolute values of all confidence ratios

obtained in pair-wise comparison of log½Ef � values for

threat-type sources. Only the values below the diagonal are

shown since the table is symmetric about this line. We

observe that many entries are greater than one, suggesting

that in many cases highly reliable discrimination between

sources is possible. However, there are also many entries

that are less than one. Particularly troubling is the fact that

several of these entries appear in the first column indicating

that log½Ef � provides poor discrimination between several

pistols and the assault rifle.

Consequently, we have investigated the use of different

joint entropies, Hf ;gi, as an additional tool for weapons iden-

tification. Each reference function, giðtÞ, was generated using

one of the threat-type waveforms according to the methods

described previously,7 for instance g1ðtÞ was computed using

one of the 223 rile waveforms, g2ðtÞ was computed using

one of the 40 caliber waveforms and so forth with g10ðtÞbeing computed using one of the AK47 rifle waveforms. For

completeness, we illustrate this computation in Fig. 4. The

line with long and short dashes shows the a portion of the

bandpass filtered version of the underlying waveform coinci-

dent with the onset of the acoustic pulse generated by dis-

charge of the 223 assault rifle. Zero time indicates the point

at which the LeCroy MSO 104MXs B digital sampling oscil-

loscope triggered during data acquisition when the incoming

voltage crossed the threshold level of roughly 125 mV. The

32 ls segment of this waveform, which has been selected for

Hf ;gianalysis is shown by the solid line. Solid black circles

indicate the locations of the start of this segment and its

extrema. The dashed step-like function shows a scaled ver-

sion of the resulting g01ðtÞ, which had high values of 10 000

and low values of 0.001.

An example plot of the entropies Hf ;g1, along with asso-

ciated standard deviation bars, obtained using the reference

function generated using a 223 caliber waveform is shown in

Fig. 5. The figure shows a clear separation between the “long

rifle” 223 data and the “pistol” 40 caliber, 45 caliber, and to

a lesser extent, 9 mm data. For this plot, the confidence ratios

quantifying the separation between the 223 (a “long rifle”)

and the 357 caliber and 380 caliber pistols data improves

from the Table II values of 0.16 and 0.80 to 5.58 and 5.69,

respectively. However, for the 22 caliber rifle to confidence

is decreased from its Table II value of 9.09 to 5.64.

To be thorough, we have calculated confidence tables

for joint entropy analogous to the Table II using a represen-

tative of each type of “threat” waveform, i.e., for all

giðtÞ; i ¼ 1;…; 10. To assess the sensitivities obtainable

using this suite of signal receivers, the maximum absolute

values for each entry in these over all 10 tables have been

collected and are shown in Table III. We observe that where

the entries of this table are low, the corresponding entries of

Table II are high and vice versa. Moreover, the maximum

always exceeds one.

C. Effect of changing analysis parameters, particularlymoving window placement

We have explored other values for bandpass filter lower

and upper bound, moving window length, moving window

FIG. 3. (Color online) Separation of “threat-type” vs “nonthreat-type” by

the logarithm of signal energy, log½Ef �.

TABLE I. Confidence ratios of “threat-type” vs “nonthreat-type” sources

using log½Ef �.

Book Paper bag Wrench

223 cal. semiauto rifle 22.60 17.68 11.03

40 cal. semiauto pistol 17.50 14.43 9.57

45 cal. semiauto pistol 18.10 14.5 9.28

9 mm semiauto pistol 19.22 15.26 9.59

22 cal. semiauto rifle 15.81 10.63 5.11

22 cal. semiauto pistol 22.07 16.05 9.09

357 cal. revolver pistol 28.66 20.69 12.00

380 cal. semi auto pistol 19.41 15.57 9.95

38 special revolver pistol 15.19 13.00 9.13

AK47 semiauto rifle 55.76 28.77 14.28

2726 J. Acoust. Soc. Am. 139 (5), May 2016 Luzi et al.

Redistribution subject to ASA license or copyright; see http://acousticalsociety.org/content/terms. Download to IP: 128.252.66.144 On: Mon, 13 Jun 2016 21:16:14

Page 7: Acoustic firearm discharge detection and classification in ...

step in the course of our investigations. The choice of band-

pass filter parameters is largely governed by the response

characteristics of microphone and where chosen primarily to

eliminate electronic noise outside of the spectral response of

that device. However, the choice of moving window parame-

ters appears to be less constrained and during the course of

our investigations the impact of varying these over a range

of values was explored. For signal energy analysis it was

found that windows containing at least half of the waveforms

were suitable for classification. However, entropy analysis

appears to be more tightly constrained, particularly in con-

nection with the, more difficult, problem of classification of

weapon type. Consequently, we now present additional

information of the choice of values reported.

Our primary criterion for utility was that these parame-

ters cover a continuous range of values. We have found that

for window length the values reported above may be more

than doubled before entropy analysis is unable to distinguish

weapon types. While moving window position, which was

computed for an array of values, and should be chosen to

capture physical events is not sensibly characterized this

way, we have found that it may be chosen in an interval that

is long enough to be easily captured by current digital acqui-

sition devices. We focus on the comparison of 223 assault

rifle and 40 caliber pistol in the discussion that follows as it

is a typical result. The sensitivity of Hf ;g analysis to this

parameter is illustrated in three panels shown in Fig. 6,

where the analysis of a waveform captured from discharge

of the 223 caliber assault rifle is compared with a discharge

from a 40 caliber pistol. In the top panel are shown 110 ls

segments that capture the arrival of the acoustic waveforms

at the sensor. We observe that the shape of the pulses at first

arrival is noticeably different. This observation motivated

the entropy analysis investigation, which previous reports

have shown is more sensitive to changes in shape of wave-

forms than is signal energy analysis.24 The middle panel

shows the curves for processed raw data (as described in

Sec. III C) overlain with circular symbols placed at the loca-

tions of the 32 time domain points used to compute Hf ;g

incorporated into Fig. 5). Also shown in the middle panel is

a gray region containing twenty points that were also used

as the starting points for 32 l windows over which Hf ;g was

computed as part of the moving window analysis as

described in Sec. III C. The bottom panel shows the resulting

Hf ;g for both firearms. Only the first four and the last three

points, where the error bars of the firearms overlap, fail to

distinguish the two weapon types. These results, which are

also typical of signal energy, show that the reported Hf ;g

results summarized in Fig. 5 are, at least to the order of a

TABLE II. Confidence ratios for different “threat-type” sources obtained using log½Ef � analysis.

223 40 Cal. 45 Cal. 9 mm 22 Cal (R) 22 Cal (P) 357 Cal 380 Cal 38 Spc. AK 47

223 cal. semiauto rifle (M16) - - - - - - - - - -

40 cal. semiauto pistol 0.59 - - - - - - - - -

45 cal. semiauto pistol 1.48 0.76 - - - - - - - -

9 mm semiauto pistol 1.40 0.66 0.12 - - - - - - -

22 cal. semiauto rifle 9.09 6.98 6.57 7.00 - - - - - -

22 cal. semiauto pistol 3.37 2.23 1.47 1.67 6.32 - - - - -

357 cal. revolver pistol 0.16 0.78 1.78 1.71 10.92 4.10 - - - -

380 cal. semiauto pistol 0.80 0.14 0.66 0.55 7.49 2.26 1.03 - - -

38 special revolver pistol 0.04 0.44 1.13 1.05 6.50 2.43 0.16 0.58 - -

AK47 semiauto rifle 1.55 1.96 3.28 3.29 16.96 7.07 1.77 2.43 1.06 -

FIG. 5. (Color online) Separation of the acoustic signatures of different fire-

arms by joint entropy, Hf ;g. The reference was computed using a step-like

function with transitions at the extrema of one of the 223 assault rifle wave-

forms. Note vertical axis constant offset of 104.2.

FIG. 4. (Color online) An illustration of the steps used to calculate a refer-

ence waveform for the 223 caliber assault rifle. The dashed step-like func-

tion is the derivative of the calculated reference function g01ðtÞ, which is

shown instead of the reference g1ðtÞ, since its relation to the extrema of

32 ls segment is more easily visualized.

J. Acoust. Soc. Am. 139 (5), May 2016 Luzi et al. 2727

Redistribution subject to ASA license or copyright; see http://acousticalsociety.org/content/terms. Download to IP: 128.252.66.144 On: Mon, 13 Jun 2016 21:16:14

Page 8: Acoustic firearm discharge detection and classification in ...

few microseconds, insensitive to analysis window placement

as long as it primarily encompasses the arrival of the wave-

form. Given the capabilities of modern data acquisition

equipment in relation to the length of this window of stabil-

ity, it seems reasonable to conclude that Hf ;g can provide a

robust metric for classifying acoustic signatures into differ-

ent weapon-type categories.

V. DISCUSSION

The results summarized in Tables II and III suggest that

a statistical detection and identification system based on the

complementary use of the logarithm of signal energy and the

joint entropies [one for each reference function giðtÞ] could

be developed that would simultaneously detect discharge of

firearms and classify their type. This system could be based

on a hierarchical analysis beginning with log½Ef � analysis

to discriminate between threat and nonthreat events. If the

former were indicated by the energy analysis then subse-

quent firearm identification would be executed using Hf ;gi

signal receivers.

While the use of confidence ratios is a useful starting point

for quantifying the statistical separation between random varia-

bles, the hierarchical analysis indicated above would require

explicit knowledge of their distributions. Unfortunately, time

and resource limitations precluded acquisition of a large num-

ber of firearm discharges of even a single weapon type.

Nevertheless, two conclusions seem warranted. First,

and most important, is that for each firearm type there exists

a receiver, either log½Ef � or one of the entropies Hf ;gi, that is

tightly clustered with a large enough difference in mean

values between different weapon types so that even a small

sample of waveforms would be sufficient for statistical

identification. In many cases, those where confidence ratios

are larger than five, it appears that even a single weapon dis-

charge would permit classification of a firearm into either

the category of pistol or long rifle. The case where the stand-

ard deviation (r) is less than five, identification and classifi-

cation would still be possible since, unfortunately, multiple

acoustic emissions from each firearm source would likely be

available. In that case, statistical analysis could be based on

the standard deviation of the mean (r=ffiffiffinp

), which decreases

like 1=ffiffiffinp

as the number, n of waveforms of each weapon

type increases. For even a few discharges of each weapon

type, r=ffiffiffinp

would rapidly decrease so that the separations

between accumulating mean values would approach five

standard errors of the mean provided that the standard devia-

tion exceeded one. To put these numbers in context suppose

for the moment that the underlying distributions are normal.

Then, taking the number of public elementary, middle, and

high schools in the United States to be 100 000,25 and assum-

ing that each school has 1000 rooms and that there is an

TABLE III. Maximum confidence ratios for different “threat-type” sources obtained using Hf ;g analysis for giðtÞ derived from different acoustic sources as

described in Sec. IV B.

223 40 Cal. 45 Cal. 9 mm 22 Cal. (R) 22 Cal. (P) 357 Cal 380 Cal 38 Spc. AK 47

223 cal. rifle semiauto rifle(M16) - - - - - - - - - -

40 cal. semiauto pistol 8.61 - - - - - - - - -

45 cal. semiauto pistol 8.63 1.42 - - - - - - - -

9 mm semiauto pistol 1.48 1.00 0.65 - - - - - - -

22 cal. semiauto rifle 5.64 53.46 29.92 7.40 - - - - - -

22 cal. semiauto pistol 4.30 38.33 18.00 9.33 1.16 - - - - -

357 cal. revolver pistol 5.58 40.44 27.67 9.71 0.91 1.74 - - - -

380 cal. semiauto pistol 5.69 59.04 31.65 9.80 1.24 1.94 0.58 - - -

38 special revolver pistol 4.06 16.59 17.75 6.01 1.37 0.48 1.37 1.42 - -

AK47 semiauto rifle 5.67 37.20 26.57 9.79 0.95 1.96 0.49 0.51 1.55 -

FIG. 6. (Color online) Effect of changing analysis parameters. Top panel: raw

data for 223 caliber assault rifle and 40 caliber pistol. Middle panel: curves for

bandpass filtered data with circular symbols indicating first set of points used

for Hg;f analysis results in Fig. 3. The gray region indicates the range of start-

ing times used to prepare the bottom panel. Bottom panel: Effect of changing

the starting time for the set of points used to compute Hf ;g.

2728 J. Acoust. Soc. Am. 139 (5), May 2016 Luzi et al.

Redistribution subject to ASA license or copyright; see http://acousticalsociety.org/content/terms. Download to IP: 128.252.66.144 On: Mon, 13 Jun 2016 21:16:14

Page 9: Acoustic firearm discharge detection and classification in ...

acoustic event in each of these rooms once an hour for 24 h

every day of the year, five sigma implies one false call will

be made per century. While some of the numbers in this esti-

mate may seem high, particularly the number of rooms per

school, they have been chosen in order to provide an overes-

timate of the possible error rate.

Second, the expense of an expanded study to measure

the distributions of log½Ef � and Hf ;giis justified. The value of

such an expanded study would lie in its use for design of an

automated processing algorithm for detection of firearm dis-

charges in public gathering places as well as the identifica-

tion of firearm type.

ACKNOWLEDGMENTS

This study was funded by internal R&D funds at PNNL

including the Signature Discovery Initiative. In addition, we

would like to thank Steve Meyer, Special Response Team

Commander, and Officers Barry Woodson and Steve Voit of

the Hanford Patrol (U.S. Department of Energy) who

assisted in acquisition of firearms data during the initial

stages of this investigation. J.E.M. was partially supported

by NSF grant DMS 1300280. M.S.H. and J.E.M. have a

financial (ownership) interest in EntropyVision Inc. and may

financially benefit if the company is successful in marketing

its products that are related to this research.

APPENDIX

While it appears to be widely accepted that firearm

discharges are capable of producing hearing loss, and thus

exceed 140 dB levels required for this to occur, we have

been unable to find refereed sources providing quantitative

sound levels for specific measurement positions relative to

the location of the firearm barrel. Several web sites contain

data and plots, for instance: http://www.freehearingtest.com/

hia_gunfirenoise.shtml or for more detailed description of

actual measurements: Kyttala and Paakonen (1995):

“Suppressors and shooting range structures” (http://

www.guns.connect.fi/rs/suppress.html), which shows 160 dB

maximum levels for a shooter firing a FN FAL L1A1 assault

rifle using. 308 Win standard high velocity ammunition.

This matches the maximum safe operating level for the

InvenSense INMP404ACEZ-R7 microphone used in our

study, which indicates some risk in employing this device.

Nevertheless, as our goal was demonstration of a low-cost,

hence widely deployable, sensor we decided to proceed

using the following precautions. First, rough amplitude com-

parisons of microphone output before and after a subset of

the firearm discharges were performed using acoustic sour-

ces like the “wrench” and “book slap” to check for obvious

changes in microphone output amplitude or shape. Second,

the transducer was located at least 2 m from the acoustic

source (firearm) during all testing, and probably experienced

peak sound levels below 160 dB. Third, as it true for most

engineering tolerances, the 160 dB safe operating level pub-

lished by the manufacturer has probably been “de-rated” to

provide an extra margin for safe use and is below the actual

noise level at which the microphone suffers permanent

damage. Fourth, and most important, quantitative compari-

sons of spectral characteristics of the microphone with

unused microphones of the same manufacture could be per-

formed at the conclusion of the study to rule out the possibil-

ity of microphone damage.

These quantitative comparisons were performed using

four InvenSense INMP404ACEZ-R7 microphones that were

not exposed to firearm discharges. The apparatus used to

make these measurements is shown in Fig. 7. The speaker, a

Sontron SPS-29-T00 piezo-ceramic with a 20 mm diameter,

was used to drive the microphone under test. Given the con-

straints imposed by laboratory space and the desire to mini-

mize cable lengths for the electronic components, it was

placed 42.8 cm away from the microphone. This is greater

than the near-to-far field transition point, for 26 kHz, which

occurs at 6.1 cm.

In order to ensure measurement of all microphones

occurred in their linear response regime, calibration curves

were acquired by measuring spectra of received pulses

obtained by driving the broadband-amplifier with a 2 ls step

function pulse from the Tektronix AFG 3252C set to a height

of either 1.5, 1.0. 0.5, 0.25, or 0.125 V. These measurements

simultaneously verify the linearity of all components in the

measurement chain: Tektronix AFG 3252C, HP 6327A,

speaker and microphone. Typical curves, in this case the

family obtained using the prototype microphone, are shown

in Fig. 8. The top curve, labelled 1.25 V, is 3.5 dB above the

calibration curve corresponding to an amplified 1.00 V step

function excitation, as expected. The remaining curves are

all 6 dB apart, also as expected. Since the 0.5 V labelled

curve appears to be well within the linear range of the mea-

surement apparatus this driving level was used for all

spectral characterizations.

FIG. 7. Equipment diagram showing electronics used for measurements of

spectral characteristics of InvenSense INMP404ACEZ-R7 microphones

used in our study.

J. Acoust. Soc. Am. 139 (5), May 2016 Luzi et al. 2729

Redistribution subject to ASA license or copyright; see http://acousticalsociety.org/content/terms. Download to IP: 128.252.66.144 On: Mon, 13 Jun 2016 21:16:14

Page 10: Acoustic firearm discharge detection and classification in ...

Spectra were obtained using the following protocol.

The prototype used to obtain firearm discharge data was

placed in a clamp and aligned for maximum amplitude and

arrival time of 1.25 ms (corresponding to 42.8 cm assuming

a speed of sound of 343 m/s). The average of 256 pulses

from the speaker were stored for later off-line analysis.

Next, an unused microphone was placed in the clamp, its

position and alignment similarly adjusted and the average

of 256 pulses from the speaker were averaged and stored.

This process was repeated for the remaining three unused

microphones.

This cycle was repeated five times. Subsequently, the

data were analyzed by baseline removal, windowing to elimi-

nate spurious pulses and reduce noise using a 1 ms window.

As the microphones exhibit variations in output amplitude, all

pulses were then scaled to a maximum deviation, from DC, of

one. This permits more precise comparison of the shapes of

the spectra. Next, each of the rescaled pulses were Fourier

transformed and their magnitudes as functions of frequency,

i.e., the spectra, were computed. The five spectra from the

prototype were averaged. Their standard deviations were also

computed. The same processing was performed on each of the

twenty pulses obtained from the unused microphones and

these were averaged and the standard deviation computed.

We point out that the rescaling performed in the time domain

had the effect of reducing the resulting standard deviation of

the ensemble of twenty spectra and thus produces a more

stringent comparison between prototype and unused micro-

phone spectra.

The comparison of average prototype and average

unused microphone spectra over a range extending from 0 to

28.6 kHz is shown in Fig. 9. The averaged (N¼ 5) spectra

for the prototype with standard deviation error bars are

represented in the solid curve without plot symbols. The

average (N¼ 20) spectra for the unused microphones are

represented by the curve with circular symbols. The plots are

essentially the same over the 1 to 26 kHz range used to band-

pass filter all time domain data prior to the analysis that

produced the comparisons shown in Figs. 3 and 5.

1M. Hughes, “Analysis of ultrasonic waveforms using Shannon entropy,”

Proc. - IEEE Ultrason. Symp. 2, 1205–1209 (1992).2M. Hughes, “Analysis of digitized waveforms using Shannon entropy,”

J. Acoust. Soc. Am. 93(4), 892–906 (1993).3M. Hughes, “NDE imaging of flaws using rapid computation of Shannon

entropy,” Proc. - IEEE Ultrason. Symp. 2, 697–700 (1993).4M. Hughes, “Analysis of digitized waveforms using Shannon entropy. II.

High-speed algorithms based on Green’s functions,” J. Acoust. Soc. Am.

95(5), 2582–2588 (1994).5M. S. Hughes, J. N. Marsh, C. S. Hall, D. Savoy, M. J. Scott, J. S. Allen,

E. K. Lacy, C. Carradine, G. M. Lanza, and S. A. Wickline,

“Characterization of digital waveforms using thermodynamic analogs:

Applications to detection of materials defects,” IEEE Trans. Ultrason.,

Ferroelectr., Frequency Control 52(9), 1555–1564 (2005).6M. Hughes, J. McCarthy, J. Marsh, and S. Wickline, “Joint entropy of con-

tinuously differentiable ultrasonic waveforms,” J. Acoust. Soc. Am.

133(1), 283–300 (2013).7M. Hughes, J. McCarthy, P. Bruillard, J. Marsh, and S. Wickline,

“Entropic vs. energy waveform processing: A comparison based on the

heat equation,” Entropy 17(6), 3518–3551 (2015).8J. N. Marsh, J. E. McCarthy, M. Wickerhauser, J. M. Arbeit, R. W.

Fuhrhop, K. D. Wallace, G. M. Lanza, S. A. Wickline, and M. S. Hughes,

“Application of real-time calculation of a limiting form of the renyi en-

tropy for molecular imaging of tumors,” IEEE Trans. Ultrason.,

Ferroelectr. Frequency Control 57(8), 1890–1895 (2010).9J. N. Marsh, K. D. Wallace, G. M. Lanza, S. A. Wickline, M. S. Hughes,

J. E. McCarthy, and M. V. Wickerhauser, “Application of a limiting form

of the Renyi entropy for molecular imaging of tumors using a clinically

relevant protocol,” Proc. - IEEE Ultrason. Symp. 1, 53–56 (2010).10K. D. Wallace, J. Marsh, S. L. Baldwin, A. M. Connolly, K. Richard, G.

M. Lanza, S. A. Wickline, and M. S. Hughes, “Sensitive ultrasonic delin-

eation of steroid treatment in living dystrophic mice with energy-based

and entropy-based radio frequency signal processing,” IEEE Trans.

Ultrason. Ferroelectr. Frequency Control 54(11), 2291–2299 (2007).11M. Hughes, J. Marsh, K. Wallace, T. Donahue, A. Connolly, G. M.

Lanza, and S. A. Wickline, “Sensitive ultrasonic detection of dystrophic

skeletal muscle in patients with Duchenne’s muscular dystrophy using an

entropy-based signal receiver,” Ultrasound Med. Biol. 33(8), 1236–1243

(2007).

FIG. 8. (Color online) Typical calibration curves used to determine the am-

plitude of the square wave used for spectral measurements.FIG. 9. (Color online) Comparison of spectra of prototype microphone after

study completion with the average of five spectra obtained from unused micro-

phone of the same manufacture. Standard deviation bars are also plotted.

2730 J. Acoust. Soc. Am. 139 (5), May 2016 Luzi et al.

Redistribution subject to ASA license or copyright; see http://acousticalsociety.org/content/terms. Download to IP: 128.252.66.144 On: Mon, 13 Jun 2016 21:16:14

Page 11: Acoustic firearm discharge detection and classification in ...

12M. Hughes, J. Marsh, K. Agyem, J. McCarthy, B. Maurizi, M.

Wickerhauser, K. Wallace, G. Lanza, and S. Wickline, “Use of smoothing

splines for analysis of backscattered ultrasonic waveforms: Application to

monitoring of steroid treatment of dystrophic mice,” IEEE Trans.

Ultrason. Ferroelectr. Frequency Control 58(11), 2361–2369 (2011).13R. Seip, E. Ebbini, and M. O’Donnell, “Non-invasive detection of thermal

effects due to highly focused ultrasonic fields,” Proc. - IEEE Ultrason.

Symp. 2, 1229–1232 (1993).14R. Maher, “Acoustical characterization of gunshots,” in Signal Processing

Applications for Public Security and Forensics, 2007. SAFE’07. IEEEWorkshop on, Signal Processing Applications for Public Security andForensics (IEEE, Hoboken, NJ, 2007), pp. 1–5.

15P. Sinha, S. Kumar, and R. Hegde, “Sniper localization using passive

acoustic measurements over an ad-hoc sensor array,” in 2015 Twenty FirstNational Conference on Communications (NCC) (IEEE, Hoboken, NJ,

2015), pp. 1–6.16M. Khalid, M. Babar, M. Zafar, and M. Zuhairi, “Gunshot detection and

localization using sensor networks,” in 2013 IEEE InternationalConference on Smart Instrumentation, Measurement and Applications(ICSIMA) (IEEE, Hoboken, NJ, 2013).

17R. Maher, “Audio forensic examination,” IEEE Signal Process. Mag.

26(2), 84–94 (2009).18A. Ramos, S. Holm, S. Gudvangen, and R. Otterlei, “A modified spectral

subtraction algorithm for real-time noise reduction applied to gunshot

acoustics,” in 2012 International Conference on Signals and ElectronicSystems (ICSES) (IEEE, Hoboken, NJ, 2012), pp. 1–5.

19T. Ahmed, M. Uppal, and A. Muhammad, “Improving efficiency and reli-

ability of gunshot detection systems,” in 2013 IEEE InternationalConference on Acoustics, Speech and Signal Processing (ICASSP) (IEEE,

Hoboken, NJ, 2013), pp. 513–517.20A. Chacn-Rodrguez, P. Julin, L. Castro, P. Alvarad, and N. Hernndez,

“Evaluation of gunshot detection algorithms,” IEEE Trans. Circuits Syst.

58(2), 363–373 (2011).21H. Zhao and H. Malik, “Audio recording location identification using

acoustic environment signature,” IEEE Trans. Inf. Forensics Secur. 8(11),

1746–1759 (2013).22P. Bevington, Data Reduction and Error Analysis for the Physical

Sciences, 1st ed. (McGraw-Hill, New York, 1969), pp. 1–336.23D. L. Sackett, “Why randomized controlled trials fail but needn’t: 2.

Failure to employ physiological statistics, or the only formula a clinician-

trialist is ever likely to need (or understand!),” Can. Med. Assoc. J.

165(9), 1226–1237 (2001).24M. Hughes, J. McCarthy, P. Bruillard, J. Marsh, and S. Wickline,

“Entropic vs. energy waveform processing: A comparison based on the

heat equation,” in Proceedings of the Fall 2014 Acoustical SocietyMeeting (ASA, Melville, NY, 2014).

25National Center for Education Statistics, Digest of Education Statistics (U.

S. Department of Education, Alexandria, VA, 2015), Chap. 2.

J. Acoust. Soc. Am. 139 (5), May 2016 Luzi et al. 2731

Redistribution subject to ASA license or copyright; see http://acousticalsociety.org/content/terms. Download to IP: 128.252.66.144 On: Mon, 13 Jun 2016 21:16:14