## Four Ways to Compute an Inverse FFT Using the Forward FFT Algorithm

If you need to compute inverse fast Fourier transforms (inverse FFTs) but you only have forward FFT software (or forward FFT FPGA cores) available to you, below are four ways to solve your problem.

Preliminaries To define what we're thinking about here, an N-point forward FFT and an N-point inverse FFT are described by:

$$ Forward \ FFT \rightarrow X(m) = \sum_{n=0}^{N-1} x(n)e^{-j2\pi nm/N} \tag{1} $$ $$ Inverse \ FFT \rightarrow x(n) = {1 \over N} \sum_{m=0}^{N-1}...## Correcting an Important Goertzel Filter Misconception

Recently I was on the Signal Processing Stack Exchange web site (a question and answer site for DSP people) and I read a posted question regarding Goertzel filters [1]. One of the subscribers posted a reply to the question by pointing interested readers to a Wikipedia web page discussing Goertzel filters [2]. I noticed the Wiki web site stated that a Goertzel filter:

"...is marginally stable and vulnerable tonumerical error accumulation when computed usinglow-precision arithmetic and...## Handy Online Simulation Tool Models Aliasing With Lowpass and Bandpass Sampling

Analog Devices Inc. has posted a neat software simulation tool on their corporate web site that graphically shows the aliasing effects of both lowpass and bandpass periodic sampling. This is a nice tutorial tool for beginners in DSP.

The tool shows four important characteristics of periodic sampling:

Characteristic# 1: All input analog spectral components, regardless of their center frequencies, show up (appear) below half the sample rate in the digitized...## Why Time-Domain Zero Stuffing Produces Multiple Frequency-Domain Spectral Images

This blog explains why, in the process of time-domain interpolation (sample rate increase), zero stuffing a time sequence with zero-valued samples produces an increased-length time sequence whose spectrum contains replications of the original time sequence's spectrum.

Background

The traditional way to interpolate (sample rate increase) an x(n) time domain sequence is shown in Figure 1.

Figure 1

The '↑ L' operation in Figure 1 means to...

## Complex Down-Conversion Amplitude Loss

This blog illustrates the signal amplitude loss inherent in a traditional complex down-conversion system. (In the literature of signal processing, complex down-conversion is also called "quadrature demodulation.")

The general idea behind complex down-conversion is shown in Figure 1(a). And the traditional hardware block diagram of a complex down-converter is shown in Figure 1(b).

Let's assume the input to our down-conversion system is an analog radio frequency (RF) signal,...

## A Complex Variable Detective Story – A Disconnect Between Theory and Implementation

Recently I was in the middle of a pencil-and-paper analysis of a digital 5-tap FIR filter having complex-valued coefficients and I encountered a surprising and thought-provoking problem. So that you can avoid the algebra difficulty I encountered, please read on.

A Surprising Algebra Puzzle

I wanted to derive the H(ω) equation for the frequency response of my FIR digital filter whose complex coefficients were h0, h1, h2, h3, and h4. I could then test the validity of my H(ω)...

## The Number 9, Not So Magic After All

This blog is not about signal processing. Rather, it discusses an interesting topic in number theory, the magic of the number 9. As such, this blog is for people who are charmed by the behavior and properties of numbers.

For decades I've thought the number 9 had tricky, almost magical, qualities. Many people feel the same way. I have a book on number theory, whose chapter 8 is titled "Digits — and the Magic of 9", that discusses all sorts of interesting mathematical characteristics of the...

## Sum of Two Equal-Frequency Sinusoids

Some time ago I reviewed the manuscript of a book being considered by the IEEE Press publisher for possible publication. In that manuscript the author presented the following equation:

Being unfamiliar with Eq. (1), and being my paranoid self, I wondered if that equation is indeed correct. Not finding a stock trigonometric identity in my favorite math reference book to verify Eq. (1), I modeled both sides of the equation using software. Sure enough, Eq. (1) is not correct. So then I...

## The DFT Magnitude of a Real-valued Cosine Sequence

This blog may seem a bit trivial to some readers here but, then again, it might be of some value to DSP beginners. It presents a mathematical proof of what is the magnitude of an N-point discrete Fourier transform (DFT) when the DFT's input is a real-valued sinusoidal sequence.

To be specific, if we perform an N-point DFT on N real-valued time-domain samples of a discrete cosine wave, having exactly integer k cycles over N time samples, the peak magnitude of the cosine wave's...

## Specifying the Maximum Amplifier Noise When Driving an ADC

I recently learned an interesting rule of thumb regarding the use of an amplifier to drive the input of an analog to digital converter (ADC). The rule of thumb describes how to specify the maximum allowable noise power of the amplifier [1].

The Problem Here's the situation for an ADC whose maximum analog input voltage range is –VRef to +VRef. If we drive an ADC's analog input with an sine wave whose peak amplitude is VP = VRef, the ADC's output signal to noise ratio is maximized. We'll...

## An Efficient Full-Band Sliding DFT Spectrum Analyzer

In this blog I present two computationally efficient full-band discrete Fourier transform (DFT) networks that compute the 0th bin and all the positive-frequency bin outputs for an N-point DFT in real-time on a sample-by-sample basis.

An Even-N Spectrum Analyzer

The full-band sliding DFT (SDFT) spectrum analyzer network, where the DFT size N is an even integer, is shown in Figure 1(a). The x[n] input sequence is restricted to be real-only valued samples. Notice that the only real parts of...

## An Astounding Digital Filter Design Application

I've recently encountered a digital filter design application that astonished me with its design flexibility, capability, and ease of use. The software is called the "ASN Filter Designer." After experimenting with a demo version of this filter design software I was so impressed that I simply had publicize it to the subscribers here on dsprelated.com.

What I Liked About the ASN Filter DesignerWith typical filter design software packages the user enters numerical values for the...

## Accurate Measurement of a Sinusoid's Peak Amplitude Based on FFT Data

There are two code snippets associated with this blog post:

and

Testing the Flat-Top Windowing Function

This blog discusses an accurate method of estimating time-domain sinewave peak amplitudes based on fast Fourier transform (FFT) data. Such an operation sounds simple, but the scalloping loss characteristic of FFTs complicates the process. We eliminate that complication by...

## Sinusoidal Frequency Estimation Based on Time-Domain Samples

The topic of estimating a noise-free real or complex sinusoid's frequency, based on fast Fourier transform (FFT) samples, has been presented in recent blogs here on dsprelated.com. For completeness, it's worth knowing that simple frequency estimation algorithms exist that do not require FFTs to be performed . Below I present three frequency estimation algorithms that use time-domain samples, and illustrate a very important principle regarding so called "exact"...

## Computing the Group Delay of a Filter

I just learned a new method (new to me at least) for computing the group delay of digital filters. In the event this process turns out to be interesting to my readers, this blog describes the method. Let's start with a bit of algebra so that you'll know I'm not making all of this up.

Assume we have the N-sample h(n) impulse response of a digital filter, with n being our time-domain index, and that we represent the filter's discrete-time Fourier transform (DTFT), H(ω), in polar form...

## Two Easy Ways To Test Multistage CIC Decimation Filters

This blog presents two very easy ways to test the performance of multistage cascaded integrator-comb (CIC) decimation filters [1]. Anyone implementing CIC filters should take note of the following proposed CIC filter test methods.

Introduction

Figure 1 presents a multistage decimate by D CIC filter where the number of stages is S = 3. The '↓D' operation represents downsampling by integer D (discard all but every Dth sample), and n is the time index.

If the Figure 3 filter's...

## Computing an FFT of Complex-Valued Data Using a Real-Only FFT Algorithm

Someone recently asked me if I knew of a way to compute a fast Fourier transform (FFT) of complex-valued input samples using an FFT algorithm that accepts only real-valued input data. Knowing of no way to do this, I rifled through my library of hardcopy FFT articles looking for help. I found nothing useful that could be applied to this problem.

After some thinking, I believe I have a solution to this problem. Here is my idea:

Let's say our original input data is the complex-valued sequence...

## Coupled-Form 2nd-Order IIR Resonators: A Contradiction Resolved

This blog clarifies how to obtain and interpret the z-domain transfer function of the coupled-form 2nd-order IIR resonator. The coupled-form 2nd-order IIR resonator was developed to overcome a shortcoming in the standard 2nd-order IIR resonator. With that thought in mind, let's take a brief look at a standard 2nd-order IIR resonator.

Standard 2nd-Order IIR Resonator A block diagram of the standard 2nd-order IIR resonator is shown in Figure 1(a). You've probably seen that block diagram many...

## Online DSP Classes: Why Such a High Dropout Rate?

Last year the IEEE Signal Processing Magazine published a lengthy article describing three university-sponsored online digital signal processing (DSP) courses [1]. The article detailed all the effort the professors expended in creating those courses and the courses' perceived values to students.

However, one fact that struck me as important, but not thoroughly addressed in the article, was the shocking dropout rate of those online courses. For two of the courses the article's...

## Goertzel Algorithm for a Non-integer Frequency Index

If you've read about the Goertzel algorithm, you know it's typically presented as an efficient way to compute an individual kth bin result of an N-point discrete Fourier transform (DFT). The integer-valued frequency index k is in the range of zero to N-1 and the standard block diagram for the Goertzel algorithm is shown in Figure 1. For example, if you want to efficiently compute just the 17th DFT bin result (output sample X17) of a 64-point DFT you set integer frequency index k = 17 and N =...

## Coupled-Form 2nd-Order IIR Resonators: A Contradiction Resolved

This blog clarifies how to obtain and interpret the z-domain transfer function of the coupled-form 2nd-order IIR resonator. The coupled-form 2nd-order IIR resonator was developed to overcome a shortcoming in the standard 2nd-order IIR resonator. With that thought in mind, let's take a brief look at a standard 2nd-order IIR resonator.

Standard 2nd-Order IIR Resonator A block diagram of the standard 2nd-order IIR resonator is shown in Figure 1(a). You've probably seen that block diagram many...

## How Not to Reduce DFT Leakage

This blog describes a technique to reduce the effects of spectral leakage when using the discrete Fourier transform (DFT).

In late April 2012 there was a thread on the comp.dsp newsgroup discussing ways to reduce the spectral leakage problem encountered when using the DFT. One post in that thread caught my eye [1]. That post referred to a website presenting a paper describing a DFT leakage method that I'd never heard of before [2]. (Of course, not that I've heard...

## Improved Narrowband Lowpass IIR Filters

Here's a neat IIR filter trick. It's excerpted from the "DSP Tricks" chapter of the new 3rd edition of my book "Understanding Digital Signal Processing". Perhaps this trick will be of some value to the subscribers of dsprelated.com.

Due to their resistance to quantized-coefficient errors, traditional 2nd-order infinite impulse response (IIR) filters are the fundamental building blocks in computationally-efficient high-order IIR digital filter implementations. However, when used in...

## Do Multirate Systems Have Transfer Functions?

The following text describes why I ask the strange question in the title of this blog. Some months ago I was asked to review a article manuscript, for possible publication in a signal processing journal, that presented a method for improving the performance of cascaded integrator-comb (CIC) decimation filters [1].

Thinking about such filters, Figure 1(a) shows the block diagram of a traditional 2nd-order CIC decimation filter followed by downsampling by the sample rate factor R. There we...

## Reduced-Delay IIR Filters

This blog gives the results of a preliminary investigation of reduced-delay (reduced group delay) IIR filters based on my understanding of the concepts presented in a recent interesting blog by Steve Maslen [1].

Development of a Reduced-Delay 2nd-Order IIR Filter

Maslen's development of a reduced-delay 2nd-order IIR filter begins with a traditional prototype filter, HTrad, shown in Figure 1(a). The first modification to the prototype filter is to extract the b0 feedforward coefficient...

## Computing Chebyshev Window Sequences

Chebyshev windows (also called Dolph-Chebyshev, or Tchebyschev windows), have several useful properties. Those windows, unlike the fixed Hanning, Hamming, or Blackman window functions, have adjustable sidelobe levels. For a given user-defined sidelobe level and window sequence length, Chebyshev windows yield the most narrow mainlobe compared to any fixed window functions.

However, for some reason, detailed descriptions of how to compute Chebyshev window sequences are not readily available...

## A New Contender in the Digital Differentiator Race

This blog proposes a novel differentiator worth your consideration. Although simple, the differentiator provides a fairly wide 'frequency range of linear operation' and can be implemented, if need be, without performing numerical multiplications.

BackgroundIn reference [1] I presented a computationally-efficient tapped-delay line digital differentiator whose $h_{ref}(k)$ impulse response is:

$$ h_{ref}(k) = {-1/16}, \ 0, \ 1, \ 0, \ {-1}, \ 0, \ 1/16 \tag{1} $$and...

## Two Easy Ways To Test Multistage CIC Decimation Filters

This blog presents two very easy ways to test the performance of multistage cascaded integrator-comb (CIC) decimation filters [1]. Anyone implementing CIC filters should take note of the following proposed CIC filter test methods.

Introduction

Figure 1 presents a multistage decimate by D CIC filter where the number of stages is S = 3. The '↓D' operation represents downsampling by integer D (discard all but every Dth sample), and n is the time index.

If the Figure 3 filter's...

## The Little Fruit Market: The Beginning of the Digital Explosion

There used to be a fruit market located at 391 San Antonio Road in Mountain View, California. In the 1990's I worked part time in Mountain View and drove past this market's building, shown in Figure 1, many times, unaware of its history. What happened at that fruit market has changed the lives of almost everyone on our planet. Here's the story.

William Shockley In 1948 the brilliant physicist William Shockley, along with John Bardeen and Walter Brattain, co-invented the transistor at Bell...

## Multiplierless Exponential Averaging

This blog discusses an interesting approach to exponential averaging. To begin my story, a traditional exponential averager (also called a "leaky integrator"), shown in Figure 1(a), is commonly used to reduce noise fluctuations that contaminate relatively constant-amplitude signal measurements.

Figure 1 Exponential averaging: (a) standard network; (b) single-multiply network.That exponential averager's difference equation is

y(n) = αx(n) + (1 –...