• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
  • Advertise
  • Subscribe

Test & Measurement Tips

Oscilloscopes, electronics engineering industry news, how-to EE articles and electronics resources

  • Oscilloscopes
    • Analog Oscilloscope
    • Digital Oscilloscope
    • Handheld Oscilloscope
    • Mixed-signal Oscilloscope
    • PC-based Oscilloscopes – PCO
  • Design
  • Calibration
  • Meters & Testers
  • Test Equipment
  • Learn
    • eBooks/Tech Tips
    • FAQs
    • EE Training Days
    • Learning Center
    • Tech Toolboxes
    • Webinars & Digital Events
  • Video
    • EE Videos
    • Teardown Videos
  • Resources
    • Design Guide Library
    • Digital Issues
    • Engineering Diversity & Inclusion
    • Leap Awards
    • White Papers
  • Subscribe
You are here: Home / Featured / How to calculate and apply the inverse discrete Fourier transform: part 4

How to calculate and apply the inverse discrete Fourier transform: part 4

January 22, 2025 By Rick Nelson Leave a Comment

In part 3 of this series, we used the inverse fast Fourier transform (IFFT) to create 100-Hz time-domain waveforms of various amplitudes and phases. We can also use the IFFT to create waveforms containing multiple frequencies. If you look closely at Figure 1 in part 1 of this series, you’ll notice that the time-domain waveform contains the musical note A220 and its even harmonics A440 and A880.

How can we set up a spreadsheet to create multifrequency waveforms?

Figure 1a shows the setup for Excel, similar to part 3. Recall that above the Nyquist frequency fN, the discrete Fourier transform contains mirror images consisting of the complex conjugates of the frequencies below fN. To simplify data entry, you can populate the cells above fN using the =IMCONJUGATE function, with each entry referencing its low-frequency counterpart.

Fourier transform
Figure 1. To simplify data entry (a), fill lines 259 through 511 with =IMCONJUGATE equations (b).

Could you provide an example?

Figure 1b shows entries for our N=512 example, with fN = 512 Hz (highlighted in yellow) in line 258. The next line, 259, contains the equation =IMCONJUGATE(257), referring to the line immediately above fN. This mirroring process continues until line 513, which refers to line 3.

Can Excel automatically enter the descending row numbers for each cell as we fill column C?

No, Excel is not good at countdowns. The typical workaround for reordering datasets is to append an adjacent “helper” column populated with integers in ascending order. Then sort the helper column from highest to lowest, and then delete the helper column. But this approach doesn’t work well for equations.

Is there a workaround?

Yes. Open a new spreadsheet and enter “X=IMCONJUGATE(C” into column A from lines 1 to 255 (the X tells Excel not to treat the entries as equations). Next, enter integers ascending from 3 to 257 into column B and closed parentheses into column C (Figure 2a). Then select cells A1 through C255 and perform a custom sort on column B from highest to lowest (Figure 2b).

Fourier transform
Figure 2. Follow steps (a) through (d) to create clean text for properly ordered equations.

We could use search and replace to delete the X, but our “equation” is now spread across three columns.

We can paste cells A1 through C255 as plain text into Word (Figure 2c) and use Word’s search-and-replace function to delete the X and tab characters (Figure 2d). Then we have a clean text for our equations that we can paste into column C of our original spreadsheet, beginning with cell C259.

Let’s try an example — create a square wave.

A square wave consists of odd harmonics, with the amplitude of each harmonic attenuated by its reciprocal:

We’ll choose a fundamental of 10 Hz, with odd harmonics at 30 Hz, 50 Hz, etc. For this example we’ll stop at the 13th harmonic. We enter the appropriate amplitudes in our spreadsheet at each frequency point, keeping in mind that to obtain a normalized IFFT output, we must multiply the IFFT input by N/2=256. Figure 3 shows all the nonzero frequency entries in our spreadsheet.

Fourier transform
Figure 3. The arrows indicate mirrored complex conjugates above fN.

Figure 4 shows the results, with the red trace representing the fundamental and third harmonic and the blue trace representing the fundamental and all harmonics up through the 13th.

Figure 4. The red trace represents the fundamental plus the third harmonic, while the blue trace includes all harmonics up through the 13th.

What else can we do with the IFFT?

In part 4 we have looked at adding frequencies, but the FFT/IFFT combination can also subtract them — that is, the FFT/IFFT can serve as a filter. In fact, for implementing a finite-impulse-response (FIR) filter, FFT/IFFT can be more computationally efficient than convolution, a technique applicable to tasks including edge detection, smoothing, and blurring in computer vision; echo suppression in audio applications; and cross-correlation in radar. Perhaps we’ll take a closer look in a subsequent series on filtering.

For further reading

FFT Convolution (Analog Devices)
FIR Digital Filter Design (Stanford University)

Related EE World content

Choosing the right amplifier
The FFT and the Universal Wavefunction
Six oscilloscope features I wish I knew before graduation
Autonomous technology and the compute environment
5G and AI: How they complement each other
Basics of harmonics

You may also like:


  • How to calculate and apply the inverse discrete Fourier transform:…
  • time and frequency
    How to calculate and apply an inverse FFT: part 2

  • How to calculate and apply an inverse FFT: part 1

  • What is intermodulation, and is it good or bad? Part…

  • What is intermodulation, and is it good or bad? Part…

Filed Under: Analyzer, FAQ, Featured, oscilloscope measurements, spectrum analyzer Tagged With: FAQ

Reader Interactions

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

Featured Contributions

Why engineers need IC ESD and TLP data

Verify, test, and troubleshoot 5G Wi-Fi FWA gateways

How to build and manage a top-notch test team

How to use remote sensing for DC programmable power supplies

The factors of accurate measurements

More Featured Contributions

EE TECH TOOLBOX

“ee
Tech Toolbox: Internet of Things
Explore practical strategies for minimizing attack surfaces, managing memory efficiently, and securing firmware. Download now to ensure your IoT implementations remain secure, efficient, and future-ready.

EE TRAINING CENTER

EE Learning Center

EE ENGINEERING TRAINING DAYS

engineering
“test
EXPAND YOUR KNOWLEDGE AND STAY CONNECTED
Get the latest info on technologies, tools and strategies for EE professionals.
“bills

RSS Current EDABoard.com discussions

  • Editing posts
  • Help Creating .lib File for SCR in LTspice
  • About IF transformers.
  • Bidirectional data bus
  • ISL8117 buck converter blowing up

RSS Current Electro-Tech-Online.com Discussions

  • RS485 bus: common ground wire needed or not?
  • Kawai KDP 80 Electronic Piano Dead
  • Good Eats
  • What part is this marked .AC ?
  • Photo interrupter Connections
Search Millions of Parts from Thousands of Suppliers.

Search Now!
design fast globle

Footer

EE World Online Network

  • 5G Technology World
  • EE World Online
  • Engineers Garage
  • Analog IC Tips
  • Battery Power Tips
  • Connector Tips
  • DesignFast
  • EDA Board Forums
  • Electro Tech Online Forums
  • EV Engineering
  • Microcontroller Tips
  • Power Electronic Tips
  • Sensor Tips

Test & Measurement Tips

  • Subscribe to our newsletter
  • Advertise with us
  • Contact us
  • About us

Copyright © 2025 · WTWH Media LLC and its licensors. All rights reserved.
The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media.

Privacy Policy