LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Amplitude detection of FFT signal

Hi,

 

I should warn you in advance that this is going to be an extremely long introduction to my question. Kindly bear with me. Smiley Happy  This is with regard to a small problem i have having with the detection of amplitudes of a FFT signal generated from a DTMF input time signal. Let me further clarify the situation. I have a transmitter which generates DTMF tones (a sine signal having 2 different frequencies)for a duration of 750 milliseconds. The design of the transmitter is as follows: 1 DTMF tone for 750 milliseconds, another DTMF tone (which could have another pai of frequency values) and then a 2 second pause. To detect these tones, i have converted the input time signal to its respective FFT and then comparing the amplitude of the expected frequency components to a threshold value.

 

If the amplitude of a particlar frequency tone is above the threshold value, a set of mathematical operations are carried out, if not, nothing happens.

 

The problem i am faced with now is that when a tone is received, a particular tone is not detected just once within the 750 milliseconds (as is required), but sometimes twice. This causes a duplicate read of the output. For my deisgn i wish to detect the first freqeuncy pair ONCE within the first 750 milliseconds, the second frequency pair during the second 750 milliseconds and then nothing during the pause.

 

I have initialized the sound card using "Sound input config.vi" with parameters:

 

Number of samples per channel: 2 * Sampling rate (8000 S/s) * Tone duration (0.75 s)

Sound format: Sample rate: 8000 S/s ; Number of channels: 1 ; Bits per sample: 16

 

Do let me know how i could prevent these duplicates from appearing 🙂

0 Kudos
Message 1 of 8
(4,310 Views)

hello aruntutu,

 

show us your code...

 

 

CLAD / Labview 2011, Win Xp
------------------------------------------------------
Mission d'une semaine- à plusieurs mois laissez moi un MP...
RP et Midi-pyrénées .Km+++ si possibilité de télétravail

Kudos always accepted / Les petits clicks jaunes sont toujours appréciés
Don't forget to valid a good answer / pensez à valider une réponse correcte
0 Kudos
Message 2 of 8
(4,299 Views)

Please find enclosed the code. I have tried to illustrate what the problem is. Please do get back to me if there are any clarifications to be made. I apologize for the complexity of my explanation of the problem being faced.

 

Many thanks once again for the speedy response and for being ready to help out with the problem.

 

Regards,

 

Arun

0 Kudos
Message 3 of 8
(4,287 Views)

Arun,

 I'm not quite sure what you want as an end result but I found this library a while back that might help you. I'd like to give credit to whomever wrote it but I don't have that information.

 

Hope this helps.

Now Using LabVIEW 2019SP1 and TestStand 2019
0 Kudos
Message 4 of 8
(4,281 Views)

Hi GovBob,

 

Thanks a ton for the DTMF decoder. Well basically this is how my software is to work:

 

  • The receiver gets 2 DTMF tones, one after the other followed by a 2 second pause. I need to capture both the tones and based on the values of these tones (on a scale from 0 to 15) do some mathematical operations. I need both tones hence to be detected exactly once so that i can carry out the mathematical operation accurately. 
  • An additional information is that, each DTMF tone being sent is for exactly 750 milliseconds, i.e the first tone is sent for 750 ms, followed immediately by the second tone also for 750 ms followed by a 2 second pause and again the next pair of tones are sent and the cycle continues.
  • The PROBLEM: At times during the decoding of any one DTMF tone, i get the same tone which is decoded more than once. for example instead of gettin an output of 7,5,3,2 , i would sometimes get a 7,5,5,3,2 for 4 DTMF tones that i have sent. Any idea how i can ensure that each tone is decoded just once. The code used to carry out the decoding is as attached above.


Well i've surprised myself now by making this explaination much simplier than my previous posts. This is for a project we have and hence as a beginner LabVIEW programmer, i am running into a couple of such tiny problems.

Thanks a ton, hoping to hear from you guys soon.

 

Regards,

Arun

0 Kudos
Message 5 of 8
(4,263 Views)

Hi Arun,

 

if you want to acquire .75s worth of data, then you must configure the read VI to read as many samples as 3/4 of the sample rate. Since the sample rate you defined in the first VI is 8000 S/s, then you would want to acquire 6000 samples in the read VI.

I don't quite understand what the 12000 was. That input is simply the size of the input buffer, which you could simply leave alone. Besides 12000 samples would amount to 1.5s of data (does this represent the length of the two consecutive tones?)

 

I added a little image to show what I mean.

 

Hope this helps.

 

 

Regards, 

0 Kudos
Message 6 of 8
(4,250 Views)

Hi Joseph,

 

Thank you so much for the timely response and my apologies for the delay in replying as i was on a small 2 day vacation. Anyhow i did try the suggestions you gave by unfortunately i have not been able to detect the signal properly. I therefore resorted to choosing the spound format as having 8000 samples while the number of samples as 6000 (from 8000 samples/sec for .75 seconds) for the Sound input config and i use this same value for the Sound input read. What do you think about this? It seems to be able to recognize the tones but the initial problem still persists. The input signal does not die down immediately and so a peak at a particular frequency value (at the output of the FFT) seems to be recognized twice.

 

Any hints?? I am lost and not being too good at DSP concepts, i am blank!! 😞 Any suggestions again would be useful.

 

Thanks a ton,

Arun

0 Kudos
Message 7 of 8
(4,228 Views)

Hi Arun,

 

what I would suggest at this point in order to see exactly what is going on, would be to graph the data that you read from the sound port. This way you may be able to understand why the tone is being detected twice, as it would probably give you a better understanding of the timing.

 

Regards, 

0 Kudos
Message 8 of 8
(4,192 Views)