AN2384 Freescale Semiconductor / Motorola, AN2384 Datasheet - Page 8

no-image

AN2384

Manufacturer Part Number
AN2384
Description
Generic Tone Detection Using Teager-Kaiser Energy Operators on the StarCore SC140 Core
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
DTMF Detector on StarCore
The following pseudo-code details the proposed method:
4
This section describes how the DTMF detector is implemented on the StarCore SC140 core. It highlights both the
advantages of the SC140 core for this application and the mechanisms added to make it compliant with DTMF
standards.
A telephone keypad is represented in Figure 4 with the corresponding DTMF frequencies (in Hertz). The values in
the top left corner are the actual digits, whereas those in the bottom right corner are the encoded digits within the
detection algorithm. In this internal code, the 0 value corresponds to invalid DTMF tones, such as noise or voice
signals.
8
DTMF Detector on StarCore
Generic Tone Detection Using Teager-Kaiser Energy Operators on the StarCore SC140 Core, Rev. 1
Figure 3
Select m = m old as the first guess and initialize all variables;
For every sample of the signal x(n), do:
End
Compute the energy operator of x(n);
Smoothen the result with an LPF of parameter
If the magnitude of P x is larger than P 1
Else
End
For every component c, do in parallel:
End
If the magnitude of P x is larger than P 2
End
Apply decision logic and report a valid detection event on m det ;
Set m = 0 and clear detection counter;
Filter x(n) with a comb filter with parameters c, r and generate x c (n);
Filter x c (n) with a moving average of lag 2;
Take the result of the moving average and compute its energy operator;
Compute the energy operator of x c (n);
Smoothen the two energy operators with an LPF of parameter
Use polynomial approximation to estimate
Smoothen
Find the closest reference point to the current frequency estimates
and define a new guess m = m new ;
If m new is equal to m old
Else
End
m old = m new ;
Increment detection counter;
If detection counter is large enough
End
Clear detection counter and choose
choose
(m)
c
and
=
1 ;
Ac
(m)
with an LPF of parameter
to obtain P x ;
=
(m) and
c
0 ;
Freescale Semiconductor
Ac
(m) ;
;
;

Related parts for AN2384