Lab 7 DTMF Tone Generation and Detection Using Goertzel Algorithm Objectives
Lab 7 DTMF Tone Generation and Detection Using Goertzel Algorithm Objectives
L 2 852 / f s
H L ( z)
z sin L
z 2 z cos L 1
2
DTMF Tone
( n)
y7 ( n )
7
z sin H
H H ( z) 2
z 2 z cos H 1
H 2 1209 / f s
Figure 1. Digital DTMF tone generator for the digit 7.
The industry standard frequency specifications for all the keys are listed in Figure 2.
697 Hz
770 Hz
852 Hz
941 Hz
MATLAB
According to the DTMF tone specification, develop the MATLAB program that will be able to generate
each tone.
Part B: DTMF detection
The DTMF detection relies on the Geortzel algorithm (Geortzel filter). The main purpose of using the
Goertzel filters is to calculate the spectral value at the specified frequency index using the filtering method.
Its advantage includes the reduction of the required computations and avoidance of complex algebra. The
seven modified Goertzel filters are implemented in parallel shown in Figure 3. As shown in Figure 3, the
output from each Goertzel filter is fed to its detector to compute its spectral value, which is given by
m Ak
2
205
X (k )
Each calculated spectral value m is compared to a specified threshold value. If the detected value m is
larger than the threshold value, the logic operation outputs the logic 1 otherwise it outputs the logic 0. Then
the logic operation at the last stage is to decode the key information based on the 7-bit binary pattern.
H18 ( z )
H20 ( z )
x ( n ) y7 ( n )
DTMF Tone
H22 ( z )
H24 ( z )
H31 ( z )
H34 ( z )
H38 ( z )
v18 (n)
v20 (n)
v22 (n)
v24 (n)
v31 (n)
v34 (n)
v38 (n)
A18
logic
A20
logic
A22
logic
0
0
1
0
A24
logic
A31
logic
A34
logic
logic
1
0
0
A38
logic
Threshold
( A18 A20 A22 A24 A31 A34 A38 ) / 4
Figure 3 DTMF tone detector.
Write a MATLAB program to perform detection and display each detected key on the screen.