Vehicle Counting and Motion Direction Detection Using Microphone Array

—This paper describes a method for counting the vehicles and estimating the direction of their motion using three equidistantly spaced microphones. Paper outlines hardware and software design. Algorithm is based on sound delay estimation between microphones. To implement vehicle counting, sound wave arrival angle is calculated from the derived delays. All measurements and tests took place in real traffic flow under different weather conditions.


I. INTRODUCTION
Increasing number of vehicles demands to develop more sophisticated traffic management systems.To manage the traffic, these systems require different types of information about vehicle (count, speed, line occupation etc.).To gather such information invasive or non-invasive sensors can be used for vehicle detection.Non-invasive sensors application for traffic monitoring and counting are becoming more and more popular in today's traffic organisation and intelligent traffic systems.Main advantages over the invasive sensors are: easier installation and maintenance without disturbing the flow of traffic.
One of the ways of gathering information about traffic flow is to record sound of moving vehicles by applying microphone arrays and use signal processing to extract information about vehicle.Microphone arrays belong to non-invasive sensor group.Acoustic sensor can be a single microphone for detecting the emergency vehicle or the arrays of multiple microphones can be used for vehicle motion direction detection, counting and classification.Roads are noisy environment with different types of noise sources (car tires, engines, different types of car moving parts and wind noises).One of the advantages of microphone arrays, compared to the video registration, is that they can deliver reasonable performance in night and in limited visibility conditions.
Moving vehicle noise depends on vehicle speed.Most of noises coming from moving vehicles are noises from tires, noises generated by vehicle aerodynamics and noises Other noise strongly depends on the vehicle type.Vehicles of the same type under identical condition are emitting similar acoustic signals.By changing vehicle speed and road conditions the emitted signals will differ.There is also difference in the emitted sound from the heavy and light vehicles.The microphone array receives a mixture of vehicle acoustic emissions and ambient noise.Ambient noise (for example wind) can be filtered by hi-pass filter.It is possible to extract spectral features from the signals recorded from moving vehicles.These spectral features describe vehicle properties like: motion direction, count, also classification (heavy, lightweight, emergency vehicle etc.).

II. RELATED WORK
There are many articles and research in the field of microphone array signal processing with applications in speech recognition, speech extraction applying acoustic beam-forming and cross power spectrum phases analysis algorithm [1], [2].
The use of microphone array or single microphone in traffic management is not a new idea.There are many studies of microphone arrays applications for vehicle detection [3]- [6].Many articles examine single microphone or microphone array application of the vehicle detection and counting.For example paper [7] describes tests in Tintersection with the microphone array consisting of six microphones.The detection results obtained with weighted sum of cross-correlation functions are compared by two conventional methods used for microphone array signal processing.The article [8] describes different vehicle emitted sound parameterization methods which can be used in classification systems.Some articles describe the road condition detection, like frozen, dry or wet using single microphone.Article [9] describes experiments with single microphone for ice detection on the road surface.An interesting method is the microphone placement on the moving vehicle close to the wheel.Also emergency transport presence and approaching direction detection from sirens can be obtained using single microphone or microphone array if necessary [10], [11].All of the mentioned applications have similar approaches based on the sound delay estimation.

III. VEHICLE COUNTING ALGORITHM
Proposed vehicle counting algorithm consists of several steps which are illustrated in Fig. 1.The first step is to find delays between microphones, which is the most important part of the vehicle counting algorithm.Delays are estimated in relation to the reference channel by applying (Generalized cross-correlation (GCC)) method [12].The second microphone is chosen as a reference channel.In calculations far field assumption is applied.We assume that propagating sound waves are plane waves, neglecting curvaceous sound wave properties.This assumption simplifies the estimation of a car sound arrival angle by applying relatively simple geometric calculations (Fig. 2) using (1) based on estimated delays, where θ is angle in radians, τ is estimated delay in seconds, c -acoustic velocity (343 m/s) and d -distance between microphones After calculating the absolute values of sound arrival angle, the peaks which represent the vehicle presence are found.To filter calculated angle values threshold is applied.Threshold value is 70 degree, it was found experimentally.In further calculations only components above 70 degree are used (all components under 70 degree are removed).To prevent false peaks appearance above 70 degree we use nearest peaks neighbour analysis.One angle value calculation is performed on 250 ms of signal length (window size).The window moving step is equal to window length.In this time interval vehicle travels 6 meter distance.If motion speed is 90 km/h, that corresponds from 0 -20 degree angle deviation.This angle deviation depends on the location of vehicle in the relation to the microphone array.If two closest neighbour angle values differ more than deviation of 20 degree we conclude that it is not the vehicle.After this operation algorithm calculates motion direction.
The first step of vehicle motion direction estimation is to calculate first order derivative from the obtained delays.
First order derivative represents the rate of change of the delays.From the values of the low and high levels of the first order derivative vehicle motion direction is estimated.Low and high thresholds are empirically obtained.

IV. HARDWARE DESIGN AND IMPLEMENTATION
To record the sound emitted by the vehicle data collecting device were designed.Device consists of three WM7110 MEMS (Micro-electromechanical systems) analogue microphones, amplifier and hi-pass filter.The first tests were performed using analogue capacitive microphones but because of the large parameter dispersion these sensors were not used in the final prototype.Analogue filter is used to filter frequencies under 400 Hz.This frequency band is chosen because vehicles radiate nose above this frequency but most of the wind noise components are below this frequency.In our prototype microphones are equidistantly spaced with 10 cm interval (Fig. 2: d1 and d2).This distance depends on sound wavelength.AD1974 ADC is used to process analogue signals with 48 kHz sampling frequency.ADC is connected to ALTERA Cyclone III board via I2S interface.All data is sent to PC for further processing via USB interface.
Sound signal processing algorithms are developed using Matlab.Designed system block diagram is illustrated in Fig. 3.In this development stage hardware architecture provides only non -real time implementation.The second prototype is planned as standalone device including vehicle counting, direction detection and vehicle classification features.

V. MEASUREMENTS AND EXPERIMENTAL RESULTS
All sound recordings of the moving vehicles were performed on two lane highway approximately 400 meters from traffic light.Microphone array was located parallel to the road about 6 m from first lane and 1 m above the ground.Flow of the vehicles is grouped because of the regulated intersection.Designed microphone array prototype is displayed in Fig. 4. Approximately two hours of traffic flow were recorded under different weather conditions (rain, windy, wet pavement, sunny).A recording mostly consists of sounds from heavy vehicles with trailers (about 65%).The average speed of all vehicles is about 70-100 km/h.In addition to the sound, video recordings were made to capture vehicle movement for comparison purposes.Video camera was fixed above microphone array on a tripod.
Figure 5 illustrates the sound signal that was emitted by the vehicles and recorded with one of the three microphones.This test was performed in sunny day in low wind and dry pavement condition.Average speeds of the vehicles were about 90 km/h (25 meter per second).Figure 5 displays a signal filtered using 0,4 kHz hi-pass analog filter.In this case displayed sound signal is emitted from nine vehicles.From the graph with the recorded sounds, it can be seen that the vehicles moving near the microphone from 25 to 35 second can't be detected without data processing.There are four moving vehicles at this time interval.The following pictures from 6 to 10 are signal processing results obtained from signal displayed in Fig. 5.
Figure 6 illustrates the spectral estimate of the sound emitted by the vehicles.The spectral estimate is obtained using Short time Fourier transform (STFT).Figure 6 displays that the most of the spectral components are in frequency range from 0,4 to 3 kHz.As mentioned earlier, before analog signal sampling first order hi-pass filter is used.A small part of signal spectral energy emitted by the vehicles is above 3 kHz.Using ideal FFT filter all spectral components above 5 kHz were filtered and using IFFT ideally filtered signal spectrum were transformed back to time domain.That was done for experimental purposes to test which of the spectral components are important for vehicle detection.When delays and angle of the sound arrival was calculated random peaks appeared in result which generates false positive error in vehicle detection.Identical experiment using ideal FFT low pass filter were performed at 10 kHz cutoff frequency.
This experiment using ideal FFT filter with different cutoff frequencies showed that vehicle emitted sound spectral components over 3 kHz which energy is small compared to components below 3 kHz are significant for sound arrival angle detection.This aspect is important for choosing sampling frequency.In our experiments we tested different sampling frequencies: 10 kHz, 15 kHz, 24 kHz and 48 kHz.The best results are achieved using 48 kHz sampling frequency.
Figure 7 displays signal energy emitted by the vehicle that can also be used to detect vehicle presence.Disadvantage of this method is poor vehicle detection when object distance is small.An experiment shows that this distance is in range of 10 meters.The video recording shows that in time interval from 25 to 35 second four vehicles passed by microphone array but only three of them were detected using spectral energy estimation (Fig. 7).
Proposed method for vehicle counting by estimating angle of arrival in time interval from 25 to 35 second finds all four vehicles (Fig. 10).The analyzed one minute signal (Fig. 5) contains (ground truth) nine vehicles.In this case our method discovers all nine vehicles.If random noise is present it is filtered by applying closest neighbour angle elimination method, described in third section of paper.
The second part of algorithm describes motion direction detection.Figure 8 displays acoustic signal (Fig. 5) delays from two microphones.The delays are obtained using GCC method [12].The first order derivative is applied to calculate slope of delays.The direction of motion is obtained by comparing the peaks of calculated delay derivatives.The first vehicles direction is obtained by the value of delay.Positive delay means the car is approaching from the right direction, negative -from left.If the first peak of derivative is smaller than the second then vehicle is approaching from the same direction as the first vehicle.Figure 10 illustrates vehicles sound arrival angle in relation to microphone array.Circled points show detected vehicles.

VI. CONCLUSIONS
This paper proposes the real traffic detection method using three equidistantly spaced microphones.Proposed method includes vehicles counting and motion direction detection.The method is based on the sound delay estimation of the moving vehicle.Sound delay and sound waves angle of arrival are estimated by using three microphones.
Tests were carried out on the highway outside the city and other populated areas.The tests were made in different weather conditions, except snowing.About 2 hours of recordings were analysed.Vehicle counting results are summarized in Table I.In total 871 vehicles (ground truth) were counted based on the analysed video recordings of 2 hours.False positive detection results occur in strong wind weather conditions; also wet pavement is the source of false positive result.False negative result detection was observed when multiple vehicles pass in front of the microphone array.Situations such overtaking, small distance withholding are also false negative detection reasons.In case when vehicle speed is approximately 90 km/h the smallest distance between vehicles for counting algorithm is 7 -10 m.
The accuracy of motion direction is 65 percent.The precision was calculated based on recorded video.Motion detection accuracy is lower than vehicle counting accuracy because distances between vehicles in this case have to be longer than 10 meters (in case of light vehicles).Because all traffic data where acquired approximately 400 m from regulated intersection, distance between vehicles in many cases are smaller than 10 meters.
This approach showed that heavy vehicle emitted noise suppresses immediately followed light vehicle sound if the distance between objects is smaller than 10 meters.This distance between heavy and light vehicles strongly depends on window size taken to compute angle of sound arrival.If two cars approaches from both sides and meets in front of microphone array only one car is detected.

Fig. 1 .
Fig. 1.Block diagram of vehicle counting and direction detection algorithm.

Fig. 3 .
Fig. 3. Block diagram of designed system for vehicle detection.

Fig. 5 .
Fig. 5.One minute recording of highway traffic sound with two lanes.

Figure 9
Figure 9 illustrates estimated delays and first order derivative of one minute traffic flow on highway.

TABLE I .
VEHICLE DETECTION RESULTS.