LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Get the correct order of the tones for DTMF Decoder

Solved!
Go to solution

I am trying to decoder the DTMF stream signal (contains mutiple tones, delay, noise), however, I have the problem to seperate each tone in the stream signal in order to input into the Goertzel for further analysis. 

 

The phone number is 534-343-3436. At the input decoder, I do not know what is the phone number yet. However, I want to seperate 5 then 3 then 4 then 3....tone so I can put do the analysis on individual tone to know which tone is coresponding to what phone number.

 

Anyway I can archieve in LabView?

0 Kudos
Message 1 of 9
(6,982 Views)

Perform an FFT on a the waveform looking for sections of it at a time.  If you can find the points where there are no tones in between, that can help you figure out which section of the waveform relates to one one button press, and which section relates to the next.

 

Doing the FFT should show you the two frequencies related to each button press.  Then compare that to a table of the DTMF tones for each digit.

Message 2 of 9
(6,965 Views)

Thanks - I understand how to get a digit when the wave form only contains low and high refequency from DTMF  but I am still confused how distinct tone by tone. Well, I will try hopefully, I will be be able to seperate them.

0 Kudos
Message 3 of 9
(6,961 Views)

What you want is a short-time Fourier transform.  Essentially a concatenation of FFTs of consecutive sections of the waveform.   Doing an FFT on the whole sample will result in the "best combination of sine wave frequencies that will minimize the error when compared to the (whole) sample".  This means time information is lost.

 

You should be able to analyze the 2D array of information I've currently got connected to the intensity graph to find out what combination of frequencies is present at any given time (do peak find on each column of the array).   The sample in my code is computer generated so all of the "key presses"  and pauses are the same duration -- you'll likely have to figure out how to detect a double-length key press is really one number, etc. 

Message 4 of 9
(6,952 Views)

Thank very much for the examle, hopefully, I will be able to do what I want to do. yes, that why I try to seperaete the signal before doing any FFT kind of analysis to avoid the time domain issue (avoid losting the order of frequency pair). 

0 Kudos
Message 5 of 9
(6,948 Views)
Solution
Accepted by topic author muahang1234

There should always be an interval of no signal between tone pairs - otherwise you could not detect repeated values. For phone number 534-343-3333 you cannot just look for a change of frequency. Your signalling protocol must specify the minimum duration of a tone pair to be considered a valid signal and a minimum duration of no tone to be a valid separator between numerals. Maximum times are useful but not as important, except to determine how long the system will wait for a valid number.  The time settings may be dependent on the minimum tolerable signal to noise ratio.

 

So the algorithm would be something like this: Use amplitude discrimination to find the gaps between tone pairs. It does not need to be too good - it only needs to find approximate segments.It will use the timing specifications to set ranges of times to examine. Within each segment above threshold use the FFT to identify the tone pair. You could also use an FFT on the gap segments to verify that they do not contain a tone pair.

 

Also consider various errors. On Western Electric tone pads pressing two or more keys in one row or one column simultaneously results in a single tone. I have not looked at DTMF generators for some years so I do not know how how some of the IC-based generators handle that situation.

 

Lynn

Message 6 of 9
(6,939 Views)

As Zwired1 tip, the STFT function can show the time relative with the frequency but after 3 hours of thinking how to work with this information I do have a lot of problems. I look into the array of information from STFT but it is kind of complex to impliment the code to extract this kind of information. By observation, I can split the signal based on the time value of the STFT but I cannot find a way to do it using LabView. I just complete the code on how to detect the digit base on the frequency pair but I am stuck on how to seperate the signal

 

11-10-2013 1-31-35 AM.jpg

0 Kudos
Message 7 of 9
(6,914 Views)

The attached will find the peaks in each row of the STFT data and get the best match against DTMF frequencies.  It automatically deletes duplicate results (i.e. the button is held for more that one STFT time segment).   There's still quite a bit of work to make this robust to variations and noise in real (measured) data, but the core functionality is there.  

0 Kudos
Message 8 of 9
(6,908 Views)

I got it now - we do have a similar technique like matlab end point detection to get the peak values. Your code is so advance for my understanding after you get the peaks but I can use my program to detect the digit after getting the peak - truly appreciate.

 

Thanks.

0 Kudos
Message 9 of 9
(6,904 Views)