12

TEEL 4204 – Communications Lab II

DTMF Receiver– Part I

Name: Date:

Introduction

The circuit diagram of a telephone circuit is shown in Fig. 1. The telephone is generally connected to the central office using a pair of twisted wires. However, new installations are using a coaxial-fiber system for wide bandwidth communications. Unlike audio systems with bandwidths of 20 Hz – 20 kHz for high fidelity sound, a telephone operates over the 300 Hz – 3.3 kHz bandwidth. The reason is that most of the energy of human voice is within this frequency bandwidth and a 3 kHz bandwidth is enough for reliable conversation (Reliable: yes, but not excellent!). The bandwidth limitation is the main reason why we have trouble distinguishing “b” from “p” from “d” over a telephone. The audio voltage swing is 5-500 mV peak, leading to a dynamic range of 40 dB, which is much lower than hi-fi system (dynamic range of 70-90 dB). The telephone operates on a 48 V DC system supplied over a pair of lines from the central telephone office. This is historical since the telephone was invented before the AC 60 Hz power distribution system and could not be changed anymore. To grab your attention, the control office sends bursts of a 20 Hz sinusoidal signal with a 75 V rms voltage to activate the ringer. The bursts are on for 2 sec and off for 4 seconds. When a party answers the phone, the telephone switch closes, the central office detects a DC current in the circuit and stops the ringing signal. You could ask why 75 V? It is huge! The answer is that this signal was needed to activate inefficient ringers on old telephones. In newer phones with electronic ringers, a TTL (5 V) digital signal is enough to activate the ringer. However, this telephone system will not be compatible with old phones!

Fig. 1. The home telephone system.

The lines between the central telephone office and your home therefore carry:


In order to dial a phone number, you need to transmit specific frequencies which are within the 300 Hz – 3,300 Hz range. However, if you assign a simple frequency to each number, then somebody whistling when you are dialing (or a large clean sound) can actually cause you to misdial! A very nice way to solve this interference problem is to send two frequencies for each number. The probability that two specific frequencies with a ratio equal to a rational number are present in the background noise when you are dialing is really very low!

The dial pad of a telephone is shown in Fig. 2. When a button is pushed, the two tones corresponding to the intersection of the vertical and horizontal axes are sent. Notice that no frequency is the harmonic of any other frequency thereby avoiding problems due to distortion and harmonic generation. Also, no frequency can be synthesized from the sum or difference of any two frequencies, thereby avoiding misdialing problems due to intermodulation products.

Fig. 2: A telephone dial-pad. (All frequencies are in Hz.)

Background

You will be asked to observe the power spectrum of a given signal (or combination of signals) and design a series of digital filters that will allow you to isolate and analyze specific signal frequencies. You will be designing the filters in a DTMF receiver to detect the numbers dialed by the user. You have the option of designing both a Finite Impulse Response (FIR) and an Infinite Impulse Response (IIR) filters. You will need to determine a sampling frequency, filter specifications, and design method.

4.2.1 Finite Impulse Response Filters

A FIR or non-recursive filter has no feedback. The filter’s output is a function of the input signal only. The difference equation is given by

where, y[n] is the filter output, x[n] is the signal being filtered, bk are the filter coefficients, and where N is the filter order. The output signal of the filter in response to an impulse is limited only the last values of x[n], so after N + 1 samples the response returns to zero. For example, the response of a fifth order filter (Fig. 21) consists of a finite sequence of 6(N + 1) samples.

4.2.2 Infinite Impulse Response filters

Infinite Impulse Response (or recursive) filters are a more complex type of filter than a FIR filter, with an output at time n, given by:

where y[n] is the filter output, x[n] is the signal being filtered, and bk and ai are the filter coefficients, and where N previous inputs and M outputs. The output signal of the filter can be non-zero infinitely, even when the input signal has a value of zero. In theory, when a recursive filter is excited by an impulse, the output will persist forever.

The corresponding transfer function for an IIR filter is given by equation.

This equation, in addition to having N zeros (as the FIR, the roots of N(Z)), it also has poles M poles, (the roots of D[Z]), which for a stable filter, are required to be inside the unit circle in the z plane.

Sampling frequency

The symbol fs denotes the sampling frequency, which is the expected rate at which you sample the input signal to the filter. In the LabVIEW Digital Filter Design Toolkit, the default sampling frequency is 1, which is the normalized sampling frequency.

Filter design specifications

In this lab, you will be asked to design low-pass, high-pass, band-pass, and band-stop filters, the characteristics of which are outlined below.

As illustrated in Fig. 23 and Fig. 24 (low-pass and high-pass), the frequency range from the pass-band edge frequency (cut-off frequency) to the stop-band edge frequency is the transition band, which has an unspecified frequency response. The filter pass-band and stop-band may contain oscillations, which are known as ripples. A typical example of a ripple appears in the circle (zoomed view) of the previous in Fig. 23. In the figure, δP indicates the magnitude of the pass-band ripple (or the maximum deviation from the unity) and δS indicates the magnitude of the response of the stop-band ripple (or the maximum deviation from zero).

For band-pass filters (Fig. 25), stop-band edge frequency 1 indicates the maximum frequency of the lower frequency range to be attenuated, and the stop-band edge frequency 2 indicates the minimum frequency of the higher frequency range to be attenuated. The frequency range between pass-band edge frequencies 1 and 2 indicates the range of frequencies that can pass through the filter.

For band-stop filters, (Fig. 26), pass-band edge frequency 1 indicates the maximum frequency of the lower frequency range that can pass through the filter, and pass-band edge frequency 2 indicates the minimum frequency of the higher frequency range that can pass through the filter. The frequency range between stop-band edge frequencies 1 and 2 indicates the range of frequencies to be attenuated.

Design methods

The LabVIEW Digital Filter Design Toolkit[1] provides the following finite impulse response (FIR) filter design methods:

·  Kaiser Window

·  Dolph-Chebyshev Window

·  Equiripple FIR

The Kaiser Window method and the Dolph-Chebyshev Window method allow you to obtain the filter coefficients directly from the analytical equations, making them easier to use than the Equiripple FIR method. The Equiripple FIR method is more complicated because it uses a least square optimization to produce an optimal filter and is often the best solution for most FIR filter design problems.

In addition to the FIR-based methods, the Digital Filter Design Toolkit supports the following infinite impulse response (IIR) filter design methods:

·  Butterworth

·  Chebyshev

·  Inverse Chebyshev

·  Elliptic

The following table summarizes the main features of the four IIR-based design methods so you can determine the best IIR filter design method to use.

Pre-Lab

In this lab, you will be designing four digital filters: low pass, high-pass, band-pass, and band-stop. For each filter type, you will analyze the power spectrum of a chosen signal and frame a set of specifications for a desired output. You will be using the Dual-Tone Multi-Frequency (DTMF) coding scheme. You have probably heard them when you dial a telephone number. Each key on the phone is assigned a pair of frequencies. Thus each key will two peaks in the power spectrum of the signal (Fig. 27).

Given a desired output, you can easily determine the frequency specifications of your filter design by using tones of the DTMF coding.

a)  A Low-pass filter that isolates the lower tone in the DTMF for a key press of 4 (Fig. 28). Record your specifications in Table IV for future reference.

b)  A High-pass filter that isolates the higher frequency in the DTMF for a key press of 4 (Fig. 28). Record your specifications in Table IV for future reference.

Lab Procedure

Description

First, you will download to your PC’s hard disk the file DTMF_demo.vi which is available at www.aprende-pr.com. As shown in the next Figure, you will be required to design the two marked filters and the RMS voltage threshold necessary to detect the number 4 pulse. That is, the filter parameters and the RMS voltage threshold should be selected so that only when you generate the dual tones (770 Hz and 1209 Hz) the threshold will be exceeded and the receiver will acknowledge, with a green light, that a “4” was received. Of course, the signal detection becomes harder under the presence of noise, and if the noise power is high enough, the receiver will occasionally fail in detecting the right signal.

Double click on the “Classical Filter” VI and a pop-up window (Fig. 31) will appear. This pop-up window is your design tool screen where you enter the respective filter design specifications (Table IV).

Use either one, or both, of the following tables to report the parameters selected for each one of the two designed filters.

Your design will be judged on the following criteria:

1.  Filter order: The smaller it is, the better. The higher the filter order, the higher is the computational burden.

2.  Ability to detect the signal when there is no noise present.

3.  The highest noise power under which the receiver is able to successfully (i.e. without errors) detect the signal.

When done, e-mail this report to . Do not forget to include your filter specifications (Table 4 and/or Table 5). Also, e-mail your VI. It will be tested by your professor. The best group design will earn full points, plus a 5 points bonus transferable to the mid-term exam.

In the second part of this lab/project, you will be required to modify the current program so that any key pressed, not just the number 4, is successfully detected by the receiver.

Start thinking how to do it!