Ambulance Siren Detector using FFT on dsPIC

The purpose of this study is to make software of equipment that detects siren sound of ambulance and to program it on a microcontroller in the equipment. By using two times FFT (Fast Fourier Transform) on detecting, the characteristics of the siren sound could be converted into numerical values. Siren sound was detected properly even under the Doppler effect. The proposed method could detect the siren sound in which S/N ratio is approximately 0 dB.


Introduction
Now automobile traffic is one of the most important transportation.When a traffic accident occurs, emergency vehicles such as ambulances and police cars must hurry to the accident scene.However, some of the emergency vehicles may cause another traffic accident (1) .
Such accident is caused by delay in recognizing of siren sound (2)(3)(4)(5) .It is not limited to elderly drivers or impaired ear drivers.More and more cars are made of soundproof material.In addition, volume of siren sound itself is being reduced due to noise problem.
We attempted to make an algorithm that detects siren sound of ambulance and to program it on a microcontroller in a detecting device.
There are related studies Morishita and et al. proposed a siren detection system, but it uses high performance personal computer (6,7) .The aim of this study is to realize low-cost small equipment specialized in detecting siren sound of ambulance by using frequency analysis on microcontroller.

Overview of Hardware
Figs. 1 and 2 show the appearance of the main unit and the microphone respectively.The developed equipment was supposed that its main unit was put in a car and a microphone was put on the car roof.The main unit had a power switch, a button, a buzzer, and a liquid crystal  display as the interface.For signal processing, a microcontroller dsPIC30F6012A and a codec IC SI3000 were used.The microphone was covered by a plastic shade in order to avoid wind and rain.This equipment was driven by DC 5 volts supplied from car battery.

Development Environment
The devices used for programming and the main specifications of dsPIC30F6012A are shown in Table 1 and Table 2 respectively.

Siren Sound to Be Detected
The siren sound of ambulance in Japan is defined by Japanese law (8) .The siren sound repeats two tones.The tones are 960 Hz and 770 Hz, and these are repeated 1.3 sec period.Fig. 3 shows a spectrogram of the siren sound.
The siren sound affected by the Doppler effect and varies its frequency.The frequency varies up to 1.178 times when ambulance and observer car are approaching at a speed of 100 km/h each other.

Analyzing Method
Fig. 4 shows the method of analyzing periodicity.The siren sound of ambulance has two characteristics.One is that the sound has two different frequencies and the other is that each tone periodically sounds on and off.Using FFT, these two characteristics can be converted into numerical values.
This analyzing method consists of two steps.The first   In first step, the input signal is sound pressure sampled by a microphone.It is sampled in the sampling rate of 2,400 Hz and is applied 64 point FFT.Therefore the amplitudes and phases are obtained about each 37.5 Hz bandwidth.
In second step, the input signals are numerical values of amplitudes obtained in first step.For each band, the amplitude is sampled in the sampling rate of 2.34 Hz and is applied 16 point FFT.Therefore the amplitudes and phases of amplitude change are obtained about each 0.14 Hz bandwidth.

Determination Method
By using the obtained numerical values, whether the input sound is siren or not can be determined.The characteristics of ambulance siren sound have three particular relations.They appear in the way shown in Fig. 5 as shaded areas.These areas have a constant gap of pitch frequency, a same amplitude change frequency, and an opposite phase about the amplitude change.These areas move under the Doppler effect within the square area enclosed by a bold line shown in Fig. 5.By checking whether this area contains the areas that satisfy the three relations, the input sound can be determined siren or not.

Results
This equipment was tested by using actual siren sound of ambulance and white noise generated by a computer.The sounds shown in Figs. 6 to 9 were used as input sound.When silent sound as shown in Fig. 6 was input, this equipment did not show anything.When siren sound as shown in Fig. 7 was input, this equipment could detect siren sound.When noise as shown in Fig. 8 was input, this equipment did not show anything.When a sound mixed with siren sound and noise as shown in Fig. 9 was input, this equipment could detect siren sound.These results show that siren sound of ambulance was detected properly.The cases under the Doppler effect were also tested and the same results were obtained.Various S/N ratios of siren sound and noises were used for test, and the lower limit of detecting was found to be 0 to -5 dB.On average, it needed around 8 sec for detecting.

Conclusions
From the experimental results, it was found that the characteristics of siren sound of ambulance could be detected by using two times FFT.This detecting method worked properly even under the Doppler effect.The lower limit of detecting was approximately 0 dB.As future works, it needs to reduce detection time lag and improve of detection accuracy.The proposed method seems to be applicable to detecting a police car siren or a fire-fighting vehicle siren.We need to test whether these applications work properly.

Fig. 5 .
Fig. 5. Characteristics of the siren appear in the frequency.

Table 1 .
Devices used for programming.