2014 14th International Workshop on Acoustic Signal Enhancement (IWAENC)

TRAFFIC MONITORING WITH AD-HOC MICROPHONE ARRAY
Takuya Toyoda1 , Nobutaka Ono2,3 , Shigeki Miyabe1 , Takeshi Yamada1 , Shoji Makino1
1

2

University of Tsukuba, 1-1-1 Tennodai, Tsukuba, Ibaraki, 305-8577 Japan
National Institute of Informatics, 2-1-2 Hitotsubashi, Chiyoda, Tokyo, 101-8430 Japan
3
The Graduate University for Advanced Studies (Sokendai)
toyoda@mmlab.cs.tsukuba.ac.jp, onono@nii.ac.jp,{miyabe, maki}@tara.tsukuba.ac.jp, takeshi@cs.tsukuba.ac.jp
advantage of this approach is that its combination of small
recording devices makes it easy to install. To synchronize
the asynchronous recording channels [7, 8, 9], first we compensate for sampling mismatches by using single source
activity [9]. Next, we analyze the power envelope of eachchannel and detect the peaks to estimate vehicle travel. By
analyzing the time differences between the peaks of the channels, we obtain an estimation of the traffic lane in which thevehicle is traveling. Our experimental results confirm that weachieved highly accurate monitoring.

ABSTRACTIn this paper, we propose an easy and convenient method
for traffic monitoring based on acoustic sensing with vehicle
sound recorded by an ad-hoc microphone array. Since signals
recorded by an ad-hoc microphone array are asynchronous,
we perform channel synchronization by compensating for thedifference between the start and the end of the recording andthe sampling frequency mismatch. To monitor traffic, we estimate the number of the vehicles by employing the peak detection of the power envelopes, and classify the traffic lanefrom the difference between the propagation times of the microphones. We also demonstrate the effectiveness of our proposed method using the results of an experiment in which weestimated the number of vehicles and classified the lane inwhich the vehicles were traveling, according to F-measure.

2. CHANNEL SYNCHRONIZATION
Since the proposed traffic monitoring includes analysis oftime differences, synchronization of the asynchronous recording has to be corrected. In this section, we describe the flowof the synchronization using the two intervals of the recordingof a single source activity proposed in [9].
Assume that sound pressures x1 (t) and x2 (t) on two microphones are sampled by different analog-to-digital converters (ADCs) as x1 (n1 ) and x2 (n2 ), where t and ni (i = 1,2) denote continuous and discrete times series, respectively. Also
assume that the sampling frequency of x1 (n1 ) is fs , and thatof x2 (n2 ) is (1 + ϵ)fs with a non-dimensional number ϵ.
This paper also assumes that the ADCs have common nominal sampling frequencies and |ϵ| ≪ 1. Then, the relations
between xi (ni ) and xi (t) (i = 1,2) is given by( )n1
x1 (n1 ) = x1
,
(1)
fs
(
)
n2
x2 (n2 ) = x2
+ ∆T21 ,(2)(1 + ϵ)fs

Index Terms— Traffic monitoring, ad-hoc microphonearray, synchronization, peak detection
1. INTRODUCTION
Monitoring traffic is important in relation to easing traffic
congestion. Fixed-point observation techniques employ loop
type sensor, ultrasonic sensor, infrared sensor, seismic sensor
and movie cameras. However, these sensing systems sufferfrom high installation and maintenance costs. In addition, theaccuracy of vehicle detection with these sensing systems depends heavily on the sensing condition. For example, withimage processing, the quantity of data becomes enormous andaccuracy degrades at night and in the bad weather. As a result, there has been a need for an easy method of monitoring
traffic.
An effective monitoring approach should be inexpensive
to install and maintain and have little dependence on the sensing environment. Several studies based on acoustic sensing
have already attempted to meet these requirements [1, 2, 3, 4].
In this paper, for aiming easier and simpler sensing system, we present an acoustic traffic monitoring techniquebased on ad-hoc microphone array [5, 6] that combines independent recording devices for multichannel recording. The

where △T21 is the time at which the sampling of x2 (n2 )starts. Here, the sample number that refers to the same time tof channel i (i = 1,2) is given by
n1 = tfs ,(3)n2 = (1 + ϵ)(t − ∆T21 )fs(4)
Then, n2 is expressed with n1 as below,
n2 = (1 + ϵ)(n1 − D21 ),

319

(5)

2014 14th International Workshop on Acoustic Signal Enhancement (IWAENC)

Ch1

A

B

݊୅ଵ

to suppress the background noise and apply smoothing to thepower before peak detection.

n݊஻ଵSingle source activity
A

Ch2
݊஺ଶ

B

3.2. Noise suppression by Wiener filternTo suppress the noise, a standard way is to focus on the difference of the power spectra of target signal and noise. Generally, the sound of vehicles and background noise have different spectra. In this case, Wiener filter is one of the standard
way, which is the optimum linear time-invariant filter in thesense of minimum mean square error. We manually find theframes where the vehicle is traveling and not traveling, and
let SV (ω) and SN (ω) be the average vehicle sound and background noise power spectra, respectively. Here ω = 1, · · · , Ωdenotes the discrete frequency index. We designed the following Wiener filter W (ω), assuming the stationarity of thepower of the vehicle sound and background noise, to enhance
the bands with a high SNR.
SV (ω)W (ω) =.
(10)
SV (ω) + SN (ω)
Then, let Xi (ω, k) be the observed signal at the i-th microphone and an angular frequency ω in the k-th frame, and thenoise suppressed signal X̂i (ω, k) is given asX̂i (ω, k) = W (ω)Xi (ω, k).
(11)

݊஻ଶ

Fig. 1. Two pairs of single source activities
where D21 = ∆T21 fs stands for the discrete time of thefirst channel when the recording of the second channel starts.
Then, we show that both the sampling frequency mismatch ϵand the recording start offset D21 are identifiable if two pairsof times { nA1 , nA2 } and { nB1 , nB2 } correspond to thesame analogue time. These variables have to satisfy the following conditions.
nA2 = (1 + ϵ)(nA1 − D21 ),(6)nB2 = (1 + ϵ)(nB1 − D21 ).
(7)
The conditions identify ϵ and D21 as
nB2 − nA2
− 1,
(8)
ϵ=
nB1 − nA1
nA1 nB2 − nA2 nB1
D21 =
.
(9)
nB2 − nA2
Thus, it is clear that we can obtain estimations of ϵ and D21
based on nAi and nBi . We can obtain estimations of ϵ andD21 . We estimate nAi and nBi by utilizing the relationshipbetween two pairs of single source activities as shown in Fig.
1. We can estimate nAi and nBi by calculating the crosscorrelation functions between each single source activities.
According to the relations between n1 and n2 , ϵ and D21 ,we can compensate for the difference between the start andend of the recording.
Regarding compensation for the sampling frequency mismatch, we apply the linear phase exp(−jf ϵ) to the signalof the second channel in the short-time Fourier transform(STFT) domain
with the sampling frequency mismatch ϵ,√where j = −1 and f denote the frequency, and we obtainthe signal where the sampling frequency mismatch has been
compensated by inverse STFT analysis.

3.3. Gaussian smoothing and peak detection of temporal
power envelope
To count acoustic events, we consider signal power time series Yi (k) given byΩ1 ∑Yi (k) =X̂i (ω, k)X̂i∗ (ω, k),
(12)
Ω ω=1

where {·}∗ denotes a complex conjugation. Even though astraightforward way is to count acoustic events directly from
Yi (k), minute frequent fluctuations appear over Yi (k), which
disturb the count. Hence, to reduce such frequent fluctuations,
we calculate the power envelopes by smoothing. We performsmoothing with a Gaussian-window-shaped filter g(m) given
by
(
)
1
m2
g(m) = √exp − 2 ,
(13)
2σ
2πσ 2

3. ACOUSTIC EVENT COUNTINGThis section establishes a method for estimating the numberof the vehicles according to peak detection of the power envelopes.

where m is the time frame, and σ is the standard deviation of
the Gaussian window. The signal smoothed by the Gaussianwindow-shaped filter Ŷi (k) is given byG

3.1. ApproachŶi (k) =2∑

Yi (k − m)g(m),

(14)

m= −G
2

Since the captured sound power is expected to reach the maximum when vehicle is passing in front of the microphone, we
try to count the number of vehicles by detecting the peaks of
captured sound. However, due to the influence of backgroundnoise and fluctuations of observations, many spurious peaks
appear in the power of raw data. Therefore, it is necessary

where G is the width of the Gaussian window. Even with suchthe smoothing, there still remain many peaks with small values. To ignore such small peaks, we discard the peaks withpowers smaller than a threshold. If Ŷi (k) is the maximum
value and is more than h, let the time of peak k be pi (e),3202014 14th International Workshop on Acoustic Signal Enhancement (IWAENC)

4.5 ○: Time when vehicles arein front of microphones
4:Time of peakin 1st channel:Time of peakin 2nd channel○: Maximum Value

3
2.5

1
power

power

3.5

1.5

2
1.5

1
0.5
0.07 Threshold0
470 480 490

0.5

500 510time [s]

520

0
729

530

729.5

730
time [s]

730.5

731

Fig. 2. Detected peaks with larger power than threshold

Fig. 3. Difference of peaks between channels

where h stands for the threshold, pi (e) for e = 0,· · · , E − 1
stand for the time of the detected peaks at i-th microphone,and E is the total number of detected peaks. The peak detection result is shown in Fig. 2. We confirmed that we cansuccessfully detect peaks only when the vehicles are in frontof the microphones.

ŵŝĐƌŽƉŚŽŶĞ

ŵŝĐƌŽƉŚŽŶĞ

4. TRAFFIC LANE ESTIMATION BASED ON TIME
DIFFERENCE OF POWER PEAKS
Fig. 4. A photo of recording setup

This section establishes a method for estimating in which traffic lane the vehicle is traveling. We use the signals recordedby microphones that are installed in approximately same position of either side of two-lane roads. Since the distance toeach microphone varies depending on the traffic lanes, there
are differences in the propagation times between the two microphones according to the traffic lane in which the vehicles
is traveling as shown in Fig. 3. So, we classify the traffic
lanes in which the vehicle is traveling by using the differences in propagation time. As a first step, we associate two
detected peaks at each microphone derived from the same vehicle. With pi (e) introduced in Sect 3.3, if |p1 (e) − p2 (e)|is less than d, let p1 (e) be p̂1 (e), and p2 (e) be p̂2 (e), wherep̂i (e) stands for the times of associated peaks. Range d isan arbitrary constant, which is determined in considerationof the speed of the traveling vehicle, the width of the road,the distance between microphones, the sampling frequency,
and the frame length of STFT. When there are many peaks
meeting those conditions, we choose peaks whose time difference is minimum. Then, we classify the traffic lane inwhich the vehicle is traveling with the following procedure.
If (p̂1 (e) − p̂2 (e)) is less than 0, we classify the lane as theleft traffic lane. If (p̂1 (e) − p̂2 (e)) is more than 0, we classify
the lane as the right traffic lane.

Microphone
Sound source

Fig. 5. Generating a single source activity for synchronization
5.1. Experimental conditions
We conducted experiment comparing an estimation obtainedwith our proposed acoustic sensing technique and the correct road traffic information regarding the number of traveling vehicles and the traffic lane in which they were traveling.
We recorded the vehicle sounds of vehicles with ad-hoc microphone pairs and a movie to obtain the correct road traffic information on two-lane roads near Tsukuba university as
shown in Fig. 4. In our experiments, we clapped hands at thecenter of the road shown in Fig. 5 and utilized these sounds as
single source activities. We made a ground-truth data basedon the movie and temporal waveform of sound power. Afteromitting intervals containing the sounds of motorcycles or bicycles, we estimated the number of vehicles and their traffic
lanes from the recorded sound by every 60 seconds. For evaluation, we utilized one second interval as a tolerance, whichmeans that the detection within ±0.5 second from the groundtruth was counted as true detection. We evaluated our proposed acoustic sensing technique using F-measure obtained

5. PRELIMINARY EXPERIMENT IN REAL ROAD
ENVIRONMENT
To confirm the effectiveness of our proposed acoustic sensing
technique, we evaluated its accuracy in acoustic event counting and traffic lane estimation.

321

2014 14th International Workshop on Acoustic Signal Enhancement (IWAENC)

2.5
2
power

Table 2. Number of vehicles and detected vehicles(T = True,
F = False)○: Maximum value (Left lane)□: Maximum value (Right lane)□: Time when the vehicles are in frontof the microphones(Left lane)□: Time when the vehicles are in frontof the microphones(Right lane)

1.5

Traveled vehicles
T
F
Detected T 61 8
vehicles
F
3

1
0.5
0
710

720

730

740 750
time [s]760

Table 3. Number of vehicles and detected vehicles in eachtraffic lane

770

Traffic lane

Fig. 6. Experimental result of traffic lane estimation
Table 1. Experimental conditions
Road width
Distance between microphones
Recording time
Sampling frequency
Frame lengths of STFT
Frame shift widths of STFT
Standard deviation σ of Gaussian window
Width of Gaussian window
Threshold hRange d of peak pairing

7.1 m
9.5 m
660 s
48 kHz2048 samples
512 samples
14

Recording devices
Video camera

SANYO ICR-PS603RM
JVC GZ-HM670

Right

Left

Traveled vehicles
T
F
Detected T 22 3
vehiclesF
4

Traveled vehicles
T
F
Detected T 35 4
vehiclesF
3

Table 4. Calculated F-measure
Acoustic event counting
Traffic lane estimation

6σ+1
0.07
38 frames

F-measure
0.91730.89065.3. Experimental result and consideration
Fig. 6 shows estimation results obtained with the proposed
acoustic sensing technique at certain time intervals. The result shows that both acoustic event counting and traffic lane
estimation are performed well by our approach. As regards
the evaluation over all the recording intervals, Tables 2 and3 show the total true number of vehicles, the number of estimated vehicles and the number of correctly estimated vehicles
counted for the two criteria. Table 4 shows the F-measure foracoustic event counting and traffic lane estimation. These results confirmed the appropriateness of the estimation obtainedwith our proposed acoustic sensing technique, based on peakdetection and the time difference between signal power peaks,
because high F-measures were obtained.

from our comparison of the estimation and the correct traffic
information provided by the reference movie. We experimentally determined the parameters σ and h by using the wholedata. Therefore, this is a closed evaluation. An open evaluation is included in future work. The other experimental conditions are shown in Table 1. Because the time differences ofpower envelopes were used, the lane estimation should be robust even if the small mismatch of synchronization remains.

6. CONCLUSION
In this paper, we proposed a new traffic monitoring framework based on the sounds of vehicles traveling recorded withan ad-hoc microphone array. We performed channel synchronization based on single source activity. With our approach,
we estimated the number of vehicles, and classified the traffic lane in which the vehicles were traveling. Since the Fmeasure of the experimental results achieved high values, we
confirmed the effectiveness of our proposed method.

5.2. Calculation of F-measure
F-measure is used as a measure for a comprehensive evaluation of accuracy and completeness.
Nc
precision =
(15)
Ne
Nc
recall =(16)
Nrprecision · recall
2 (precision + recall)

F-measure = 1

7. ACKNOWLEDGMENT(17)

This work was supported by a Grant-in-Aid for Scientific
Research (B) (Japan Society for the Promotion of Science(JSPS) KAKENHI Grant Number 25280069).

where Nc is the correctly estimated number, Ne is the total
estimated number, and Nr is the total true number. F-measure
has a value range of 0 to 1, and a higher value means better
accuracy.

322

2014 14th International Workshop on Acoustic Signal Enhancement (IWAENC)

References[1] N. Shimada, A. Itai and H. Yasukawa, “A study on an
approaching vehicle detection using a linear microphonearray-based acoustic sensing,” IEICE Technical Report
SIS2009-71, pp. 125–128, 2010. (in Japanese)[2] Y. Nooralahiyan, M. Dougherty, D. Mckeown and
R. Kirby, “A field trial of acoustic signature analysis forvehicle classification,” Transpn Res-C, vol. 5, no. 3/4, pp.
165–177, 1997.
[3] M. Sobreira, A. Rodriguez and J. Alba, “Automatic classification of traffic noise,” Proc. IOA, pp. 6221–6226,
2008.
[4] N. Evans and D. Chesmore, “Automated acoustic identification of vehicles,” Proc. IOA, pp. 238–245, 2008.
[5] E. Robledo-Arnuncio, T. S. Wada and B.-H. Juang, “Ondealing with sampling rate mismatches in blind source separation and acoustic echo cancellation,” Proc. WASPAA,
pp. 34–37, Oct. 2007.
[6] Z. Liu, “Sound source separation with distributed microphone arrays in the presence of clock synchronization
errors,” Proc. IWAENC, 2008.
[7] S. Markovich-Golan, S. Gannot and I. Cohen, “Blindsampling rate offset estimation and compensation in wireless acoustic sensor networks with application to beamforming,” Proc. IWAENC, 2012.
[8] S. Miyabe, N. Ono and S. Makino, “Blind compensation of inter-channel sampling frequency mismatch withmaximum likelihood estimation in STFT domain,” Proc.
ICASSP, pp. 674–678, 2013.
[9] R. Sakanashi, N. Ono, S. Miyabe, T. Yamada and
S. Makino, “Speech enhancement with ad-hoc microphonearray using single source activity, ” Proc. APSIPA, pp. 1–6,
2013.

323