# Goertzel derivation

Referring to this link, about Goertzel,I am confused about the final equation after N iterations Where does

real = (q1 - q2 * cosine)


and

imag = (q2 * sine)


come from?

And how does the transposition theorem work? (i.e. swapping input and output stages for direct form II realization)

They are needed in order to compute the complex-valued DFT output.

Desired realization

$$H_1(z) = \frac{1}{1-e^{-j\frac{2\pi k}{N}} z^{-1}}$$

The iteration computes

$$H_2(z) = \frac{1}{1-2 \cos(\frac{2\pi k}{N})z^{-1} + z^{-2}} = \frac{1}{1-e^{-j\frac{2\pi k}{N}} z^{-1}} \frac{1}{1-e^{j\frac{2\pi k}{N}} z^{-1}}$$

So that final step implements $$1-e^{j\frac{2\pi k}{N}} z^{-1}$$

because

$$H_1(z) = H_2(z)[1-e^{j\frac{2\pi k}{N}} z^{-1}]$$

• Yes, But can someone derive the real and imag term? – gari Jun 27 '19 at 16:58
• @gari does referring you to Euler's formula representing the complex exponential as sum of sine and cosine help you? – Marcus Müller Jun 28 '19 at 7:21
• That's fine. But why does the term q1 and q2 appear in real? – gari Jun 30 '19 at 5:30