Reply by jadhav_rahul July 26, 20082008-07-26
>> thanks to all, >> but can anyone guess the significance of part >> >> if ( r[max_index] > 1.0e9 ) >> =A0 =A0 =A0 t =3D r[max_index] * 0.158; >> =A0 =A0 else >> =A0 =A0 =A0 t =3D r[max_index] * 0.010; >> >> in above code? > >That entire signal to noise test is bogus. The spec says the detector >must work for an SNR as poor as 16dB. It doesn't insist on not >detecting when things are worse. What you really need to achieve is a >low false detect rate with heavy voice testing - e.g. by testing >against the Bellcore/Telcordia test tapes. > >You asked abut 2nd harmonic assessment. A lot of DTMF decoder app >notes perform second harmonic tests, but you can achieve superior >results without doing that. Applied intelligently, "the sum of the >energies in the two dominant spectral lines must be a big percentage >of the the total" is a very effective strategy. However you applied >these heuristics, you have to allow for a) the decoder is used on a >line where dial tone spillback will pollute the first digit or b) the >decoder is trying to detect in the presence of an outgoing voice >prompt spilling back. In case a) a dial tone filter can do the trick. >In case b) you will only get great results if you echo cancel away the >voice. > >I have never found an app note design for DTMF decoding that will get >through any reasonable set of performance tests. You have to work at >that. > >Regards, >Steve >
Thanks steve, can anyone suggest any c code fulfilling all energy level requirments? whats your opinion on tone_detect.c from astrisk spandsp library ? Regards, Rahul.
Reply by July 26, 20082008-07-26
> thanks to all, > but can anyone guess the significance of part > > if ( r[max_index] > 1.0e9 ) > � � � t = r[max_index] * 0.158; > � � else > � � � t = r[max_index] * 0.010; > > in above code?
That entire signal to noise test is bogus. The spec says the detector must work for an SNR as poor as 16dB. It doesn't insist on not detecting when things are worse. What you really need to achieve is a low false detect rate with heavy voice testing - e.g. by testing against the Bellcore/Telcordia test tapes. You asked abut 2nd harmonic assessment. A lot of DTMF decoder app notes perform second harmonic tests, but you can achieve superior results without doing that. Applied intelligently, "the sum of the energies in the two dominant spectral lines must be a big percentage of the the total" is a very effective strategy. However you applied these heuristics, you have to allow for a) the decoder is used on a line where dial tone spillback will pollute the first digit or b) the decoder is trying to detect in the presence of an outgoing voice prompt spilling back. In case a) a dial tone filter can do the trick. In case b) you will only get great results if you echo cancel away the voice. I have never found an app note design for DTMF decoding that will get through any reasonable set of performance tests. You have to work at that. Regards, Steve
Reply by jadhav_rahul July 26, 20082008-07-26
>julius wrote: >> On Jul 25, 6:24 am, "jadhav_rahul" <rahul.jad...@spectross.com> wrote: >>> Hi all, I am new to Goertzel algorithm so having some basic doubts
about
>>> its implementation. >>> >>> As per thr standatd Q.24 (AT&T) >>> Power levels per frequency = 0 to -25 dBm; >>> what does this actually means? >>> also what is minimum threshold level for any digit? >>> >> [snip] >> >> The unit dBm is for decibels normalized to 10mW of power. So: >> 10dBm = 10mW >> -25dBm = ??? >> Now you need to know your impedance, I think it's probably 50 >> ohms for telephony receivers? Convert the power numbers to >> volts using Ohm's law. Now you know your RMS volt level range. >>
thanks to all, but can anyone guess the significance of part if ( r[max_index] > 1.0e9 ) t = r[max_index] * 0.158; else t = r[max_index] * 0.010; in above code? Thanks in advance, Rahul.
>> Hope this helps, >> Julius > >Correction: The unit dBm is for decibels normalized to 1.0mW of power. >So 10dBm = 10mW and 0dBm = 1mW. > >dBm is often misused where dBu in meant. dBu is a voltage measure, >independent of impedance. dBm and dBu are equal on a 600-ohm line. VU >meters actually read dBu. > >Jerry >-- >Engineering is the art of making what you want from things you can get. >??????????????????????????????????????????????????????????????????????? >
Reply by Jerry Avins July 25, 20082008-07-25
julius wrote:
> On Jul 25, 6:24 am, "jadhav_rahul" <rahul.jad...@spectross.com> wrote: >> Hi all, I am new to Goertzel algorithm so having some basic doubts about >> its implementation. >> >> As per thr standatd Q.24 (AT&T) >> Power levels per frequency = 0 to -25 dBm; >> what does this actually means? >> also what is minimum threshold level for any digit? >> > [snip] > > The unit dBm is for decibels normalized to 10mW of power. So: > 10dBm = 10mW > -25dBm = ??? > Now you need to know your impedance, I think it's probably 50 > ohms for telephony receivers? Convert the power numbers to > volts using Ohm's law. Now you know your RMS volt level range. > > Hope this helps, > Julius
Correction: The unit dBm is for decibels normalized to 1.0mW of power. So 10dBm = 10mW and 0dBm = 1mW. dBm is often misused where dBu in meant. dBu is a voltage measure, independent of impedance. dBm and dBu are equal on a 600-ohm line. VU meters actually read dBu. Jerry -- Engineering is the art of making what you want from things you can get. &#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;
Reply by July 25, 20082008-07-25
On Jul 25, 6:46&#2013266080;am, julius <juli...@gmail.com> wrote:
> On Jul 25, 6:24&#2013266080;am, "jadhav_rahul" <rahul.jad...@spectross.com> wrote:> Hi all, I am new to Goertzel algorithm so having some basic doubts about > > its implementation. > > > As per thr standatd Q.24 (AT&T) > > Power levels per frequency = 0 to -25 dBm; > > what does this actually means? > > also what is minimum threshold level for any digit? > > [snip] > > The unit dBm is for decibels normalized to 10mW of power. &#2013266080;So: > &#2013266080; 10dBm = 10mW > &#2013266080; -25dBm = ??? > Now you need to know your impedance, I think it's probably 50 > ohms for telephony receivers? &#2013266080;Convert the power numbers to > volts using Ohm's law. &#2013266080;Now you know your RMS volt level range. > > Hope this helps, > Julius
Actually dBm is referenced to a milliwatt. Also telephony in the US uses 900 ohms for residential circuits and 600 ohms for commercial ones. Also don't forget that the DTMF spec is designed for a clear channel with a single home - i.e., from a phone to a central office. If you have multiple analog hops, you will have to allow for greater losses and greater twist ratios. This often arises when doing overdial such as dialing in to an answering machine. Also don't forget that a phone disconnects its microphone from the circuit while producing DTMF. Many people implement DTMF decoders in voice response systems where you will have incomming DTMF at the same time as outbound audio. So you will need some sort of early detect that mutes the outbound audio. This is where the wizardry comes in. Good luck, Clay
Reply by julius July 25, 20082008-07-25
On Jul 25, 6:24&#2013266080;am, "jadhav_rahul" <rahul.jad...@spectross.com> wrote:
> Hi all, I am new to Goertzel algorithm so having some basic doubts about > its implementation. > > As per thr standatd Q.24 (AT&T) > Power levels per frequency = 0 to -25 dBm; > what does this actually means? > also what is minimum threshold level for any digit? >
[snip] The unit dBm is for decibels normalized to 10mW of power. So: 10dBm = 10mW -25dBm = ??? Now you need to know your impedance, I think it's probably 50 ohms for telephony receivers? Convert the power numbers to volts using Ohm's law. Now you know your RMS volt level range. Hope this helps, Julius
Reply by jadhav_rahul July 25, 20082008-07-25
Hi all, I am new to Goertzel algorithm so having some basic doubts about
its implementation.

As per thr standatd Q.24 (AT&T)
Power levels per frequency = 0 to -25 dBm;
what does this actually means?
also what is minimum threshold level for any digit?

I have a code for goertzel algorithm form wikipedia
 where r[]= array containing magnitude for respective bin frequencies
       col= column no. with max magnitude
       row = row no. with max magnitude magnitude 
and post testing routine goes like this

**************************************************************************
* Check for minimum energy */
 
  if ( r[row] < 4.0e5 )   /* 2.0e5 ... 1.0e8 no change */
  {
    /* energy not high enough */
  }
  else if ( r[col] < 4.0e5 )
  {
    /* energy not high enough */
  }
  else
  {
    see_digit = TRUE;
 
    /* Twist check
     * CEPT => twist < 6dB
     * AT&T => forward twist < 4dB and reverse twist < 8dB
     *  -ndB < 10 log10( v1 / v2 ), where v1 < v2
     *  -4dB < 10 log10( v1 / v2 )
     *  -0.4  < log10( v1 / v2 )
     *  0.398 < v1 / v2
     *  0.398 * v2 < v1
     */
    if ( r[col] > r[row] )
    {
      /* Normal twist */
      max_index = col;
      if ( r[row] < (r[col] * 0.398) )    /* twist > 4dB, error */
        see_digit = FALSE;
    }
    else /* if ( r[row] > r[col] ) */
    {
      /* Reverse twist */
      max_index = row;
      if ( r[col] < (r[row] * 0.158) )    /* twist > 8db, error */
        see_digit = FALSE;
    }
 
    /* Signal to noise test
     * AT&T states that the noise must be 16dB down from the signal.
     * Here we count the number of signals above the threshold and
     * there ought to be only two.
     */
    if ( r[max_index] > 1.0e9 )
      t = r[max_index] * 0.158;
    else
      t = r[max_index] * 0.010;
 
    peak_count = 0;
    for ( i=0; i<8; i++ )
    {
      if ( r[i] > t )
        peak_count++;
    }
    if ( peak_count > 2 )
      see_digit = FALSE;
**************************************************************************
 I just want to know what level does 4.0e5 corresponds to?
and does the code written for Signal to noise test also checks for second
harmonics energy? and significance of part

if ( r[max_index] > 1.0e9 )
      t = r[max_index] * 0.158;
    else
      t = r[max_index] * 0.010;

Thanks in advance,
Rahul.