DTMF Presentation

Click here to load reader

  • date post

    29-Oct-2014
  • Category

    Documents

  • view

    100
  • download

    3

Embed Size (px)

Transcript of DTMF Presentation

+

Decoding DTMF Telephone Touch Tone SignalsBy: Thomas Berschauer Charles Wolfenden

+

Overview

HistoryDTMF Signaling Explanation Alternative Applications

Experiment ObjectivesFIR Filter Explanation Thomas Berschauers Experimental .m Files Thomas Berschauers Experimental Results Charles Wolfendens Experimental .m Files Charles Wolfendens Experimental Results Conclusion

+

HistoryPrior to DTMF, numbers were dialed by means of pulse dialing (DP) or loop disconnect (LD) signaling Rotary dials were invented to eliminate need for operators and to automate the switching required to get from a caller to a receiver

Generates pulses on the local loop by opening and closing an electrical switch when the dial is rotated and released Similar to flicking a light switch on and off

Snyder, Gordon F. "Telephone Set Function 2." Gordon's Information and Communications Technologies (ICT) Blog. N.p., 22 Aug. 2011. Web. 30 Oct. 2012. .

+

History

Multi-frequency signaling (MF) was developed for signaling between switching centers

MF signaling methods use a mixture of two pure sine wave sounds

Was used by the telecoms to route long-distance calls

DTMF stands for dual-tone multi-frequency

Developed so consumers could signal their own destination telephone number instead of talking to a telephone operator

DTMF's frequencies differ from all of the pre-existing MF signaling protocols DTMF was known throughout the Bell System by the trademark Touch-Tone

Was introduced to the public on November 18, 1963, when the first push-button telephone was made available to the public.

Sadler, Charlene. "Time to Retire Touch-tone Fee: Researcher." CBCnews. N.p., 02 Feb. 2010. Web. 30 Oct. 2012. .

+

DTMF Signaling

The DTMF system uses eight different frequency signals transmitted in pairs to represent 16 different numbers, symbols and letters Keypad is laid out in a 44 matrix Pressing a single key (such as '1' ) will send a sinusoidal tone for each of the two frequencies (697 and 1209 Hz) The multiple tones are the reason for calling the system multi-frequency. Tones are decoded by the switching center to determine which key was pressed.

"Technical Information on the DTMF Tones." Western Electric Touch Tone. N.p., n.d. Web. 30 Oct. 2012. .

+

Alternative Applications

Indicating start and stop times of local commercial insertion points during station breaks

Until better equipment was developed in the 90s, fast, unacknowledged, and loud DTMF tone sequences could sometimes be heard during the commercial breaks

U.S. military used the letters, relabeled, in their now defunct Autovon phone system

Used before dialing the phone in order to give calls priority Levels of priority available were Flash Override (A), Flash (B), Immediate (C), and Priority (D), with Flash Override being the highest priority

Lexlexlex. Western Electric Model 66A3A DTMF ("Touch Tone") Keypad Showing Additional Feature Buttons for the Autovon System" File:66a3aDTMFpad.jpg. N.p., 22 May 2002. Web. .

+

Alternative Applications Tones

can be heard at the start or end of some VHS tapesEncoded tone provides info to duplication machines, such as format, duration and volume levels, in order to replicate the original video as closely as possible

Possible to transfer Binary code (including ASCII text messages) using DTMF

Assume that E is equal to * and F is equal to # Two subsequent DTMF tones are enough to transfer whole byte of data or 8-bit ASCII character

Greenstein, Shane. "Richard Rosenbloom, in Memory." Virulent Word of Mouse. N.p., 27 Oct. 2011. Web. .

+

Experiment Objectives

To generate and decode signals similar to those used by analog touch tone telephones

+

Experiment Objectives

Divide signal into shorter time segments representing each key pressedDetermine which two frequencies are present in each segment From the two frequencies, determine which keys were pressed Reconstruct the dialed phone number DTMFdial, DTMFscor, DTMFdeco, DTMFmain

+

DTMFdial.m

Implementation of a DTMF dialerFunction input: [3 3 8 3 9 4 7] Input and output is a vector

Each key pressed was sampled at 8 kHzDuration of each key press is 0.5 sec followed by 0.1 sec silence

Sound(dtmfdial([3 3 8 3 9 4 7]), 8000)

+

DTMFscor.m

Binary output determining the presence or absence of a specific frequencyInput is a short segment from a DTMF signal Implementation of FIR bandpass filter (convo function) Filter constructed with sinusoidal impulse responses:

[] = (2/)cos 2/), 0 < (

L: filter length, : frequency location of passband, n: number of samples, : sampling frequency

+

FIR Finite Impulse Response Bandpass Filter

+

DTMFdeco.m

Utilizes DTMFscor to determine which key was pressedReturns the key number corresponding to the DTMF waveform

+

DTMFmain.m

Combines DTMFscor and DTMFdeco within DTMFmainFirst divides signal so each segment can be sent to DTMFscor and DTMFdeco Use DTMFdial to test>> dtmfmain(dtmfdial([3 5 4 3 4 4 1])) ans = 3543441

Signal_a.wav

Signal_b.wavSignal_c.wav

+

DTMFdial.m Thomas Berschauerfunction play = dtmfdial (button)dur = 0.5; sil = 0.1; fs = 8000; t = 0:(1/fs):dur; tt = 0:(1/fs):sil; play = []; for i = 1:length(button);

+

DTMFdial.m Thomas Berschauerif button(i) == 1f1 = 697; f2 = 1209; elseif button(i) == 2 f1 = 697; f2 = 1336; elseif button(i) == 3 f1 = 697; f2 = 1477;

+

DTMFdial.m Thomas Berschauerelseif button(i) == 0f1 = 941; f2 = 1336; elseif button(i) == '#' f1 = 941; f2 = 1477;

end

+

DTMFdial.m Thomas Berschauerx = sin(2*pi*f1*t);y = sin(2*pi*f2*t); z = [x+y];

%signal of 1st freq%signal of 2nd freq %combine signals

pause = sin(2*pi*0*tt); %signal of pause/silence play = [play,z,pause]; %add vector play to itself w/ pause

endend

+

DTMFscor.m Thomas Berschauerfunction ss = dtmfscor(xx, freq, L, fs)if (nargin < 4), fs = 8000; end; n = 0:L; hh = (2/L)*cos(2*pi*freq*n/fs); ss = (mean(conv(xx,hh).^2)>mean(xx.^2)/5); end

+

DTMFdeco.m Thomas Berschauerfunction key = dtmfdeco(xx,fs)if dtmfscor(xx,697,L,fs) == 1 if dtmfscor(xx,1209,L,fs) == 1 key = 1; elseif dtmfscor(xx,1336,L,fs) == 1 key = 2; elseif dtmfscor(xx,1477,L,fs) == 1 key = 3; end

+

DTMFdeco.m Thomas Berschauerelseif dtmfscor(xx,770,L,fs) == 1if dtmfscor(xx,1209,L,fs) == 1 key = 4; elseif dtmfscor(xx,1336,L,fs) == 1 key = 5; elseif dtmfscor(xx,1477,L,fs) == 1

key = 6;end

+

DTMFmain.m Thomas Berschauerfunction keys = dtmfmain(xx)keys = []; for i = 4802:4802:length(xx) if i == 4802 keys = [keys,dtmfdeco(xx(1:i))]; elseif i > 4802 keys = [keys,dtmfdeco(xx((i-4802):i))]; end end

+

DTMFmain.m Thomas Berschauerif length(xx) < 30000for i = 4500:5000:length(xx) if i == 4500 keys = [keys,dtmfdeco(xx(1:i))]; elseif i > 4802 keys = [keys,dtmfdeco(xx((i-1500):i))]; end end else

+

Results Thomas Berschauer

>> dtmfmain(wavread('Signal_a'))ans = 1 3 1 0 3 3 8 3 9 4 7

>> dtmfmain(wavread('Signal_b')) ans = 1 3 1 0 3 3 8 3 9 4 7

>> dtmfmain(wavread('Signal_c'))

ans =8 3 9 4 7

+

DTMFdial.m Charles Wolfendenfs = 8000 t1 = 0:1/fs:0.5 t2 = floor(0.5:1/fs:0.6) t = [t1 t2] for n = 1:length(keyNum) if keyNum(n) == 1 f1 = 697 f2 = 1209; . . . f1 = sin(2.*pi.*f1.*t); f2 = sin(2.*pi.*f2.*t); f = [f1+f2] dtmfdial = [dtmfdial,f]; %Sampling rate %Duration of tone %Duration of silence %Establish button frequencies

%Generate frequency 1 %Generate frequency 2 %Combine the two frequencies

Executed with command: dtmfdial([# to dial]),8000)

+

DTMFdeco.m Charles Wolfenden% Length of Band Pass Filter: % L can be increased to produce a more narrow bandpass filter L = 128; filt_n = 0:L-1; digilength = length(encodedTones)/(tonelength+silencelength); for deco_seq = 1:digilength %Segmenting startpos = (deco_seq - 1)*(tonelength + silencelength) + 1; endpos = startpos + tonelength - 1; encstr_frag = encodedTones(startpos:endpos); % Loop through each column and check if the column-i frequency exists in the signal for i = 1:4 % Calculate filter coefficients for the bandpass filter for column frequencies given the center frequency

hh = 2/L*cos(2*pi*colfreq(i)*filt_n/fs); ss = mean(conv(encstr_frag,hh).^2) > mean(encstr_frag.^2)/5; if (ss) col = i; break %now have the columnnumstr(1,deco_seq) = key(row,col);

+

DTMFmain.m Charles Wolfendenrowfreq = [ 697 770 852 941]; colfreq = [1209 1336 1477 ]; key = [ '1' '2' '3' ; '4' '5' '6' ; '7' '8' '9' ; '*' '0' '#' ]; fs = 8000; % frequency components for each row % frequency components for each column % Define the telephone keypad as a 2d matrix

% Sampling Frequency

tonelength = round(fs*0.5); %Convert length from seconds to samples silencelength = round(fs*0.1); %Return The Decoded Tones Decoded_Digits = dtmfdeco(encodedTones); %Convert length from seconds to samples

+

Results Charles Wolfenden

Executed by command dtmfmain(wavread('Signal_x.wav')) where x is a b or c Signal_a.wav

Encoded tone: 13103383947 Decoded tone: 13103383947

Signal_b.wav

Encoded tone: 13103383947Decoded tone: 13103383947

Signal_c.wav

Encoded tone: 83947 Decoded tone: 8347 or 888394447

+

Conclusion

HistoryDTMF and Alternative Applications Experiment Objectives

FIR Filter, Filter LengthDTMF m-files Results

+

Questions?