+ All Categories
Home > Documents > sateesh6.files.wordpress.com€¦ · Web viewProject report. on. DUAL TONE MULTIPLE-frequencies ....

sateesh6.files.wordpress.com€¦ · Web viewProject report. on. DUAL TONE MULTIPLE-frequencies ....

Date post: 25-Aug-2018
Category:
Upload: vokhanh
View: 214 times
Download: 0 times
Share this document with a friend
53
A PROJECT REPORT ON DUAL TONE MULTIPLE-FREQUENCIES
Transcript
Page 1: sateesh6.files.wordpress.com€¦ · Web viewProject report. on. DUAL TONE MULTIPLE-frequencies . ABSTRACT. Telephone is a very important system and the field of telecommunication

A

PROJECT REPORT

ON

DUAL TONE MULTIPLE-FREQUENCIES

Page 2: sateesh6.files.wordpress.com€¦ · Web viewProject report. on. DUAL TONE MULTIPLE-frequencies . ABSTRACT. Telephone is a very important system and the field of telecommunication

ABSTRACT

Telephone is a very important system and the field of telecommunication is growing

day by day. Dual-tone multi-frequency (DTMF) is an international signaling standard for

telephone digits (number buttons). These signals are used in touch-tone telephone call signaling

as well as many other areas such as interactive control applications, telephone banking and pager

systems. DTMF is the method by which the telephone numbers are generated and then detected.

DTMF is an international signaling standard for touch-tone telephones. The DTMF

generator generates standard telephone digits as the sum of sinusoids corresponding to a

frequency table for each digit. The DTMF decoder will take a digital signal as input and produce

the decoded digit.

One known method of communicating data is a method where the digital data is

converted into analogue dual tone multi frequencies (DTMF) which are then transmitted.

Analogue signals are used because the recovery of an analogue signal is feasible at much lower

levels than a digital signal. A receiver then detects the DTMF signal. To help ensure the tone

received is a valid signal an analogue delay means is employed. This monitors the input tone

signal for a period of typically up to 40ms until the signal is judged to be effective and only then

is the input signal processed. The tone detector is normally a phase-lock loop. We have found

that the present communication method is not satisfactory for an electronically noisy

environment and for the processing of a noisy signal.

Dual tone multifrequency (DTMF) coding is a generic name for push-button

telephone signaling which is used in North American telephone systems. A DTMF signal is used

for transmitting a phone number or the like from a push button telephone to a telephone central

office. DTMF signaling is quickly replacing dial pulse signaling in telephone networks worldwide.

In addition to telephone call signaling, DTMF coding is also becoming popular in interactive

control applications, such as telephone banking, electronic mail systems, and answering

machines, wherein the user can select options from a menu by sending DTMF signals from a

telephone.

Page 3: sateesh6.files.wordpress.com€¦ · Web viewProject report. on. DUAL TONE MULTIPLE-frequencies . ABSTRACT. Telephone is a very important system and the field of telecommunication

INTRODUCTION

WHAT IS DTMF?

Dual-tone multi-frequency (DTMF) signaling is used for telephone signaling over

the line in the voice-frequency band to the call switching center. The version of DTMF used for

telephone tone dialing is known by the trademarked term Touch-Tone, and is standardised by

ITU-T Recommendation Q.23. Other multi-frequency systems are used for signaling internal to

the telephone network.

What this means is that DTMF passes transparently over normal two-way radio channels,

narrow-band or wide-band. It doesn't require special channel widths, or expensive equipment. In

most instances you can simply attach a cable to the speaker output of your two-way radio to a

decoder, and it will be ready to go.

In the time preceding the development of DTMF, telephone systems employed a system

commonly referred to as pulse (Dial Pulse or DP in the U.S.) or loop disconnect (LD) signaling

to dial numbers, which functions by rapidly disconnecting and connecting the calling party's

telephone line, similar to flicking a light switch on and off. The repeated connection and

disconnection, as the dial spins, sounds like a series of clicks. The exchange equipment counts

those clicks or dial pulses to determine the called number. Loop disconnect range was restricted

by telegraphic distortion and other technical problems, and placing calls over longer distances

required either operator assistance (operators used an earlier kind of multi-frequency dial) or the

provision of subscriber trunk dialing equipment.

Dual Tone Multi-Frequency, or DTMF, is a method for instructing a telephone switching system

of the telephone number to be dialed, or to issue commands to switching systems or related

telephony equipment.

Page 4: sateesh6.files.wordpress.com€¦ · Web viewProject report. on. DUAL TONE MULTIPLE-frequencies . ABSTRACT. Telephone is a very important system and the field of telecommunication

The DTMF dialing system traces its roots to a technique developed by AT&T in the

1950s called MF (Multi-Frequency) which was deployed within the AT&T telephone network to

direct calls between switching facilities using in-band signaling. In the early 1960s, a derivative

technique was offered by AT&T through its Bell System telephone companies as a "modern"

way for network customers to place calls. In AT&Ts Compatibility Bulletin No. 105, AT&T

described the product as "a method for pushbutton signaling from customer stations using the

voice transmission path."

The consumer product was marketed by AT&T under the registered trade name Touch-Tone.

Other vendors of compatible telephone equipment called this same system "Tone" dialing or

"DTMF".The DTMF system uses eight different frequency signals transmitted in pairs to

represent sixteen different numbers, symbols and letters - as detailed below.

#, *, A, B, C, and D

DTMF tones are also used by some cable television networks and radio networks to signal the

local cable company/network station to insert a local advertisement or station identification.

These tones were often heard during a station ID preceding a local ad insert. Previously,

terrestrial television stations also used DTMF tones to shut off and turn on remote transmitters.

The DTMF keypad is laid out in a 4×4 matrix, with each row representing a low frequency, and

each column representing a high frequency. Pressing a single key (such as '1' ) will send a

sinusoidal tone of the two frequencies (697 and 1209 (Hz)). The original keypads had levers

inside, so each button activated two contacts. The multiple tones are the reason for calling the

system multifrequency. These tones are then decoded by the switching center to determine which

key was pressed.

DTMF keypad frequencies (with sound clips)

Page 5: sateesh6.files.wordpress.com€¦ · Web viewProject report. on. DUAL TONE MULTIPLE-frequencies . ABSTRACT. Telephone is a very important system and the field of telecommunication

1209 Hz 1336 Hz 1477 Hz 1633 Hz

697 Hz 1 2 3 A

770 Hz 4 5 6 B

852 Hz 7 8 9 C

941 Hz * 0 # D

The following are the frequencies used for the DTMF (dual-tone, multi-frequency)

system, which is also referred to as tone dialling. The signal is encoded as a pair of sinusoidal

(sine wave) tones from the table below which are mixed with each other. DTMF is used by most

PSTN (public switched telephone networks) systems for number dialling, and is also used for

voice-response systems such as telephone banking and sometimes over private radio networks to

provide signalling and transferring of small amounts of data.

DTMF event frequencies

Event Low frequency High frequency

Busy signal 480 Hz 620 Hz

Dial tone 350 Hz 440 Hz

Ringback tone (US) 440 Hz 480 Hz

Page 6: sateesh6.files.wordpress.com€¦ · Web viewProject report. on. DUAL TONE MULTIPLE-frequencies . ABSTRACT. Telephone is a very important system and the field of telecommunication

The tone frequencies, as defined by the Precise Tone Plan, are selected such that

harmonics and intermodulation products will not cause an unreliable signal. No frequency is a

multiple of another, the difference between any two frequencies does not equal any of the

frequencies, and the sum of any two frequencies does not equal any of the frequencies. The

frequencies were initially designed with a ratio of 21/19, which is slightly less than a whole tone.

The frequencies may not vary more than ±1.8% from their nominal frequency, or the switching

center will ignore the signal. The high frequencies may be the same volume or louder as the low

frequencies when sent across the line. The loudness difference between the high and low

frequencies can be as large as 3 decibels (dB) and is referred to as "twist". The minimum

duration of the tone should be at least 70 msec, although in some countries and applications

DTMF receivers must be able to reliably detect DTMF tones as short as 45ms.

Project Description:

This project is of “DTMF detection by Goertzel algorithm. The first touch tone

telephone installation was in 1963. DTMF signaling uses voice-band tones to send address

signals and other digital information from pushbutton telephones and other devices such as

modems and fax machines. Analog DTMF detection is done using band-pass filter banks with

center frequencies at the DTMF signal frequencies. Digital detection of DTMF is done by

several algorithms like goertzel, notch filter etc.

Page 7: sateesh6.files.wordpress.com€¦ · Web viewProject report. on. DUAL TONE MULTIPLE-frequencies . ABSTRACT. Telephone is a very important system and the field of telecommunication

HISTORY

Probably no means of communication has revolutionized the daily lives of ordinary people more

than the telephone. Simply described, it is a system which converts sound, specifically the

human voice, to electrical impulses of various frequencies and then back to a tone that sounds

like the original voice.

In 1861, Johann Philip Reis (1834-1874) in Germany is said to have built a simple apparatus that

changed sound to electricity and back again to sound.

A crude device, it was incapable of transmitting most frequencies, and it was never fully

developed. It was the base of great invention. A practical telephone was actually invented

independently by two men working in the United States, Elisha Gray (1835-1910) and Scottish-

born Alexander Graham Bell (1847-1922). Incredibly, both men filed for a patent on their

designs at the New York patent office on February 14, 1876, with Bell beating Gray by only two

hours! Although Gray had built the first steel diaphragm / electromagnet receiver in 1874, he

wasn’t able to master the design of a workable transmitter until after Bell had. Bell had worked

tirelessly, experimenting with various types of mechanisms, while Gray had become

discouraged. According to the famous story, the first fully intelligible telephone call occurred on

March 6, 1876, when Bell, in one room, called to his assistant in another room. "Come here,

Watson, I want you."

The first commercial telephone used by Alexander Graham Bell, based on his patent of January

1877.

The first telephone system, known as an exchange, which is a practical means of communicating

between many people who have telephones, was installed in Hartford, Connecticut in 1877, and

the first exchange linking two major cities was established between New York and Boston in

1883. But these exchanges were manual. Wrong connections, waiting for the operator, cutting

off the line and eavesdropping of a third person were the major drawbacks.

Page 8: sateesh6.files.wordpress.com€¦ · Web viewProject report. on. DUAL TONE MULTIPLE-frequencies . ABSTRACT. Telephone is a very important system and the field of telecommunication

The first automatic telephone exchange was patented by Almon Strowger of Kansas City in 1891

and installed in 1892. The first rotary dial telephone was developed in 1923 by Antoine Barnay

in France, which has motor driven shafts and electromagnetic clutches.

DTMF:

DTMF is the generic name for push-button telephone signaling. DTMF also finds

widespread use in electronic mail systems and telephone banking systems in which user can

select options from menu by sending DTMF signals from a telephone.

In a DTMF signaling system a combination of a high frequency tone and a low

frequency tone represent a specific digit or character. The eight frequencies are arranged as

shown in figure.

Page 9: sateesh6.files.wordpress.com€¦ · Web viewProject report. on. DUAL TONE MULTIPLE-frequencies . ABSTRACT. Telephone is a very important system and the field of telecommunication

DTMF signaling has many applications such as telephone dialing, data entry, credit

checking, and voice mail system control. A DTMF signal. Consists of two superimposed

sinusoidal waveforms with frequencies chosen from a set of eight standardized frequencies.

These frequencies should be generated and detected according to the CCITT Recommendation.

Page 10: sateesh6.files.wordpress.com€¦ · Web viewProject report. on. DUAL TONE MULTIPLE-frequencies . ABSTRACT. Telephone is a very important system and the field of telecommunication

METHODS FOR GENERATING DTMF TONES

DTMF generation can be done by different methods for analog and digital systems.

· Use special IC for generating DTMF tones. Modems and telephones use this method.

· Generate DTMF tones using soundcard FM syntetizer chip

· Load sinewave sample to wavetable soundcard memeory. Play that sample using two

instrument channels at different frequencies.

· Sample all DTMF tone combinations heeded and playback those samples as needed. 8 kHz at 8

bit resolution is enough for that.

· Genrate the sample data which is played back using software.

Our project is concentrating on the last method, because it is the most generic way to do the

DTMF generation. You can use this method with every sound card which can play back samples

and it is as well suitable for DSP implementations also.

DTMF GENERATION

Theory of Operation

So what are these tones?

In DTMF there are 16 distinct tones. Each tone is the sum of two frequencies: one from a

low and one from a high frequency group. There are four different frequencies in each

group.

Your phone only uses 12 of the possible 16 tones. If you look at your phone, there are

only 4 rows (R1, R2, R3 and R4) and 3 columns (C1, C2 and C3). The rows and columns

select frequencies from the low and high frequency group respectively. The exact value

of the frequencies are listed in Table 3 below:

Page 11: sateesh6.files.wordpress.com€¦ · Web viewProject report. on. DUAL TONE MULTIPLE-frequencies . ABSTRACT. Telephone is a very important system and the field of telecommunication

TABLE 3: DTMF Row/Column Frequencies

LOW-FREQUENCIES

ROW # FREQUENCY (HZ)R1: ROW 0 697R2: ROW 1 770R3: ROW 2 852R4: ROW 3 941HIGH-FREQUENCIESCOL # FREQUENCY (HZ)C1: COL 0 1209C2: COL 1 1336C3: COL 2 1477C4: COL 3 1633C4 not used in phones

Thus to decipher what tone frequency is associated with a particular key, look at your

phone again. Each key is specified by its row and column locations. For example the "2"

key is row 0 (R1) and column 1 (C2). Thus using the above table, "2" has a frequency of

770 + 1336 = 2106 Hz The "9" is row 2 (R3) and column 2 (C3) and has a frequency of

852 + 1477 = 2329 Hz.

The following graph is a captured screen from an oscilloscope. It is a plot of the tone

frequency for the "1" key:

Page 12: sateesh6.files.wordpress.com€¦ · Web viewProject report. on. DUAL TONE MULTIPLE-frequencies . ABSTRACT. Telephone is a very important system and the field of telecommunication

You can see that the DTMF generated signal is very distinct and clear. The horizontal

axis is in samples. The frequency of the tone is about 1900 Hz - close to the 1906 Hz

predicted by Table 3 (697+1209).

There is no base band multiplexing done on DTMF signals. The signal generated by a DTMF

encoder is a direct algebraic summation, in real time, of the amplitudes of two sine (cosine)

waves of different frequencies. i.e. pressing '1' will send a tone made by adding 1209 Hz and 697

Hz to the other end of the line.

The touch tone system uses pairs of tones to represent the various keys.

There is a "low tone" and a "high tone" associated with each button (0 through 9, plus * (star)

and # (octothorpe or pound symbol). The low tones vary according to what horizontal row the

tone button is in, while the high tones correspond to the vertical column of the tone button.

The tones and assignments are as follows:

Page 13: sateesh6.files.wordpress.com€¦ · Web viewProject report. on. DUAL TONE MULTIPLE-frequencies . ABSTRACT. Telephone is a very important system and the field of telecommunication

When the 4 button is pressed, the 770 Hz and 1209 Hz tones are sent together. The

telephone central office will then decode the number from this pair of tones. The frequencies in

Fig. 1 were chosen (by the design engineers) to avoid harmonics. No frequency is an integer

multiple of another, the difference between any two frequencies does not equal any of the

frequencies, and the sum of any two frequencies does not equal any of the frequencies. This

makes it easier to detect exactly which tones are present in the dialed signal in the presence of

non-linear line distortions.

When any key is pressed the tones of the corresponding column and row are

generated and summed. Keys A-D (in the fourth column) are not implemented on commercial

and household telephone sets, but are used in some military and other signaling applications.

The tone frequencies were designed to avoid harmonics and other problems that

could arise when two tones are sent and received. Accurate transmission from the phone and

accurate decoding on the telephone company end are important. They may sound rather musical

when dialed (and representations of many popular tunes are possible), but they are not intended

to be so.

The high frequency tone should be at least as loud, and preferably louder than the low

frequency. It may be as much as 4 db louder. This factor is referred to as "twist." If a Touchtone

Page 14: sateesh6.files.wordpress.com€¦ · Web viewProject report. on. DUAL TONE MULTIPLE-frequencies . ABSTRACT. Telephone is a very important system and the field of telecommunication

signal has +3db of twist, then the high frequency is 3 dB louder than the low frequency. Negative

twist is when the low frequency is louder.

‘A’, ‘B’, ‘C’ and ‘D’ are extensions to the standard touch-tones (0-9, *, #) which originated with

the U.S. military's Autovon phone network. The original names of these keys were FO (Flash

Override), F (Flash), I (Immediate), and P (Priority) which represented priority levels that could

establish a phone connection with varying degrees of immediacy, killing other conversations on

the network if necessary with FO being the greatest priority, down to P being of lesser priority.

The tones are more commonly referred to as the A, B, C and D tones respectively, and all use a

1633 Hz as their high tone.

Nowadays, these keys/tones are mainly used in special applications such as

amateur radio repeaters for their signalling/control. Modems and touch tone circuits tend to

include the A, B, C and D tones as well.

-Optimization in generation

Calculating sin function is quite time consuming. If your application has limited amount of

processing power available, you might want to optimize.

the routine in some way. The optimization in sin calculation can be easily done by calculating a

sine table and then reading the sine values from that table instead of calculating actual sin

function every time. Another option is to use an algorithm to efficiently perform a series of sine

and/or cosine calculations of an angle which is repeatedly increasing (or decreasing) by a

fixed amount.

Other methods are to avoid doing unnecessary multiplications for every sample. You can

calculate 2*pi*f1 and 2*pi*f2 once in the beginning of the DTMF tone calculation and use that

stored value there after instead of doing it all over for every sample.

DTMF DETECTION :

Page 15: sateesh6.files.wordpress.com€¦ · Web viewProject report. on. DUAL TONE MULTIPLE-frequencies . ABSTRACT. Telephone is a very important system and the field of telecommunication

Detecting multi-frequency signals in noisy environments is a well studied area in

DSP. The difficulty of DTMF tone detection is due to the standards which must be satisfied

when detecting these signals. Since these standards were determined when DTMF detectors

were analog, applying the same standards to digital detectors might causes some problems. For

example, the standard frequencies are determined in AT&T Bell Laboratories so that they have

no common multipliers. This guarantees that none of the frequencies have common harmonics

and thereby improves the performance of analog detectors. However, the most commonly used

frequency analysis technique, the Discrete Fourier Transform (DFT), samples the frequency

domain with equally spaced samples, and therefore, it is not possible to have a sample exactly at

each standard frequency.

The Goertzel Algorithm, which is an efficient algorithm to compute the Discrete Fourier

Transform (DFT), is the most commonly used digital TMF tone detection algorithm.

GOERTZEL ALGORITHM

Page 16: sateesh6.files.wordpress.com€¦ · Web viewProject report. on. DUAL TONE MULTIPLE-frequencies . ABSTRACT. Telephone is a very important system and the field of telecommunication

The goertzel algorithm can perform tone detection using much less CPU horsepower then the

Fast Fourier Transform.

1.3.2.a-Tone Detection:

Many applications require tone detection, such as:

· DTMF (touch tone) decoding.

· Call progress (dial tone, busy, and so on) decoding.

· Frequency response measurements (sending a tone while simultaneously reading back the

result) if u do this for a range of frequencies, the resulting frequency response curve can be

informative. For example, the frequency response curve of a telephone line tells you if any load

coils (inductors) are present on that line.

Although dedicated ICs exist for the applications above implementing these functions

in software costs less. Unfortunately many embedded systems don’t have the horsepower to

perform continuous real time FFTs. That’s where the goertzel algorithm comes in.

In this project, we describe the basic goertzel and an optimized goertzel. The basic

goertzel gives you real and imaginary frequency components as a regular DFT or FFT would. If

you need them, magnitude and phase can then be computed from the real imaginary pair.

The optimized goertzel is even faster and simpler then the basic goertzel but doesn’t give

you the real and imaginary frequency components. instead it gives you the relative magnitude

squared. By taking square root you can get the relative magnitude but there is no way to obtain

the phase.

b-Basic Goertzel

In this the actual tone detection occurs every nth sample. As with the FFT, you work with blocks

of samples. However, that doesn’t mean you have to process the data in blocks. The numerical

processing is short enough to be done in a very interrupt service routine that is gathering the

samples. Or if you are getting buffers of samples you can go ahead and process them a

Page 17: sateesh6.files.wordpress.com€¦ · Web viewProject report. on. DUAL TONE MULTIPLE-frequencies . ABSTRACT. Telephone is a very important system and the field of telecommunication

batch at a time

The preliminary calculations before actual goertzel are:

· Decide on the sampling rate.

· Choose the block size, N.

· Pre-compute the sine terms.

· Pre-compute one coefficient.

These can all be pre-computed once and then hardcoded in your program saving ROM and RAM

space; or you can compute it on the fly

C-Sampling Rate:

Your sampling rate may already be determined by the application. For example, in

telecom applications, its common to use the sampling rate of 8khz.Alternatively, you’re A/D

converter may be running from an external clock or crystal over which you have no control.

On sampling rate the usual Nyquist Rate will be applied that is the sampling rate will

have to be at least the twice of the highest frequency. At least twice because if you are detecting

multiple frequencies its possible that an even higher sampling frequency will give better results.

So every frequency of interest must be an integer factor of sampling rate.

d-Block Size

Goertzel block size N is like the number of points in an equivalent FFT. It controls the frequency

resolution (also called bin width).for example, if your sampling rate is 8kHz and N is 100

samples, then your bin width is 80Hz.

This would steer you towards making N as high as possible, to get the highest frequency

resolution. The catch is that the higher N gets, the longer it takes to detect each tone, simply

because you have to wait longer for all the samples because you have to wait longer for all the

samples to come in. for example, at 8kHz sampling, it will take 100ms for 800 samples to be

Page 18: sateesh6.files.wordpress.com€¦ · Web viewProject report. on. DUAL TONE MULTIPLE-frequencies . ABSTRACT. Telephone is a very important system and the field of telecommunication

accumulated. If you’re trying to detect tones of short duration, you will have to use compatible

values of N. The third factor influencing your choice of N is the relationship between the

sampling rate and the target frequencies. Ideally you want the frequencies to be centered in their

respective bins. In other words, you want the target frequencies to be integer multiples of

sample_rate/N. The good news is that, unlike the FFT, N doesn’t have to be a power of two.

e-Precomputed constants

Once the sampling rate and block size is selected, then it is a simple five step process to compute

the constants needed to during processing

For the per-sample processing you’re going to need three variables. Let it be Q0, Q1

and Q2. Q1 is the value of Q0 last time. Q2 is just the value of Q0 two times ago. Q1 and Q2

must be initialized to zero at the beginning of each block of samples. For every sample, we have

to do these equations:

After running the per-sample equation N times, it’s time to see if the tone is present or not.

Page 19: sateesh6.files.wordpress.com€¦ · Web viewProject report. on. DUAL TONE MULTIPLE-frequencies . ABSTRACT. Telephone is a very important system and the field of telecommunication

A simple threshold test of the magnitude will tell if the tone was present or not. Reset Q2 and Q1

to zero and start the next block.

f-An optimized Goertzel

The optimized Goertzel requires less computation than the basic one, at the expanse of phase

information. The per-sample processing is the same, but the end of block processing is different.

Instead of computing real and imaginary components, and then converting those into relative

magnitude squared, you directly compute the following:

So make N as high as possible, to get the highest frequency resolution. The catch is that the

higher the N gets the longer it takes to detect each tone because you have to wait longer for all

samples to come in. For example.

The Goertzel algorithm is a filter bank implementation that directly calculates one

Discrete Fourier Transform (DFT) coefficient. Goertzel is not considered a Fast Fourier

Transform (FFT) because it is order n2, not order nlog2(n). The Goertzel algorithm is a second-

order filter that extracts the energy present at a specific frequency. It is more efficient than an

FFT when log2N or fewer coefficients of the DFT are needed. Calculating the DFT at 8

frequencies is as efficient in execution time as finding a 256 point FFT. Finding the DFT for 16

frequencies (the 8 DTMF tones and their second harmonics) is more complex than finding the

FFT. However, the filter bank implementation has the tremendous advantage that it can process

the input data as it arrives. The FFT has to wait until the entire sample window has arrived.

Therefore, the Goertzel algorithm reduces the data memory required significantly.

IMPLEMENTATION IN MATLAB :

Page 20: sateesh6.files.wordpress.com€¦ · Web viewProject report. on. DUAL TONE MULTIPLE-frequencies . ABSTRACT. Telephone is a very important system and the field of telecommunication

DTMF GENERATION:

We have done generation in MATLAB by two techniques. The first one is a simpler one using

MATLAB functions and the second one is by using IIR filters.

DTMF GENERATION TECHNIQUE 1

In this technique we have generated the DTMF tone s by using sine function of MATLAB. We

wrote a function, dtmfdial.m, to implement a DTMF dialer based on the frequency table defined

in Fig. 1.

Extended DTMF encoding table for Touch Tone dialing

The function of dtmfdial implements the following:

1. The input to the function is a vector of characters, each one being equal to one of the key

names on the telephone. The MATLAB structure called dtmf contains the key names in the field

dtmf.keys which is a 4 × 4 array that corresponds exactly to the keyboard layout in Fig. 1.

2. The output is a vector of samples with sampling rate fs = 8000 Hz containing the DTMF tones,

one tone pair per key. Each DTMF signal is the sum of a pair of (equal amplitude) sinusoidal

signals. The duration of each tone pair is exactly 0.20 sec., and a silence, about 0.05 sec. long,

should separate the DTMF tone pairs.

DTMF GENERATION TECHNIQUE 2

Page 21: sateesh6.files.wordpress.com€¦ · Web viewProject report. on. DUAL TONE MULTIPLE-frequencies . ABSTRACT. Telephone is a very important system and the field of telecommunication

In this technique we have generated the DTMF tones by IIR filters.

a-IIR Filter

Infinite Impulse Response (IIR) filters are the first choice when:

· Speed is paramount.

· Phase non-linearity is acceptable.

IIR filters are computationally more efficient than FIR filters as they require fewer coefficients

due to the fact that they use feedback or poles. However feedback can result in the filter

becoming unstable if the coefficients deviate from their true values.

Consider a general input–output equation of the form

This recursive type of equation represents an infinite impulse response (IIR) filter. The output

depends on the inputs as well as past outputs (with feedback). The output y(n), at time n, depends

not only on the current input x(n), at time n, and on past inputs x(n - 1), x(n - 2), . . . , x(n - N),

but also on past outputs y(n - 1), y(n - 2), . . . , y(n - M). If we assume all initial

conditions to be zero.

Hence, for an IIR filter to be stable, the magnitude of each of its poles must be less than 1, or:

Page 22: sateesh6.files.wordpress.com€¦ · Web viewProject report. on. DUAL TONE MULTIPLE-frequencies . ABSTRACT. Telephone is a very important system and the field of telecommunication

1. If |Pi| < 1, then h(n) Æ 0, as n Æ •, yielding a stable system. 2. If |Pi| > 1, then h(n) Æ •, as n

Æ •, yielding an unstable system.

If |Pi| = 1, the system is marginally stable, yielding an oscillatory response.

Furthermore, multiple-order poles on the unit circle yield an unstable system. Note again that

with all the coefficients bj = 0, the system reduces to a no recursive and stable FIR filter.

The direct form I structure is shown in Figure.

b- Technique 2

The tone generator is implemented using a pair of programmable secondorder IIR filters. When a

button is pressed the code for the dialed digit is used to select the appropriate filter coefficients

and initializing conditions from memory to produce a pair of tones (one high frequency and one

low frequency). The tones are added to produce the touch-tone signal.

APPLICATIONS:

Page 23: sateesh6.files.wordpress.com€¦ · Web viewProject report. on. DUAL TONE MULTIPLE-frequencies . ABSTRACT. Telephone is a very important system and the field of telecommunication

1. Telephone dialing.

2. Data entry.

3. Credit checking.

4. Voice mail system control.

5. Electronic mail system.

6. Telephone banking system.

INTRODUCTION TO MATLAB

Page 24: sateesh6.files.wordpress.com€¦ · Web viewProject report. on. DUAL TONE MULTIPLE-frequencies . ABSTRACT. Telephone is a very important system and the field of telecommunication

Matlab Introduction

MATLAB is a high performance language for technical computing .It integrates computation

visualization and programming in an easy to use environment

Mat lab stands for matrix laboratory. It was written originally to provide easy access to matrix

software developed by LINPACK (linear system package) and EISPACK (Eigen system

package) projects.

MATLAB is therefore built on a foundation of sophisticated matrix software in which the basic

element is matrix that does not require pre dimensioning

Typical uses of MATLAB

1. Math and computation

2. Algorithm development

3. Data acquisition

4. Data analysis ,exploration ands visualization

5. Scientific and engineering graphics

The main features of MATLAB

1. Advance algorithm for high performance numerical computation ,especially in the Field

matrix algebra

2. A large collection of predefined mathematical functions and the ability to define one’s own

functions.

3. Two-and three dimensional graphics for plotting and displaying data

4. A complete online help system

5. Powerful,matrix or vector oriented high level programming language for individual

applications.

Page 25: sateesh6.files.wordpress.com€¦ · Web viewProject report. on. DUAL TONE MULTIPLE-frequencies . ABSTRACT. Telephone is a very important system and the field of telecommunication

6. Toolboxes available for solving advanced problems in several application areas

Features and capabilities of MATLAB

The MATLAB System

MATLAB

MATLAB

Programming language

User written / Built in functions

Graphics

2-D graphics

3-D graphics

Color and lighting

Animation

Computation

Linear algebra

Signal processing

Quadrature

Etc

External interface

Interface with C and

FORTRAN

Programs

Tool boxes

Signal processingImage processingControl systemsNeural NetworksCommunicationsRobust controlStatistics

Page 26: sateesh6.files.wordpress.com€¦ · Web viewProject report. on. DUAL TONE MULTIPLE-frequencies . ABSTRACT. Telephone is a very important system and the field of telecommunication

The MATLAB system consists of five main parts:

Development Environment.

This is the set of tools and facilities that help you use MATLAB functions and files. Many of

these tools are graphical user interfaces. It includes the MATLAB desktop and Command

Window, a command history, an editor and debugger, and browsers for viewing help, the

workspace, files, and the search path.

The MATLAB Mathematical Function Library.

This is a vast collection of computational algorithms ranging from elementary functions, like

sum, sine, cosine, and complex arithmetic, to more sophisticated functions like matrix inverse,

matrix Eigen values, Bessel functions, and fast Fourier transforms.

The MATLAB Language.

This is a high-level matrix/array language with control flow statements, functions, data

structures, input/output, and object-oriented programming features. It allows both "programming

in the small" to rapidly create quick and dirty throw-away programs, and "programming in the

large" to create large and complex application programs.

Graphics.

MATLAB has extensive facilities for displaying vectors and matrices as graphs, as well as

annotating and printing these graphs. It includes high-level functions for two-dimensional and

three-dimensional data visualization, image processing, animation, and presentation graphics. It

also includes low-level functions that allow you to fully customize the appearance of graphics as

well as to build complete graphical user interfaces on your MATLAB applications.

The MATLAB Application Program Interface (API).

Page 27: sateesh6.files.wordpress.com€¦ · Web viewProject report. on. DUAL TONE MULTIPLE-frequencies . ABSTRACT. Telephone is a very important system and the field of telecommunication

This is a library that allows you to write C and Fortran programs that interact with MATLAB. It

includes facilities for calling routines from MATLAB (dynamic linking), calling MATLAB as a

computational engine, and for reading and writing MAT-files.

Starting MATLAB

On Windows platforms, start MATLAB by double-clicking the MATLAB shortcut icon on your

Windows desktop. On UNIX platforms, start MATLAB by typing mat lab at the operating

system prompt. You can customize MATLAB startup. For example, you can change the

directory in which MATLAB starts or automatically execute MATLAB statements in a script file

named startup.m

MATLAB Desktop

When you start MATLAB, the MATLAB desktop appears, containing tools (graphical user

interfaces) for managing files, variables, and applications associated with MATLAB. The

following illustration shows the default desktop. You can customize the arrangement of tools and

documents to suit your needs. For more information about the desktop tools .

Page 28: sateesh6.files.wordpress.com€¦ · Web viewProject report. on. DUAL TONE MULTIPLE-frequencies . ABSTRACT. Telephone is a very important system and the field of telecommunication
Page 29: sateesh6.files.wordpress.com€¦ · Web viewProject report. on. DUAL TONE MULTIPLE-frequencies . ABSTRACT. Telephone is a very important system and the field of telecommunication

Implementations

1. Arithmetic operations

Entering Matrices

The best way for you to get started with MATLAB is to learn how to handle

matrices. Start MATLAB and follow along with each example.

You can enter matrices into MATLAB in several different ways:

• Enter an explicit list of elements.

• Load matrices from external data files.

• Generate matrices using built-in functions.

• Create matrices with your own functions in M-files.

Start by entering Dürer’s matrix as a list of its elements. You only have to

follow a few basic conventions:

• Separate the elements of a row with blanks or commas.

• Use a semicolon, to indicate the end of each row.

• Surround the entire list of elements with square brackets, [ ].

To enter matrix, simply type in the Command Window

A = [16 3 2 13; 5 10 11 8; 9 6 7 12; 4 15 14 1]

Page 30: sateesh6.files.wordpress.com€¦ · Web viewProject report. on. DUAL TONE MULTIPLE-frequencies . ABSTRACT. Telephone is a very important system and the field of telecommunication

MATLAB displays the matrix you just entered:

A =

16 3 2 13

5 10 11 8

9 6 7 12

4 15 14 1

This matrix matches the numbers in the engraving. Once you have entered

the matrix, it is automatically remembered in the MATLAB workspace. You

can refer to it simply as A. Now that you have A in the workspace,

sum, transpose, and diag

You are probably already aware that the special properties of a magic square

have to do with the various ways of summing its elements. If you take the

sum along any row or column, or along either of the two main diagonals,

you will always get the same number. Let us verify that using MATLAB.

The first statement to try is

sum(A)

MATLAB replies with

ans =

34 34 34 34

When you do not specify an output variable, MATLAB uses the variable ans,

short for answer, to store the results of a calculation. You have computed a

Page 31: sateesh6.files.wordpress.com€¦ · Web viewProject report. on. DUAL TONE MULTIPLE-frequencies . ABSTRACT. Telephone is a very important system and the field of telecommunication

row vector containing the sums of the columns of A. Sure enough, each of the

columns has the same sum, the magic sum, 34.

How about the row sums? MATLAB has a preference for working with the

columns of a matrix, so one way to get the row sums is to transpose the

matrix, compute the column sums of the transpose, and then transpose the

result. For an additional way that avoids the double transpose use the

dimension argument for the sum function.

MATLAB has two transpose operators. The apostrophe operator (e.g., A')

performs a complex conjugate transposition. It flips a matrix about its main

diagonal, and also changes the sign of the imaginary component of any

complex elements of the matrix. The apostrophe-dot operator (e.g., A'.),

transposes without affecting the sign of complex elements. For matrices

containing all real elements, the two operators return the same result.

So

A'

produces

ans =

16 5 9 4

3 10 6 15

2 11 7 14

13 8 12 1

Page 32: sateesh6.files.wordpress.com€¦ · Web viewProject report. on. DUAL TONE MULTIPLE-frequencies . ABSTRACT. Telephone is a very important system and the field of telecommunication

and

sum(A')'

produces a column vector containing the row sums

ans =

34

34

34

34

The sum of the elements on the main diagonal is obtained with the sum and

the diag functions:

diag(A)

produces

ans =

16

10

7

1

and

sum(diag(A))

produces

ans =

Page 33: sateesh6.files.wordpress.com€¦ · Web viewProject report. on. DUAL TONE MULTIPLE-frequencies . ABSTRACT. Telephone is a very important system and the field of telecommunication

34

The other diagonal, the so-called anti diagonal, is not so important

Mathematically, so MATLAB does not have a ready-made function for it.

But a function originally intended for use in graphics, fliplr, flips a matrix

From left to right:

Sum (diag(fliplr(A)))

ans =

34

You have verified that the matrix in Dürer’s engraving is indeed a magic

Square and, in the process, have sampled a few MATLAB matrix operations.

Operators

Expressions use familiar arithmetic operators and precedence rules.

+ Addition

- Subtraction

* Multiplication

/ Division

\ Left division (described in “Matrices and Linear Algebra” in the

MATLAB documentation)

. ^ Power

' Complex conjugate transpose

( ) Specify evaluation order

Page 34: sateesh6.files.wordpress.com€¦ · Web viewProject report. on. DUAL TONE MULTIPLE-frequencies . ABSTRACT. Telephone is a very important system and the field of telecommunication

Generating Matrices

MATLAB provides four functions that generate basic matrices.

zeros All zeros

ones All ones

rand Uniformly distributed random elements

randn Normally distributed random elements

Here are some examples:

Z = zeros(2,4)

Z =

0 0 0 0

0 0 0 0

F = 5*ones(3,3)

F =

5 5 5

5 5 5

5 5 5

N = fix(10*rand(1,10))

N =

9 2 6 4 8 7 4 0 8 4

R = randn(4,4)

R =

Page 35: sateesh6.files.wordpress.com€¦ · Web viewProject report. on. DUAL TONE MULTIPLE-frequencies . ABSTRACT. Telephone is a very important system and the field of telecommunication

0.6353 0.0860 -0.3210 -1.2316

-0.6014 -2.0046 1.2366 1.0556

0.5512 -0.4931 -0.6313 -0.1132

-1.0998 0.4620 -2.3252 0.3792

M-Files

You can create your own matrices using M-files, which are text files containing

MATLAB code. Use the MATLAB Editor or another text editor to create a file

Containing the same statements you would type at the MATLAB command

Line. Save the file under a name that ends in .m.

For example, create a file containing these five lines:

A = [...

16.0 3.0 2.0 13.0

5.0 10.0 11.0 8.0

9.0 6.0 7.0 12.0

4.0 15.0 14.0 1.0 ];

Store the file under the name magik.m. Then the statement

magik

reads the file and creates a variable, A, containing our example matrix.

Page 36: sateesh6.files.wordpress.com€¦ · Web viewProject report. on. DUAL TONE MULTIPLE-frequencies . ABSTRACT. Telephone is a very important system and the field of telecommunication

Graph Components

MATLAB displays graphs in a special window known as a figure. To create

a graph, you need to define a coordinate system. Therefore every graph is

placed within axes, which are contained by the figure.

The actual visual representation of the data is achieved with graphics objects

like lines and surfaces. These objects are drawn within the coordinate system

defined by the axes, which MATLAB automatically creates specifically to

accommodate the range of the data. The actual data is stored as properties of

the graphics objects.

Page 37: sateesh6.files.wordpress.com€¦ · Web viewProject report. on. DUAL TONE MULTIPLE-frequencies . ABSTRACT. Telephone is a very important system and the field of telecommunication

Plotting Tools

Plotting tools are attached to figures and create an environment for creating

Graphs. These tools enable you to do the following:

• Select from a wide variety of graph types

• Change the type of graph that represents a variable

• See and set the properties of graphics objects

• Annotate graphs with text, arrows, etc.

• Create and arrange subplots in the figure

• Drag and drop data into graphs

Display the plotting tools from the View menu or by clicking the plotting tools

icon in the figure toolbar, as shown in the following picture.

Editor/Debugger

Use the Editor/Debugger to create and debug M-files, which are programs you

write to run MATLAB functions. The Editor/Debugger provides a graphical

user interface for text editing, as well as for M-file debugging. To create or

Page 38: sateesh6.files.wordpress.com€¦ · Web viewProject report. on. DUAL TONE MULTIPLE-frequencies . ABSTRACT. Telephone is a very important system and the field of telecommunication

edit an M-file use File > New or File > Open, or use the edit function.

Page 39: sateesh6.files.wordpress.com€¦ · Web viewProject report. on. DUAL TONE MULTIPLE-frequencies . ABSTRACT. Telephone is a very important system and the field of telecommunication

RESULTS:

Page 40: sateesh6.files.wordpress.com€¦ · Web viewProject report. on. DUAL TONE MULTIPLE-frequencies . ABSTRACT. Telephone is a very important system and the field of telecommunication

CONCLUSION:

Dual-tone multi-frequency (DTMF) is an international signaling standard for telephone digits

(number buttons). These signals are used in touch-tone telephone call signaling as well as many

other areas such as interactive control applications, telephone banking and pager systems. DTMF

is the method by which the telephone numbers are generated and then detected.

This project is designed on the generation and detection of DTMF signals. The generation is

done by IIR filters and detection is done by using goertzel algorithm. The system has been

developed in Matlab.


Recommended