ENع
←The Fourier transform
Lesson 22 · Fourier series and the Fourier transform

The Fourier transform

15 min11 steps5 questionsIntermediate
About this lesson

A Fourier series needs a signal that repeats. The Fourier transform handles any signal, even one pulse. Watch it measured the way the formula reads: multiply a 1 V, 1 ms pulse by a test wave cos(2πft), add up the area, and you have X(f) at that frequency. Sweep f and the spectrum X(f) = sin(πfτ)/(πf) appears, with its zeros every 1 kHz. Then see why the sine part vanishes, rebuild the pulse with the inverse transform, compute X(500 Hz) = 0.637 V·ms with numpy, and find that a shorter pulse has a wider spectrum. It builds on the Fourier series lesson, the Circuits lessons on sinusoids and phasors, and complex exponentials.

You'll learn to

Tick what you feel confident about. These self-checks do not affect your lesson score.

Fig 22 · Interactive
01 / 11

One pulse that never repeats

A generator makes one pulse: 1 V for 1 ms, centred on t = 0, and zero at every other time. It never repeats, so it has no period, and a Fourier series cannot describe it. The Fourier transform can.

x(t) = 1 V   for |t| < τ/2
       0     elsewhere
τ = 1 ms (the pulse width)

periodic signal  -> Fourier series:
  lines at f0, 2·f0, 3·f0 ...
one pulse        -> no period, no f0
                 -> the Fourier transform
Loading figure…
or ← →
Read the lesson step by step
  1. One pulse that never repeats

    A generator makes one pulse: 1 V for 1 ms, centred on t = 0, and zero at every other time. It never repeats, so it has no period, and a Fourier series cannot describe it. The Fourier transform can.

    x(t) = 1 V   for |t| < τ/2
           0     elsewhere
    τ = 1 ms (the pulse width)
    
    periodic signal  -> Fourier series:
      lines at f0, 2·f0, 3·f0 ...
    one pulse        -> no period, no f0
                     -> the Fourier transform
  2. Stretch the period: lines become a curve

    Repeat the pulse every T (the copies sit off this plot). Its Fourier series has lines at k/T; c_k, the series coefficient, is line k's amplitude. Stretch T from 2 to 8 ms: lines crowd closer, but T·c_k stays on one curve.

    pulse repeated every T:
      lines at f = k/T  (k = 0, ±1, ±2 ...)
      spacing 1/T
    
      T·c_k = X(k/T)   (Oppenheim & Willsky §4.1)
    
    T = 2 ms -> lines every 500 Hz
    T = 8 ms -> lines every 125 Hz
    T -> ∞    -> a continuous curve X(f)
  3. Pick a frequency: a test wave

    To measure one frequency, an oscillator makes a test wave cos(2πft). Turn f up from 0 to 500 Hz: the flat line starts to wave, and ends up finishing one cycle every 2 ms.

    test wave  c(t) = cos(2π·f·t)
    
    f = 0 Hz    c(t) = 1   (flat)
    f = 500 Hz  period 1/f = 2 ms
    
    the question for each f:
      how much of this wave is in x(t)?
    (sinusoids: Circuits, "Sinusoids")
  4. Multiply, instant by instant

    Multiply the pulse by the test wave at every instant. Outside the pulse the product is 0. Inside it the pulse is 1 V, so the product is just the test wave, cut down to 1 ms.

    p(t) = x(t) · cos(2π·f·t)
    
    |t| > 0.5 ms:  x = 0  -> p = 0
    |t| < 0.5 ms:  x = 1  -> p = cos(2π·f·t)
    
    f = 500 Hz:
      p(0)      = 1·cos(0)      = 1
      p(0.5 ms) = 1·cos(π/2)    = 0
  5. Add up the area: one value of X(f)

    Now add up the area under the product, from left to right. At 500 Hz it is all positive and totals 2/π ≈ 0.637 V·ms. That area is the transform at this one frequency: X(500 Hz) = 0.637 V·ms.

    X(f) = ∫ x(t)·cos(2π·f·t) dt
         = ∫ from −0.5 to 0.5 ms of cos(2π·f·t) dt
         = sin(π·f·τ) / (π·f)
    
    f = 0.5 kHz, τ = 1 ms:
      sin(π/2) / (π·0.5) = 2/π
      = 0.637 V·ms
    
    units: volts × milliseconds
  6. When the areas cancel

    Raise f to 1000 Hz. Now exactly one cycle fits inside the pulse. The negative area (red) grows until it cancels the positive area, and the total falls to 0. So X(1000 Hz) = 0: this pulse holds no 1000 Hz at all.

    f = 1000 Hz: period 1 ms = the pulse width
    
    positive area (t near 0)   +0.318
    negative area (both ends)  −0.318
    total X(1 kHz)             0
    
    zero again at 2, 3, 4 ... kHz:
      2, 3, 4 ... whole cycles fit
  7. Sweep f: the spectrum appears

    Let f glide from −3 to +3 kHz and plot every area. The points join into X(f) = sin(πfτ)/(πf): tallest at 0 Hz, where it equals the pulse's area, 1 V·ms, and zero at ±1, ±2 and ±3 kHz.

    X(f) = sin(π·f·τ) / (π·f),  τ = 1 ms
    
     X(0)       = 1.000 V·ms  (area of x)
     X(500 Hz)  = 0.637
     X(1 kHz)   = 0
     X(1.5 kHz) = −0.212  (negative lobe)
     X(2 kHz)   = 0
    
    X(−f) = X(f): negative frequencies come
    from e^(−j2πft) (see complex exponentials)
  8. The full recipe: e^(−j2πft)

    The full recipe is X(f) = ∫ x(t)·e^(−j2πft) dt. Since e^(−j2πft) = cos(2πft) − j·sin(2πft), there is a sine test wave too. This pulse is symmetric about t = 0, so every sine area cancels and X(f) is real.

    X(f) = ∫ x(t)·e^(−j2πft) dt
    
    e^(−j2πft) = cos(2πft) − j·sin(2πft)  (Euler)
    
    X(f) = ∫ x·cos dt  − j·∫ x·sin dt
           real part       imaginary part
    
    x(−t) = x(t), sin(−u) = −sin(u):
      the sine areas cancel, ∫ x·sin dt = 0
      so X(f) is a real number here
  9. Back again: the inverse transform

    Going back, x(t) = ∫ X(f)·e^(j2πft) df rebuilds the signal. Keep |f| < B and widen B to 3 kHz: the sum sharpens into the pulse. The edge overshoot never dies away: it settles near 9 % of the jump (Gibbs); here 11 %.

    x(t) = ∫ X(f)·e^(+j2πft) df   (inverse)
    
    keep only |f| < B:
      x_B(t) = (1/π)·[Si(2πB(t+τ/2)) − Si(2πB(t−τ/2))]
    
    B grows -> ripples get narrower; the peak
      overshoot swings (both edges add):
      18 % at 1 kHz, 4 % at 1.5 kHz,
      11.0 % at 3 kHz of the 1 V jump
      -> 8.95 % as B -> ∞, never -> 0 (Gibbs)
    
    X(f) and x(t): two views of one signal
  10. In Python: the integral becomes a sum

    A computer replaces the integral by a sum. With numpy, take t in steps of 1 µs, multiply x by np.exp(−2j·np.pi·f·t), add with np.sum and multiply by the step. At 500 Hz it gives 0.6366 V·ms.

    import numpy as np
    dt = 1e-6                        # 1 µs
    t = (np.arange(-2000, 2000) + 0.5) * dt
    x = 1.0 * (np.abs(t) < 0.5e-3)  # 1 V, 1 ms
    f = 500
    X = np.sum(x * np.exp(-2j*np.pi*f*t)) * dt
    print(round(X.real * 1e3, 4))    # V·ms
    
    >>> 0.6366
    (imaginary part about 0; exact 2/π = 0.63662)
  11. Shorter pulse, wider spectrum

    Halve the pulse to 0.5 ms. The spectrum gets lower (X(0) = 0.5 V·ms) and twice as wide: the first zero moves from 1 to 2 kHz. Shorter in time means wider in frequency: a sharp click holds many frequencies.

    first zero at f = 1/τ
      τ = 1 ms    -> 1 kHz,  X(0) = 1 V·ms
      τ = 0.5 ms  -> 2 kHz,  X(0) = 0.5 V·ms
    
    width in time × width in frequency
      stays the same (τ · 1/τ = 1)
    
    next: shift, scale and convolution

Quiz Unlocks after the last step.