TExcelTAD
Home › Fourier Analysis & Signals › Shift, Scaling and Modulation

Shift, Scaling and Modulation

You rarely compute a Fourier transform from the integral. Instead you start from a few known pairs and apply rules: what happens to the spectrum when the signal is delayed, sped up, multiplied by a carrier or differentiated. These rules are the working toolkit of signal processing.

The rules

Operation on f(t)f(t) Effect on f^(s)\hat{f}(s)
linearity: af+bga f + b g af^+bg^a \hat{f} + b \hat{g}
delay: f(t−t0)f(t - t_0) e−2πist0 f^(s)e^{-2\pi i s t_0}\, \hat{f}(s) (phase changes, magnitude does not)
scaling: f(at)f(at), a≠0a \ne 0 1∣a∣ f^ ⁣(sa)\dfrac{1}{\lvert a \rvert}\, \hat{f}\!\left(\dfrac{s}{a}\right)
modulation: e2πis0tf(t)e^{2\pi i s_0 t} f(t) f^(s−s0)\hat{f}(s - s_0)
modulation: cos⁡(2πs0t)f(t)\cos(2\pi s_0 t) f(t) 12(f^(s−s0)+f^(s+s0))\tfrac{1}{2}\big(\hat{f}(s - s_0) + \hat{f}(s + s_0)\big)
derivative: f′(t)f'(t) 2πis f^(s)2\pi i s\, \hat{f}(s)

Each follows from a substitution in the integral. For the delay: ∫f(t−t0)e−2πistdt=∫f(u)e−2πis(u+t0)du=e−2πist0f^(s)\int f(t - t_0) e^{-2\pi i s t}dt = \int f(u) e^{-2\pi i s (u + t_0)} du = e^{-2\pi i s t_0} \hat{f}(s).

Checking the rules numerically

python · try it yourself
import numpy as np

dt = 0.001
t = np.arange(-20, 20, dt)
g = lambda t: np.exp(-np.pi * t ** 2)               # Gaussian, transform exp(-pi s^2)
G = lambda s: np.exp(-np.pi * s ** 2)
ft = lambda f, s: np.sum(f * np.exp(-2j * np.pi * s * t)) * dt

s = 0.7
checks = {
    "delay by 1.5":      (ft(g(t - 1.5), s), np.exp(-2j * np.pi * s * 1.5) * G(s)),
    "scale f(3t)":       (ft(g(3 * t), s), G(s / 3) / 3),
    "modulate by cos 2": (ft(np.cos(2 * np.pi * 2 * t) * g(t), s), (G(s - 2) + G(s + 2)) / 2),
    "derivative":        (ft(np.gradient(g(t), dt), s), 2j * np.pi * s * G(s)),
}
for name, (num, rule) in checks.items():
    print(f"{name:18s} numeric {num.real:+.5f}{num.imag:+.5f}i   rule {rule.real:+.5f}{rule.imag:+.5f}i")
delay by 1.5       numeric +0.20401-0.06629i   rule +0.20401-0.06629i
scale f(3t)        numeric +0.28093+0.00000i   rule +0.28093+0.00000i
modulate by cos 2  numeric +0.00247-0.00000i   rule +0.00247+0.00000i
derivative         numeric -0.00000+0.94348i   rule +0.00000+0.94348i

The reciprocal spreading

Scaling is the most important rule: compressing a signal in time by a factor aa stretches its spectrum by aa and lowers it by aa. Short events need wide bandwidth. A 1 microsecond pulse has a spectrum about 1 MHz wide; that is why fast data links need high bandwidth.

python · try it yourself
import numpy as np

dt = 1e-4
t = np.arange(-1, 1, dt)
for width in (1.0, 0.1, 0.01):
    f = (np.abs(t) < width / 2).astype(float)
    s = np.linspace(0, 400, 4001)
    F = np.abs(np.array([np.sum(f * np.exp(-2j * np.pi * si * t)) * dt for si in s[::10]]))
    first_zero = s[::10][np.argmax(F < 1e-3 * F[0])]
    print(f"pulse width {width:5.2f} s: spectrum height {F[0]:.3f}, first zero near {first_zero:.0f} Hz")
pulse width  1.00 s: spectrum height 1.000, first zero near 1 Hz
pulse width  0.10 s: spectrum height 0.100, first zero near 10 Hz
pulse width  0.01 s: spectrum height 0.010, first zero near 100 Hz

Pulse width times first-zero frequency stays equal to 1.

Modulation in practice

The modulation rule is how radio works: multiplying an audio signal (spectrum near 0) by a carrier cos⁡(2πs0t)\cos(2\pi s_0 t) copies its spectrum to ±s0\pm s_0. Many stations share the air because each occupies its own band. Multiplying again by the same carrier at the receiver moves a copy back to 0, where a low-pass filter recovers the audio.

In software

  • Delay estimation (GPS, sonar, audio alignment) measures the linear phase −2πst0-2\pi s t_0 across frequencies, or equivalently uses cross-correlation.
  • Changing playback speed by a factor aa multiplies all frequencies by aa; pitch-shifting without changing speed needs more elaborate tools (phase vocoders).

Exercises

Exercise 1: Delay and magnitude

Does delaying a signal change its magnitude spectrum?

Answer

No; only the phase changes.

Solution

∣e−2πist0f^(s)∣=∣f^(s)∣\lvert e^{-2\pi i s t_0} \hat{f}(s) \rvert = \lvert \hat{f}(s) \rvert, since the exponential has magnitude 1. The phase gains −2πst0-2\pi s t_0, a straight line in ss with slope proportional to the delay.

Exercise 2: Transform of a shifted, scaled rectangle

Find the transform of f(t)=Π((t−3)/2)f(t) = \Pi\big((t - 3)/2\big), a pulse of width 2 centered at t=3t = 3.

Answer

2sinc⁡(2s) e−6πis2\operatorname{sinc}(2s)\, e^{-6\pi i s}.

Solution

Π(t/2)\Pi(t/2) has transform 2sinc⁡(2s)2\operatorname{sinc}(2s) by scaling with a=1/2a = 1/2. Delaying by 3 multiplies by e−2πis⋅3e^{-2\pi i s \cdot 3}.

Exercise 3: Linear phase (code)

Delay a Gaussian by t0=0.25t_0 = 0.25 and print the phase of its transform at s=0.2,0.4,0.6s = 0.2, 0.4, 0.6. Is it a straight line?

Answer

Phases −0.3142,−0.6283,−0.9425-0.3142, -0.6283, -0.9425 rad: a line with slope −2πt0=−π/2-2\pi t_0 = -\pi/2.

Solution
python · try it yourself
import numpy as np
dt = 0.001
t = np.arange(-20, 20, dt)
f = np.exp(-np.pi * (t - 0.25) ** 2)
for s in (0.2, 0.4, 0.6):
    F = np.sum(f * np.exp(-2j * np.pi * s * t)) * dt
    print(s, round(float(np.angle(F)), 4))
0.2 -0.3142
0.4 -0.6283
0.6 -0.9425

Test yourself

If f(t)f(t) is compressed to f(2t)f(2t), its spectrum…

  1. is compressed by 2
  2. is stretched by 2 and halved in height
  3. is unchanged
  4. is shifted by 2

Multiplying a signal by e2πis0te^{2\pi i s_0 t}…

  1. delays it
  2. shifts its spectrum by s0s_0
  3. scales its spectrum
  4. differentiates it

The transform of f′(t)f'(t) is…

  1. f^′(s)\hat{f}'(s)
  2. 2πis f^(s)2\pi i s\, \hat{f}(s)
  3. f^(s)/s\hat{f}(s)/s
  4. −f^(s)-\hat{f}(s)