You are on page 1of 1

5.

Results
The processing time from the detection of an impulsive signal to the output of its DoA is currently
within 1.5 seconds, in many applications a derisive waiting time for possible responses actions to
be taken by the user. Tests were performed with the system in a laboratory measuring around 45
meters using gunshot recordings played on a sound box model Yamaha MSP3. A loudspeaker was
used to ensure a xed position to a burst of impulsive signals of same characteristic. The speaker
was placed (with precision of less than 1 degree) in azimuths 45, 135, 225 and 315 degrees, and 20
shots were "red"at each position.
The system is highly accurate and fully functional, with a maximum absolute error of 0.2 degree.
The system also has a conditional structure which checks whether the cross-correlation of signals
from a pair of microphones is maximized by an argument outside the range of values that are ex-
pected, which is given by the distance between microphones in that pair (which can happen in cases
of presence of signicant noise, for example), and then discards the result of this specic pair and
keeps the rest. This contributes to a better overall system accuracy. Factors such as high proces-
sing capacity and the possibility of simultaneous sampling of all seven microphones signals were
extremely important for the correct operation of the system. The courses offered by National Instru-
ments and the easy programming environment of LabVIEW to implement the various functions and
algorithms, both detection and direction of arrival estimation, allowed the successful development
of this project on a tight time frame (3 months).
Once an impulsive signal is detected, the signals from all seven microphones are queued in a new
FIFO, which will be transferred to another loop; this non-deterministic loop processes the signal
through the DoA estimation algorithm implemented in the controller. This second loop has no
constrained time of execution, performing its tasks as the deterministic loop (priority) releases the
processing resources. This does not affect the detection of consecutive signals, as they are stored in
the FIFO between the two loops.
2
3
4
5 6 7 8
9
10
11 12 1
Direcao da
fonte do sinal
Controller
variables
Deterministic loop
Detection of the signal
signals Aquisition modules
FPGA
Notebook
Preamp
Rack
DMA
F
I
F
O
F
I
F
O
Direction of
arrival
sound
wave
electric
signal
Debug
and
Interface
Non-deterministic loop
Processing of DoA algorithm
The results of the DoA estimation algorithm (azimuth and elevation of the incident soundwave) are
transmitted through variables to a notebook via an Ethernet connection, the results being shown on
the screen in a user-friendly interface, which also allows debugging of possible runtime errors. It is
noteworthy that all the processing is done in hardware (cRIO), and that the notebook is used only
as an interface. To make the system more compact, the interface could be performed directly by
the cRIO through LED indicators of the direction of arrival or an LCD display embedded in the
equipment itself, eliminating the use of the notebook.
4. Description of the system
The signals from all microphones enter the acquisition modules of cRIO, and are digitized simulta-
neously at a rate of 51.2 kHz. After sampled, the data is queued by the FPGA, which is physically
connected to the acquisition modules. This type of queuing used is rst in - rst out (FIFO). Data
from the FIFO buffer is transmitted by the FPGA bus to the controller via direct memory access
(DMA). Once at the controller, the data from one microphone (the upright one) is handled by a
routine that runs a detection algorithm in a deterministic loop, which has a known execution time
that is maintained at each iteration, as is characteristic of real time systems. This execution time is
fast enough to avoid the overow from the FIFO and consequent loss of data, which could cause
failure in detecting an impulsive signal.
3. Hardware and software used
Hardware:
NI cRIO-9022, embedded real-time controller;
NI cRIO-9112, eight-slot, recongurable embedded chassis with FPGA core;
Two NI 9234, dynamic signal acquisition module.
Software:
LabVIEW 2012;
LabVIEW 2012 Real-Time Module;
LabVIEW 2012 FPGA Module.
2. The spatial array
The spatial array consists of seven microphones. The sounds are collected by the array of micropho-
nes and conditioned by a PreSonus FIREPOD, which works like a pre-amplier and also provides
the phantom power to the microphones, preparing signals to be sampled by the acquisition modules
of cRIO. Azimuth and elevation angles dene the direction of arrival of the wave generated by the
signal source.
z
azimuth
x
ECM 800
y
3
4
6
7
2
5
1
planar sound wavefront
elevation
1. Objective
To implement a system for real-time detection and estimation of the Direction of Arrival (DoA) of
impulsive audio signals.
Abstract
This work presents a system for real-time detection and estimation of the Direction of Arrival (DoA)
of impulsive audio signals, specically signals of gunshots. The NI hardware and a 3-dimensional
array of seven microphones were used for the acquisition and real-time processing of the signals.
Once detected the event (impulsive signal), its DoA is estimated using Generalized Cross Corre-
lation (GCC) with Phase Transform weights (PHAT) to measure the Time Difference of Arrival
(TDoA) between pairs of microphones. Parameterized predictions of TDoAs are compared to ac-
tually measured TDoAs such that the parameter can be obtained by a Least-Squares minimization.
Using real-time techniques, there is no loss of information from the environment for the processes
of signal detection and DoA estimation occur in parallel. This work is an initial step towards a
larger system aiming at locating snipers.
IME Lab. Processamento Digital de Sinais
Paulo C. Prandel

, Izabela L. Freire

and Jos A. Apolinrio Jr.


,
Military Institute of Engineering (IME):

Program of Electrical Engineering and

Program of Defense Engineering
Rio de Janeiro, RJ - Brazil
pauloprandel@hotmail.com , izabela.lyon.freire@gmail.com and apolin@ime.eb.br
Real-time detection and source location of impulsive audio signals