Automatic Detection of Emergency Vehicles

« back to results for ""
Below is a cache of http://www.ti.com/sc/docs/general/dsp/festproceedings/fest2000/automatic.pdf. It's a snapshot of the page taken as our search engine crawled the Web.
The web site itself may have changed. You can check the current page or check for previous versions at the Internet Archive. Yahoo! is not affiliated with the authors of this page or responsible for its content.
Automatic Detection of Emergency Vehicles




Automatic Detection of Emergency Vehicles
for Hearing Impaired Drivers


Sung-won Park and Jose Trevino
Texas A&M University-Kingsville, EE/CS Department, MSC 192, Kingsville, TX 78363
TEL (361) 593-2638, FAX (361) 593-2110, e-mail:park@tamuk.edu



Abstract In this paper a simple algorithm to detect an emergency vehicles siren using the linear
prediction is presented. By measuring the means and variances of the reflection coefficients in a pre-
selected number of successive frames, automatic detection of emergency vehicles siren is possible. It
has been shown that only two coefficients are enough for successful detection. Due to the simplicity
of the algorithm, it can be implemented easily on any Texas Instruments TMS DSPs.

Keywords




linear prediction, reflection coefficients, pattern recognition.

* This research was supported by NASA Grant Number NAG 9-1093.

I. Introduction
Hearing impaired drivers or drivers who set the volume of their cars audio system very high
cannot hear when an emergency vehicle, such as police car, fire engine, or ambulance, approaches. This
may result in a collision or unnecessary delay. We propose an algorithm that can automatically detect an
emergency vehicles siren. It can be implemented easily on any TMS DSPs. Once detection is made, it
may be displayed visually on the dashboard, in practice.
The siren usually has several dominant frequencies that typically last for several seconds.
However, because of the Doppler effect, the frequencies are maintained within a tolerance for tens or
hundreds of milliseconds. To find dominant frequencies, the linear prediction model is used. Linear
predictive coding [1] has been very successful for speech coding and efficient Durbins recursive algorithm
is used to find prediction coefficients. If the coefficients are maintained within a pre-selected tolerance for
a pre-selected time, detection is made. In section II, the linear prediction is introduced. Efficient Durbins
method to compute linear prediction coefficients is explained in section III. The algorithm to detect a siren
and some simulation results are explained in section IV. Finally, the conclusions are made in section V.


II. Linear Prediction

In a variety of applications, it is desirable to compress a speech signal for efficient transmission or
storage. For medium or low bit-rate speech coders, linear predictive coding (LPC) [1] is most widely used.
Redundancy in a speech signal is removed by passing the signal through a speech analysis filter. The
output of the filter, termed the residual error signal, has less redundancy than original speech signal and can
be quantized by smaller number of bits than the original speech. The residual error signal along with the
filter coefficients are transmitted to the receiver. At the receiver, the speech is reconstructed by passing the
residual error signal through the synthesis filter. To model a human speech production system, the linear
prediction model is used. This model not only works well for the speech but also for any kind of signal.
Assume that the present sample of the signal is predicted by the past P samples of the signal such
that


1
2
1
( )
(
1)
(
2)
(
)
(
)
P
P
m
m
x n
b x n
b x n
b x n P
b x n m
=
=
+
+
+ =
%
L

(1)



where ( )
x n
%
is the prediction of x(n), x(n k) is the k</i>-th step previous sample, and {b
m
} are called the linear
prediction coefficients. The error between the actual sample and the predicted one can be expressed as


1
( )
( )
( )
( )
(
)
P
m
m
n
x n
x n
x n
b x n m
= = = %
.




(2)

The sum of the squared error to be minimized is expressed as


2
2
1
( )
( )
(
)
P
m
n
n
m
E
n
x n
b x n m
=
= = .




(3)

We would like to minimize the sum of the squared error. By setting to zero the derivative of E with respect
to b
m
, one obtains


1
(
)
( )
(
)
0
P
m
n
m
x
n k x n
b x n m
= =
for k = 1, 2, 3, , P.
(4)

Equation (4) results in P unknowns in P equations such that


1
2
(
) (
1)
(
) (
2)
(
) (
)
P
n
n
n
b
x n k x n
b
x n k x n
b
x n k x n P + +
+ L



=
(
) ( )
n
x n k x n
for k = 1, 2, 3, , P.
(5)

Let us assume that the signal is divided into frames each with N samples. If the length of each frame is
short enough, the signal in the frame may be stationary. If there are N samples in the sequence indexed
from 0 to N</i>-1 such that {x(n)} = {x(0), x(1), x(2), , x(N</i>-2), x(N</i>-1)}, Equation (5) can be expressed in
terms of matrix equation.


1
2
1
(0)
(1)
(
2)
(
1)
(1)
(1)
(0)
(
3)
(
2)
(2)
(
2)
(
3)
(0)
(1)
(
1)
(
1)
(
2)
(1)
(0)
( )
P
P
b
r
r
r P
r P
r
b
r
r
r P
r P
r
b
r P
r P
r
r
r P
b
r P
r p
r
r
r P = L
L
M
M
M
O
M
M
M
L
L

(6)

where


1
0
( )
( ) (
)
N
k
n
r k
x n x n k

=
=
+ .






(7)


To solve the matrix equation (6), the Durbins method described in the next section is used.


III. Durbins Recursive Method

The sum of squared errors of the P</i>-th order prediction (or simply the P</i>-th order prediction error)
in Equation (3) can be rewritten as




1
( ) ( )
(
) ( )
P
P
m
n
n
m
E
x n
n
b x n m
n
=
=





(8)

where the subscript P of E
P
denotes the order of prediction. Equation (4) can be rewritten as

(
) ( ) 0
n
x n m
n =
for
m = 1, 2, 3, , P.




(9)


Because of Equation (9), the second summation of Equation (8) is zero. Thus, the final expression of the
prediction error becomes


1
( )
( )
(
)
P
P
m
n
m
E
x n x n
b x n m
=
=






(10)


= r(0) b
1
r(1) b
2
r(2) b
P</i>-1
r(P 1) b
P
r(P) =
1
(0)
( )
P
m
m
r
b r m
=
.

We now want to develop a recursive method to solve Equation (6). Let us start from the order P = 0 and
increase it until the desired order reaches. When P = 0 (i.e., when no prediction is made), the error is
expressed from Equation (10).


E
0
= r(0).








(11)

When P = 1, the error is expressed as


E
1
= r(0) b
11
r(1)







(12)

where the second subscript 1 of b
11
indicates that the prediction order P in this case is 1. The solution of
Equation (6) is


b
11
= r(1)/r(0) = 1








(13)


where 1
is termed the reflection coefficient. Note that magnitude of 1
is less than 1 (
|
1
|
<1) as
|
r(1)
|
is
less than r(0). Now the prediction error for P = 1 becomes


E
1
= r(0) 1
r(1) = r(0)[1 12
] = E
0
[1 12
].




(14)


One can see that the prediction error E
1
is smaller than E
0
.
When P = 2, Equations (10) and (6) can be combined in a single matrix equation


2
12
22
(0)
(1)
(2)
1
(1)
(0)
(1)
0
(2)
(1)
(0)
0
r
r
r
E
r
r
r
b
r
r
r
b

=










(15)


Assume that the solution can be found recursively as shown below.


12
11
2
11
22
1
1
0
0
1
b
b
b
b

=








(16)


where 2
is the second reflection coefficient. The subscript 2 of b
12
and b
22
indicates that these are the
second order linear prediction coefficients. Using Equation (16), Equation (15) becomes




1
2
2
11
2
11
2
2
1
(0)
(1)
(2)
1
0
(1)
(0)
(1)
0
0
0
(2)
(1)
(0)
0
1
0
r
r
r
E
q
E
r
r
r
b
b
r
r
r
q
E


=

=




(17)


where


q
2
= r(2) b
11
r(1).







(18)


Because q
2
2
E
1
= 0 from Equation (17), the second reflection coefficient becomes

2
= q
2
/E
1
.








(19)


The new prediction error for P = 2 becomes


E
2
= E
1
2
q
2
= E
1
[1 22
].






(20)


The linear prediction coefficients can be obtained using Equation (16) such that


b
12
= b
11 2
b
11
and b
22
= 2
.






(21)

Now the recursive solution method for any prediction order P is described below.
Initial values:

E
0
= r(0)

b
11
= 1
= r(1)/E
0


E
1
= E
0
(1 12
).
With p 2, the following recursion is performed
(i)

q
p
= r(p)
1
(
1)
1
(
)
p
m p
m
b
r p m
=

(ii)
p
=
(
1)
p
p
q
E
(iii)

b
pp
= p

(iv)

b
mp
= b
m(p</i>-1)
p
b
(p-m)(p</i>-1)
for m = 1, , p 1
(v)

E
p
= E
(p</i>-1)
[1 p</i>2
].

(vi) If p < P, then i