Applications of Goertzel Algorithm
Applications of Goertzel Algorithm
Goertzel Algorithm
Presented by
Wattamwar Reshma R.
Roll No:13
ME-FY(Digital system)
A basic Goertzel
Before you can do the actual Goertzel, you must
do some preliminary calculations:
1. Decide on the sampling rate.
2. Choose the block size, N.
3. Precompute one cosine and one sine term.
4. Precompute one coefficient.
Sampling rate:
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.
Precomputed constants
f tone
k N
fs
per-sample processing
calculate Q0, Q1, and Q2.
Q0 = coeff * Q1 - Q2 + sample
Q2 = Q1
Q1 = Q0
After running the per-sample equations N times,
it's time to see if the tone is present or not.
Magnitude calculation:
real = (Q1 - Q2 * cosine)
imag = (Q2 * sine)
(Magnitude)2 = (real)2+(imag)2
An optimized Goertzel
The optimized Goertzel requires less
computation than the basic one, at the expense
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:
(Magnitude)2=(Q1)2+(Q2)2-Q1*Q2*coeff
Implementation
(1) The first stage calculates an intermediate sequence
S(n).
Implementation
The Z transform of the first filter stage given in equation
The combined transfer function of the cascade of the two filter stages
is then
Applications
DTMF Signaling
In a DTMF signaling system a combination of
two frequency tones represents a specific digit,
character (A, B, C or D) or symbol (* or #).
Two types of signal processing are involved:
Coding or generation.
Decoding or detection.
For coding, two sinusoidal sequences of finite
length are added in order to represent a digit,
character or symbol as shown in the following
example.
770Hz
852Hz
941Hz
Output
697Hz
770
1336
Freq (Hz)
Frequency
697
770
852
941
1209
1336
1477
1633
18
20
22
24
31
34
38
42
Coefficient
(decimal)
1.703275
1.635585
1.562297
1.482867
1.163138
1.008835
0.790074
0.559454
Coefficient
(Q15)
0x6D02*
0x68B1*
0x63FC*
0x5EE7*
0x4A70*
0x4090*
0x6521
0x479C
Advantage
Simple structure of algorithm makes it well
suited to small processors.
More efficient than FFT for small number of
frequencies ( if M < log2N).
THANK YOU!