University of Glasgow · FACULTY OF ELECTRICAL ENGINEERING

ENG5027 Chap.4 The DFT and FFT for Real Spectra

- one subject, every graph, every model, every mark
7 Chapters3-page Bible
Our own words - no uploaded lecturer files
Updated for this semester
Chapter 4 of 13 · ENG5027

The DFT and FFT for Real Spectra

The DFT and FFT for Real Spectra turns a finite record into a list of frequency coefficients and teaches how to read it. The discrete Fourier transform maps N samples to N complex values, and the inverse returns them with a one over N factor.

Each index k corresponds to a physical frequency of k times the sampling rate over N, so the bin spacing equals the sampling rate divided by the number of points, which is one over the record length. The output array is stored in index order rather than signed-frequency order: bins up to N/2 hold positive frequencies, bin N/2 is half the sampling rate, and the bins above it hold negative frequencies.

For a real signal the coefficient in bin N minus k is the conjugate of the one in bin k, so every tone appears twice with equal magnitude. Because N frequency samples imply a periodic time sequence, a record that is too long for the transform overlaps itself, which is time-domain aliasing.

The fast Fourier transform computes the same result by splitting the samples into even and odd halves, transforming each half and recombining with twiddle factors, repeating until only two-point transforms remain. The work then grows as N log N instead of N squared, about a hundredfold saving at 1024 points. The chapter closes with the FFT tutorial's checklist for a recorded vowel spectrum and the rules of the first lab.

In this chapter

What this chapter covers

  • 01

    The DFT and inverse DFT

  • 02

    Bin index, bin spacing and record length

  • 03

    Index order and mirror bins

  • 04

    Conjugate symmetry of real spectra

  • 05

    Time-domain aliasing

  • 06

    Twiddle factors and the even-odd split

  • 07

    FFT cost and reading recorded spectra

Worked example · free

Read a spectrum and plan a coefficient edit

Q [5 marks]. A 1.5 s record sampled at 8 kHz contains speech and a steady 1.2 kHz whistle. Give N, the bin spacing, the bin of the whistle and its mirror, and the bin of half the sampling rate. Marks used here come from this guide and are not a published university scheme.
A real 75 Hz tone in a 1000-point record gives equal magnitudes at bin 75 and bin 925; bin 500 is Fs/2, and the shaded upper half holds the negative frequenciesA real 75 Hz tone in a 1000-point record gives equal magnitudes at bin 75 and bin 925; bin 500 is Fs/2, and the shaded upper half holds the negative frequencies.07550092599901bin index k (N = 1000, Fs = 1 kHz)|X[k]|+75 Hz−75 HzFs/2negative frequencies
A real 75 Hz tone in a 1000-point record gives equal magnitudes at bin 75 and bin 925; bin 500 is Fs/2, and the shaded upper half holds the negative frequencies.
  • 1N = 8000 × 1.5 = 12,000 samples.
  • 1The bin spacing is 8000 / 12,000 = 0.667 Hz, the reciprocal of the 1.5 s record.
  • 2The whistle is in bin 1200 / 0.667 = 1800, and its mirror is 12,000 − 1800 = 10,200.
  • 1Half the sampling rate, 4 kHz, sits in bin N/2 = 6000.
N is 12,000 and the bins are 0.667 Hz apart. The whistle occupies bin 1800 and its mirror bin 10,200, and bin 6000 is 4 kHz. Both whistle bins, and a few neighbours, must be edited equally to keep the inverse real. The marks are a practice weighting.
Sia tip — Compute the mirror as N − k every time you touch a bin; editing one side only leaves a complex inverse.
Glossary

Key terms

Mirror bin
The DFT index N − k that holds the conjugate of bin k for a real signal.
Twiddle factor
The complex exponential that recombines the even and odd sub-transforms in the FFT.
Butterfly
The sum-and-difference operation that combines two values in one FFT stage.
Time-domain aliasing
The overlap of periodic copies of a sequence that occurs when the transform length is too short.
FAQ

The DFT and FFT for Real Spectra FAQ

Why does a real signal produce two peaks for one tone?

A real cosine is the sum of two complex exponentials at plus and minus its frequency. The DFT stores the negative one in the upper half of the array, so one tone appears in bin k and again in bin N minus k.

Does a higher sampling rate give finer frequency resolution?

Not on its own. The bin spacing is the rate divided by the number of points, which equals one over the record length, so only a longer record gives finer bins. Raising the rate with N fixed makes the bins wider.

What can the first lab use from the FFT toolbox?

The lab brief allows the FFT and the inverse FFT and bans higher-level helper calls, such as building the frequency axis automatically, as well as FIR or IIR filtering. The frequency axis and the coefficient edits have to be written by hand.

Study strategy

Exam move

Make bin arithmetic second nature. For several combinations of rate and record length, write N, the bin spacing, the bin of a given tone, its mirror and the bin of half the rate, and check each answer by converting back to hertz. Compute a few small DFTs by hand, a two-point and a four-point transform, then repeat the four-point case with the even-odd split so that the butterfly structure is clear.

Count the operations for direct and fast transforms at 256, 1024 and 4096 points to see how the saving grows. Then rehearse spectrum reading as the tutorial frames it: read the axes, locate the fundamental and its harmonics, identify a narrow interfering tone, decide which coefficients to change, and give two reasons why a decibel axis might mislead.

Finally, write out the procedure you would follow in the first lab to remove noise with the FFT and inverse FFT, including the mirror edit, so that it is ready when you sit down at the bench.

Working through The DFT and FFT for Real Spectra in ENG5027? Sia is AskSia’s AI Electrical Engineering tutor — ask any ENG5027 The DFT and FFT for Real Spectra question and get a clear, step-by-step explanation grounded in how ENG5027 is taught and assessed. Read this chapter free, then take your hardest questions to Sia.

A+Everything unlocked
Unlocks this Bible + all 26 of your subjects at University of Glasgow, plus 1,000+ more Bibles across the AskSia library.
Sia - your ENG5027 tutor, unlimited, worked the way the exam marks it
The full 3-page Bible + practice bank with worked solutions
Chrome extension - sync your LMS so Sia knows your deadlines
Bilingual EN / Chinese on every Bible and every Sia answer
$0.99 Trial
30-day money-back · cancel in one tap · how it works