<< Chapter < Page Chapter >> Page >

It is possible to modify this algorithm to allow entering the data in forward order rather than reverse order. The difference [link] becomes

y ( m ) = z - 1 y ( m - 1 ) + x ( m - 1 )

if [link] becomes

C ( k ) = z N - 1 y ( N )

for y ( 0 ) = 0 . This is the algorithm programmed later.

The second-order goertzel algorithm

One of the reasons the first-order Goertzel algorithm does not improve efficiency is that the constant in the feedback or recursive path iscomplex and, therefore, requires four real multiplications and two real additions. A modification of the scheme to make it second-order removesthe complex multiplications and reduces the number of required multiplications by two.

Define the variable q ( m ) so that

y ( m ) = q ( m ) - z - 1 q ( m - 1 ) .

This substituted into the right-hand side of [link] gives

y ( m ) = z q ( m - 1 ) - q ( m - 2 ) + x ( N - m ) .

Combining [link] and [link] gives the second order difference equation

q ( m ) = ( z + z - 1 ) q ( m - 1 ) - q ( m - 2 ) + x ( N - m )

which together with the output [link] , comprise the second-order Goertzel algorithm where

X ( z ) = y ( N )

for initial conditions q ( 0 ) = q ( - 1 ) = 0 .

A similar development starting with [link] gives a second-order algorithm with forward ordered input as

q ( m ) = ( z + z - 1 ) q ( m - 1 ) - q ( m - 2 ) + x ( m - 1 )
y ( m ) = q ( m ) - z q ( - 1 )

with

X ( z ) = z N - 1 y ( N )

and for q ( 0 ) = q ( - 1 ) = 0 .

Note that both difference [link] and [link] are not changed if z is replaced with z - 1 , only the output [link] and [link] are different. This means that the polynomial X ( z ) may be evaluated at a particular z and its inverse z - 1 from one solution of the difference [link] or [link] using the output equations

X ( z ) = q ( N ) - z - 1 q ( N - 1 )

and

X ( 1 / z ) = z N - 1 ( q ( N ) - z q ( N - 1 ) ) .

Clearly, this allows the DFT of a sequence to be calculated with half the arithmetic since the outputs are calculated two at a time. Thesecond-order DE actually produces a solution q ( m ) that contains two first-order components. The output equations are, in effect, zeros thatcancel one or the other pole of the second-order solution to give the desired first-order solution. In addition to allowing the calculating oftwo outputs at a time, the second-order DE requires half the number of real multiplications as the first-order form. This is because thecoefficient of the q ( m - 2 ) is unity and the coefficient of the q ( m - 1 ) is real if z and z - 1 are complex conjugates of each other which is true for the DFT.

Analysis of arithmetic complexity and timings

Analysis of the various forms of the Goertzel algorithm from their programs gives the following operation count for real multiplications andreal additions assuming real data.

Algorithm Real Mults. Real Adds Trig Eval.
Direct DFT 4 N 2 4 N 2 2 N 2
First-Order 4 N 2 4 N 2 - 2 N 2 N
Second-Order 2 N 2 + 2 N 4 N 2 2 N
Second-Order 2 N 2 + N 2 N 2 + N N

Timings of the algorithms on a PC in milliseconds are given in the following table.

Algorithm N = 125 N = 257
Direct DFT 4.90 19.83
First-Order 4.01 16.70
Second-Order 2.64 11.04
Second-Order 2 1.32 5.55

These timings track the floating point operation counts fairly well.

Conclusions

Goertzel's algorithm in its first-order form is not particularly interesting, but the two-at-a-time second-order form is significantlyfaster than a direct DFT. It can also be used for any polynomial evaluation or for the DTFT at unequally spaced values or for evaluating afew DFT terms. A very interesting observation is that the inner-most loop of the Glassman-Ferguson FFT [link] is a first-order Goertzel algorithm even though that FFT is developed in a very different framework.

In addition to floating-point arithmetic counts, the number of trigonometric function evaluations that must be made or the size of a table to storeprecomputed values should be considered. Since the value of the W n k terms in [link] are iteratively calculate in the IIR filter structure, there is round-off error accumulation that should be analyzed in anyapplication.

It may be possible to further improve the efficiency of the second-order Goertzel algorithm for calculating all of the DFT of a number sequence.Perhaps a fourth order DE could calculate four output values at a time and they could be separated by a numerator that would cancel three of thezeros. Perhaps the algorithm could be arranged in stages to give an N log ( N ) operation count. The current algorithm does not take into account any of the symmetries of the input index. Perhaps some of theideas used in developing the QFT [link] , [link] , [link] could be used here.

The quick fourier transform (qft)

One stage of the QFT can use the symmetries of the sines and cosines to calculate a DFT more efficiently than directly implementing the definition Multidimensional Index Mapping: Equation 1 . Similar to the Goertzel algorithm, the one-stage QFT is a better N 2 DFT algorithm for arbitrary lengths. See The Cooley-Tukey Fast Fourier Transform Algorithm: The Quick Fourier Transform, An FFT based on Symmetries .

Questions & Answers

I'm interested in biological psychology and cognitive psychology
Tanya Reply
what does preconceived mean
sammie Reply
physiological Psychology
Nwosu Reply
How can I develope my cognitive domain
Amanyire Reply
why is communication effective
Dakolo Reply
Communication is effective because it allows individuals to share ideas, thoughts, and information with others.
effective communication can lead to improved outcomes in various settings, including personal relationships, business environments, and educational settings. By communicating effectively, individuals can negotiate effectively, solve problems collaboratively, and work towards common goals.
it starts up serve and return practice/assessments.it helps find voice talking therapy also assessments through relaxed conversation.
miss
Every time someone flushes a toilet in the apartment building, the person begins to jumb back automatically after hearing the flush, before the water temperature changes. Identify the types of learning, if it is classical conditioning identify the NS, UCS, CS and CR. If it is operant conditioning, identify the type of consequence positive reinforcement, negative reinforcement or punishment
Wekolamo Reply
please i need answer
Wekolamo
because it helps many people around the world to understand how to interact with other people and understand them well, for example at work (job).
Manix Reply
Agreed 👍 There are many parts of our brains and behaviors, we really need to get to know. Blessings for everyone and happy Sunday!
ARC
A child is a member of community not society elucidate ?
JESSY Reply
Isn't practices worldwide, be it psychology, be it science. isn't much just a false belief of control over something the mind cannot truly comprehend?
Simon Reply
compare and contrast skinner's perspective on personality development on freud
namakula Reply
Skinner skipped the whole unconscious phenomenon and rather emphasized on classical conditioning
war
explain how nature and nurture affect the development and later the productivity of an individual.
Amesalu Reply
nature is an hereditary factor while nurture is an environmental factor which constitute an individual personality. so if an individual's parent has a deviant behavior and was also brought up in an deviant environment, observation of the behavior and the inborn trait we make the individual deviant.
Samuel
I am taking this course because I am hoping that I could somehow learn more about my chosen field of interest and due to the fact that being a PsyD really ignites my passion as an individual the more I hope to learn about developing and literally explore the complexity of my critical thinking skills
Zyryn Reply
good👍
Jonathan
and having a good philosophy of the world is like a sandwich and a peanut butter 👍
Jonathan
generally amnesi how long yrs memory loss
Kelu Reply
interpersonal relationships
Abdulfatai Reply
What would be the best educational aid(s) for gifted kids/savants?
Heidi Reply
treat them normal, if they want help then give them. that will make everyone happy
Saurabh
Got questions? Join the online conversation and get instant answers!
Jobilize.com Reply

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Fast fourier transforms. OpenStax CNX. Nov 18, 2012 Download for free at http://cnx.org/content/col10550/1.22
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Fast fourier transforms' conversation and receive update notifications?

Ask