0% found this document useful (0 votes)
46 views1 page

Goertzel Algorithm

The Goertzel Algorithm is a method for computing specific DFT coefficients efficiently, particularly useful for tone detection. It involves recursive calculations of intermediate values (qi) based on input samples and cosine terms, leading to the final output which includes real and imaginary parts. The amplitude of the DFT coefficient is derived from the square root of the sum of the squares of these parts, with specific adjustments for the coefficient at k=0.

Uploaded by

Trader Cat
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
46 views1 page

Goertzel Algorithm

The Goertzel Algorithm is a method for computing specific DFT coefficients efficiently, particularly useful for tone detection. It involves recursive calculations of intermediate values (qi) based on input samples and cosine terms, leading to the final output which includes real and imaginary parts. The amplitude of the DFT coefficient is derived from the square root of the sum of the squares of these parts, with specific adjustments for the coefficient at k=0.

Uploaded by

Trader Cat
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Goertzel Algorithm

2𝜋𝑘
1 − 𝑒 𝑖 𝑁 𝑧 −1
𝐻𝑘 (𝑧) =
2𝜋𝑘 −1
1 − 2 cos ( ) 𝑧 + 𝑧 −2
𝑁

For i = 0, 1, …, N – 1
2𝜋𝑘
𝑞𝑖 = 𝑥𝑖 + 2 cos ( 𝑁
) 𝑞𝑖−1 − 𝑞𝑖−2 where 𝑞𝑣 = 0 when 𝑣 < 0.

For i = N
𝑞𝑁−1 𝑞𝑁−2
𝑞𝑁−1 = 𝑁
, 𝑞𝑁−2 = 𝑁
2𝜋𝑘
𝑞𝑁 = 2 cos ( ) 𝑞𝑁−1 − 𝑞𝑁−2
𝑁
2𝜋𝑘
𝑦𝑁 = 𝑞𝑁 − 𝑒 𝑖 𝑁 𝑞𝑁−1
or
2𝜋𝑘
𝑅𝑒(𝑦𝑁 ) = 𝑞𝑁 − cos ( ) 𝑞𝑁−1
𝑁
2𝜋𝑘
𝐼𝑚(𝑦𝑁 ) = sin ( ) 𝑞𝑁−1
𝑁
2𝜋𝑘
𝐴𝑚𝑝𝑘 = 𝑞𝑁 2 + 𝑞𝑁−1 2 − 2 cos ( ) 𝑞𝑁 𝑞𝑁−1
𝑁

For trigonometric form Discrete Fourier Transform, amplitude is equal to square root of the
sum of squares of real and imaginary parts of the DFT coefficient; that is

𝐴𝑚𝑝𝑘 = √𝑅𝑒(𝑦𝑁 )2 + 𝐼𝑚(𝑦𝑁 )2


𝐴𝑘 = 2 𝑅𝑒(𝑦𝑁 ) and 𝐵𝑘 = 2 𝐼𝑚(𝑦𝑁 )
For k = 0, the coefficient C is adopted as 0.5 Amp0.

You might also like