x(t)1 kΩ1 µF–1import numpy as np2t = np.arange(4000) * 0.0023x = np.where(t < 1, 1.0, 0.0)4h = np.exp(-t)5y = np.convolve(x, h)[:4000] * 0.0026F = lambda s: np.fft.rfft(s) * 0.002
-2-10123400.51t (ms)V · per msTIMEx(t)x(t − t0)h(t)y(t)-3-2-10123012f (kHz)V·ms · |H|SPECTRUMX(f)|X(f)|moving|H(f)||Y| = |X|·|H|
Coloured parts: what the current step is about; everything else rests in whiteBlocks: signal source, RC filter (1 kΩ, 1 µF), output voltmeter and a Python code cardPlots: the signal over time t, and its spectrum over frequency fThe sliding and squeezing pulse, its twisting and spreading spectrum, and the product |X|·|H| all moveA 1 V pulse 1 ms wide has spectrum X(f) = T·sinc(fT). Delayed by 0.5 ms its size is unchanged and each frequency turns by −360°·f·t0; squeezed by a its spectrum becomes X(f/a)/|a|. Through an RC filter (RC = 1 ms), y = x ∗ h and Y(f) = X(f)·H(f): 0.193 V·ms at 0.5 kHz. np.fft.rfft is a sum, not an integral, so it is multiplied by the step 0.002 ms to approximate X(f). The full np.convolve output has 7999 values; [:4000] keeps the ones that line up with t. Sampling and the DFT get their own lessons later in this course.

A pulse and its spectrum

  1. Start with a 1 V pulse 1 ms wide, centred on t = 0. Its Fourier transform is X(f) = T·sinc(fT): tallest at 0 Hz, where it equals the pulse's area (1.000 V·ms), and zero at every multiple of 1 kHz.

Shift: a delay turns the angle

Scale: short in time, wide in frequency

Convolution becomes multiplication

Check it in code

The working

# step 1/9 · pulse

x(t) = 1 V for |t| < 0.5 ms, else 0

X(f) = ∫ x(t)·e^(−j2πft) dt
     = T·sinc(fT),  sinc(u) = sin(πu)/(πu)

X(0)      = T = 1.000 V·ms  (the area)
X(0.5 kHz) = 2/π = 0.637 V·ms
X(f) = 0 at f = ±1, ±2, ±3 kHz

t in ms, f in kHz (1/ms)
the transform itself: "The Fourier transform"

The pulse (1 V, 1 ms), the delay (0.5 ms) and the RC filter (1 kΩ, 1 µF, RC = 1 ms) are chosen example values. Every curve and number in the figure is computed from the formulas in this lesson's model, and the tests check them against separate numerical integrals. Time is in ms and frequency in kHz (cycles per ms), so a spectrum like X(f) has units of V·ms. The convention is X(f) = ∫ x(t)·e^(−j2πft) dt, with f in cycles per unit time; books that use ω = 2πf write the same properties with ω.