⚛ Quantum Self-Study · Technology Engineering
Home / Signal Processing

Lectures: Signal Processing

Fourier transforms, probability and noise, signal detection and estimation, built from two source books: R. N. Bracewell, The Fourier Transform and Its Applications (3rd ed.) and M. Barkat, Signal Detection and Estimation (2nd ed.). Each chapter is a module with slides, formulas, a Jupyter notebook and a quiz; chapters on the same topic are merged into one.

26 modules: 4 shared by both books (merged chapters, about 60 slides), 15 Bracewell only and 7 Barkat only (about 40 slides). Done so far: 26.

🗺️ Study roadmap

Go through A to E in order. Modules tagged "Both books" are where the two texts meet, so take those slowly.

PartModulesDone
A1 – 99 / 9
B10 – 123 / 3
C13 – 175 / 5
D18 – 203 / 3
E21 – 266 / 6
How to study a module
  1. Read the objectives and step through all slides (each module has 5 parts).
  2. Open the notebook, run each cell and read the 📤 Real output note after it.
  3. Take the quiz to check yourself, then revisit whatever you missed.

Part A · Fourier foundations and toolkit

MODULE 01

Introduction: why transform methods

A transform turns a linear problem into an easier one; a waveform and its spectrum are two faces of the same physical object.

BracewellBracewell, chapter 1, pp. 1–4

Open lecture →

MODULE 02

Groundwork: the transform, existence and symmetry

The definition of the Fourier transform, when it exists, transforms in the limit, and the table of even, odd and Hermitian symmetries.

BracewellBracewell, chapter 2, pp. 5–23

Open lecture →

MODULE 03

Convolution, serial products and correlation

Convolution is the common operation of every linear invariant system; this chapter teaches how to picture it, compute it by hand and by machine, and its relatives: autocorrelation, cross correlation and the energy spectrum.

BracewellBracewell, chapter 3, pp. 24–50

Open lecture →

MODULE 04

Notation for useful functions: Π, Λ, H, sgn, sinc, Gaussian

A compact notation for functions with abrupt changes: rectangle, triangle, step, sign, sinc and Gaussian, with their numerical properties.

BracewellBracewell, chapter 4, pp. 55–70

Open lecture →

MODULE 05

The impulse symbol: \delta, sifting, shah and generalized functions

The impulse is a sequence of brief unit-area pulses whose detailed shape does not matter: sifting, the shah train, derivatives of the impulse, null functions and the basis of generalized functions.

BracewellBracewell, chapter 5, pp. 74–98

Open lecture →

MODULE 06

The basic theorems of the Fourier transform

Similarity, addition, shift, modulation, convolution, Rayleigh, power, autocorrelation and derivative: ten theorems that yield most transforms without integrating.

BracewellBracewell, chapter 6, pp. 105–135

Open lecture →

MODULE 07

Obtaining transforms

Closed-form integration, numerical transformation with the "slow" program, generating transforms from theorems, differentiation down to impulses, and measuring spectra with instruments.

BracewellBracewell, chapter 7, pp. 136–150

Open lecture →

MODULE 08

The two domains: a function and its transform

Area, moments, centroid, variance, smoothness, equivalent width, the uncertainty relation, finite differences, running means and the central-limit theorem: each property in one domain has a partner in the other.

BracewellBracewell, chapter 8, pp. 151–198

Open lecture →

MODULE 09

Waveforms, spectra, filters and linearity

The spectrum of an electrical waveform, the transfer function and impulse/step responses of a filter, digital filtering, the theorems read in circuit language, and why linearity plus time invariance leads to convolution.

BracewellBracewell, chapter 9, pp. 198–218

Open lecture →

Part B · Probability, distributions and noise

MODULE 10

Probability, random variables and the characteristic function

From sets and probability, random variables and moments (Barkat) to the distribution of a sum as a convolution, the characteristic function as the Fourier transform of a density, the exponential and Poisson distributions and the central limit (Bracewell).

Both booksBracewell, chapter 16, pp. 427–445; Barkat, chapter 1, pp. 1–73

Open lecture →

MODULE 11

The distributions that arise in practice

Bernoulli, binomial, geometric, Pascal, hypergeometric, Poisson, uniform, normal, exponential, gamma, beta, chi-square, Rayleigh, Rice, Maxwell, Nakagami, Student, Cauchy, multivariate Gaussian, Weibull, log-normal and K.

BarkatBarkat, chapter 2, pp. 75–139

Open lecture →

MODULE 12

Random processes, power spectra and noise

From random digits and noise through filters (Bracewell) to stationary processes, autocorrelation, power spectral density, linear systems, ergodicity, sampling, analytic signals and thermal noise (Barkat).

Both booksBracewell, chapter 17, pp. 446–472; Barkat, chapter 3, pp. 141–221

Open lecture →

Part C · Discretisation, representation and related transforms

MODULE 13

Sampling, Fourier series and orthogonal representation

The sampling theorem, interpolation, rectangular filtering, aliasing, ordinate-and-slope and interlaced sampling, Fourier series and Gibbs (Bracewell) to generalised Fourier series, Gram-Schmidt, integral equations and the Karhunen-Loève expansion (Barkat).

Both booksBracewell, chapter 10, pp. 219–258; Barkat, chapter 8, pp. 449–500

Open lecture →

MODULE 14

The DFT, the FFT and discrete-time random processes

The discrete Fourier transform and its theorems, the FFT algorithm, error and leakage, power spectra (Bracewell), then discrete-time processes, correlation matrices, AR, MA, ARMA and Markov chains (Barkat).

Both booksBracewell, chapter 11, pp. 258–292; Barkat, chapter 4, pp. 223–290

Open lecture →

MODULE 15

The discrete Hartley transform and the sine and cosine family

Hartley's real, reciprocal transform (1942), the DHT and its theorems, the fast Hartley algorithm, the discrete sine and cosine transforms and data compression (Bracewell, chapter 12).

BracewellBracewell, chapter 12, pp. 293–326

Open lecture →

MODULE 16

Relatives of the Fourier transform: multidimensional, Hankel, Mellin, z, Abel, Radon, Hilbert, fractional

The Fourier transform in two and three dimensions, Hankel under circular symmetry, Fourier kernels, Mellin and z, Abel and Radon (tomography), Hilbert (analytic signal, causality) and the fractional Fourier transform (Bracewell, chapter 13).

BracewellBracewell, chapter 13, pp. 330–374

Open lecture →

MODULE 17

The Laplace transform: strips of convergence, transient response, initial-value problems

The two-sided and one-sided Laplace transforms, strips of convergence, theorems, transform pairs, transfer function and impulse response, natural behaviour, initial-value problems, switching problems and the inversion formula (Bracewell, chapter 14).

BracewellBracewell, chapter 14, pp. 380–400

Open lecture →

Part D · Physical applications

MODULE 18

Antennas and optics: apertures, angular spectrum, transfer functions and diffraction

The far field of an aperture is the Fourier transform of the field distribution: beam width, beam steering, arrays, spectral sensitivity, MTF, plane-wave spectrum and Fresnel diffraction (Bracewell, chapter 15).

BracewellBracewell, chapter 15, pp. 406–427

Open lecture →

MODULE 19

Heat conduction and diffusion: the equation, Green's function, the electrical analogy

The one-dimensional diffusion equation, the electrical-thermal-semiconductor analogy, Gaussian diffusion from a point, the decay of a spatial sinusoid, dual transmission lines and sinusoidal time excitation (Bracewell, chapter 18).

BracewellBracewell, chapter 18, pp. 475–487

Open lecture →

MODULE 20

Dynamic power spectra, the wavelet transform and the Wigner distribution

Why a static spectrum loses timing information, Gabor cells and the uncertainty limit, frequency-division and time-division filter banks, the equivalence theorem, the wavelet transform and chirplets, the Wigner distribution (Bracewell, chapter 19).

BracewellBracewell, chapter 19, pp. 489–506

Open lecture →

Part E · Signal detection and estimation

MODULE 21

Statistical decision theory

The Bayes criterion and the likelihood ratio, M-ary hypothesis testing and the MAP criterion, the minimax criterion when the priors are unknown, the Neyman–Pearson criterion and ROC curves, composite hypothesis testing and sequential detection (Barkat, chapter 5).

BarkatBarkat, chapter 5, pp. 289 to 338

Open lecture →

MODULE 22

Parameter estimation

Maximum likelihood (ML) estimation and the generalized likelihood ratio test, criteria for a good estimator, Bayes estimation (MMSE, MAVE, MAP), the Cramér–Rao inequality and efficiency, the extension to multiple parameters, the best linear unbiased estimator, and least-squares estimation (Barkat, chapter 6).

BarkatBarkat, chapter 6, pp. 345 to 390

Open lecture →

MODULE 23

Wiener and Kalman filtering

The orthogonality principle and linear transformations, unrealizable and realizable Wiener filters (spectral factorization), the discrete Wiener filter and the normal equations, the Kalman filter via the concept of innovations (Barkat, chapter 7).

BarkatBarkat, chapter 7, pp. 399 to 445

Open lecture →

MODULE 24

The general Gaussian problem

Binary hypothesis testing with a vector Gaussian observation, the likelihood ratio reducing to a difference of quadratic forms; the equal-covariance case (a linear sufficient statistic, the detection parameter d^2), the equal-mean case (an energy detector, a chi-square statistic), and symmetric hypotheses (Barkat, chapter 9).

BarkatBarkat, chapter 9, pp. 503 to 529

Open lecture →

MODULE 25

Waveform detection and estimation

Binary and M-ary detection of deterministic signals in white Gaussian noise via the Karhunen–Loève expansion: the matched filter, correlation receiver, sufficient statistics, the detection parameter; linear estimation of a signal parameter; detection with a random phase and the incoherent matched filter (Barkat, chapter 10).

BarkatBarkat, chapter 10, pp. 533 to 590

Open lecture →

MODULE 26

Adaptive thresholding: CFAR detection

Why a fixed threshold fails when the background noise changes, the cell-averaging CFAR detector (CA-CFAR), the Swerling target models, the GO-CFAR and SO-CFAR variants for a clutter edge, and distributed CFAR with AND/OR fusion rules (Barkat, chapters 11 and 12).

BarkatBarkat, chapters 11 and 12, pp. 627 to 670

Open lecture →

The signal-processing workflow, step by step

Twelve steps from posing the problem to reporting. Each has a theory frame, frequently asked questions, and a worked example with numbers computed for real, plus links to the related modules.

1Pose the problem and the signal modelM1M9

🎓 Theory

Before computing, decide whether the signal is deterministic or random, continuous or discrete, and whether the system is linear and invariant. If it is, the response is a convolution and the frequency response describes the system completely (Bracewell, chapters 1 and 9).

Response of a linear invariant system
y=h*x\;\Longleftrightarrow\;Y(s)=H(s)\,X(s)

❓ Frequently asked

Why check linearity and invariance first?Because every later Fourier tool relies on both conditions. Module 1 shows that a squarer and a cosine multiplier create new frequencies.
Does a random signal have a spectrum?It has a power spectrum (module 12), not an ordinary Fourier transform for each realisation.

📌 Worked example with real numbers

Feed a 50 Hz sinusoid into an amplifier. If the output has an extra 100 Hz line, the system is nonlinear (module 1).

2Sampling and anti-aliasingM13

🎓 Theory

To keep a signal you must sample at f_s above twice its highest frequency. A component above f_s/2 is folded onto a lower frequency and cannot be separated after sampling (Bracewell, chapter 10; Barkat, section 3.8).

Aliased frequency
f_{\text{alias}}=\left|f-\operatorname{round}\!\left(\tfrac{f}{f_s}\right)f_s\right|
  • f_ssampling rate

❓ Frequently asked

Why filter before sampling?Because after sampling the true and the folded frequency look identical.
Does oversampling hurt?It does not make the result wrong; it only costs storage and computation.

📌 Worked example with real numbers

A 5000 Hz wave sampled at f_s=8000 Hz (Nyquist 4000 Hz). The FFT peaks at 3000 Hz, exactly |5000-8000|.

3Observation window and frequency resolutionM1M8M14

🎓 Theory

Observing for time T resolves only lines at least 1/T apart. Cutting the signal with a rectangular window leaks the spectrum into neighbouring bins (module 1); this is the convolution with a sinc function seen from the other side.

Resolution
\Delta f=\frac{f_s}{N}=\frac1T

❓ Frequently asked

Does zero-padding raise the resolution?No. It only interpolates a smoother curve; the resolution is still set by T.
What does a Hann window do?It reduces leakage but widens the lines, trading away resolution.

📌 Worked example with real numbers

With f_s=8000 Hz and 1024 samples the bin spacing is 7.8125 Hz. To separate two lines 5 Hz apart you need T\ge0.2 s, i.e. at least 1600 samples.

4Transform and read the spectrumM2M3M4M5M6M7M14

🎓 Theory

Pick a convention (where the 2\pi sits) and exploit symmetry: a real signal has a Hermitian spectrum, so half of it suffices. The shift, similarity, derivative and convolution theorems (chapter 6) find transforms without integrating (chapter 7).

Hermitian symmetry
f(x)\ \text{real}\;\Longrightarrow\;F(-s)=F^{*}(s)

❓ Frequently asked

What symmetry does a real signal have in frequency?Hermitian: F(-s)=F^*(s), so the magnitude is even and the phase odd (module 2).
Why does phase matter?Phase carries position: shifting the signal only multiplies the spectrum by a phase factor (module 6).

📌 Worked example with real numbers

A real 1000-sample signal has 1000 complex FFT coefficients, but thanks to the Hermitian property only 501 are needed (rfft).

5Linear filteringM3M9

🎓 Theory

A filter is a convolution with the impulse response and, in the frequency domain, a multiplication by the frequency response. An FIR filter (running mean) is always stable; a recursive one such as y[n]=a\,y[n-1]+(1-a)x[n] is cheaper but stability must be checked (modules 1, 3 and 9).

Magnitude response of an L-point running mean
|H(f)|=\left|\frac{\sin(\pi L f/f_s)}{L\,\sin(\pi f/f_s)}\right|

❓ Frequently asked

How does FIR differ from IIR?FIR uses a finite number of input samples and is always stable; IIR has feedback, so it is compact but can become unstable.
Does a filter change frequencies?Not if it is linear and invariant: it only changes the amplitude and phase of each component (module 1).

📌 Worked example with real numbers

An 8-point running mean at f_s=8000 Hz has gain 0.640729 at 500 Hz and 0 at 1000 Hz (a null). Both freqz and the closed form agree.

6Noise and random-variable modelsM10M11

🎓 Theory

The density of a sum of independent random variables is the convolution of the densities, i.e. the characteristic functions multiply. The same convolution, the same theorem (Bracewell, chapter 16; Barkat, chapters 1 and 2).

Density of a sum
f_{X+Y}=f_X*f_Y\;\Longleftrightarrow\;\varphi_{X+Y}=\varphi_X\,\varphi_Y

❓ Frequently asked

Why is a sum of many variables often Gaussian?That is the central limit theorem (Bracewell, chapter 8, section Central Limit Theorem; Barkat, section 1.4.3 covers the law of large numbers).
Where does the Rayleigh distribution appear?In the envelope of bandpass noise (Bracewell, chapter 17; Barkat, section 2.3.6).

📌 Worked example with real numbers

The sum of two independent variables uniform on [-\tfrac12,\tfrac12] has a triangular density. Numerical convolution gives variance 0.16667, matching 1/12+1/12=1/6.

7Power-spectrum estimationM12M20

🎓 Theory

The power spectrum is the Fourier transform of the autocorrelation. The periodogram of one record has a standard deviation about equal to its own value and does not shrink as N grows, so several records must be averaged (Bracewell, chapters 17 and 19; Barkat, sections 3.5 and 3.7).

Wiener–Khinchin theorem
S(s)=\int_{-\infty}^{\infty}R(\tau)\,e^{-i2\pi s\tau}\,d\tau
  • R(\tau)autocorrelation function
  • S(s)power spectrum

❓ Frequently asked

Is the periodogram consistent?No: the variance does not fall as samples increase; segment averaging (Welch style) is needed.
What is ergodicity for?So a time average over one realisation can stand in for the ensemble average (Barkat, section 3.7).

📌 Worked example with real numbers

Unit white noise, 1024 samples per record: one periodogram has standard deviation 1.02 (theory 1), averaging 64 records leaves 0.125 (theory 0.125).

8Detecting a signal in noiseM21M24M25

🎓 Theory

Detection chooses between H_0 (noise only) and H_1 (signal present). The Neyman–Pearson criterion fixes the false-alarm probability P_{FA} and maximises the detection probability P_D; the solution is a likelihood-ratio test (Barkat, chapters 5 and 10).

Detection probability
P_D=Q\!\left(Q^{-1}(P_{FA})-d\right),\qquad d=\frac{\sqrt N\,A}{\sigma}
  • Qupper-tail function of the normal distribution

❓ Frequently asked

Why Neyman–Pearson rather than Bayes?Because it needs neither prior probabilities nor decision costs, which radar and communications often lack.
How do more samples help?The detectability index d=\sqrt N A/\sigma grows with \sqrt N, so P_D rises at the same P_{FA}.

📌 Worked example with real numbers

Detecting a DC level A=1 in Gaussian noise \sigma=1 with N=10 samples and P_{FA}=10^{-3}: the threshold on the sample mean is 0.9772, d=3.1623, P_D=0.5287 by formula and 0.528 by a 400 000-trial simulation.

9Parameter estimationM22

🎓 Theory

Maximum-likelihood (ML) estimation picks the parameter that makes the observed data most likely; Bayes estimation adds a prior (MAP, MMSE). The Cramér–Rao bound gives the smallest variance of any unbiased estimator (Barkat, chapter 6).

Cramér–Rao bound for a DC level
\operatorname{var}(\hat A)\ \ge\ \frac{\sigma^2}{N}

❓ Frequently asked

What is an estimator that reaches the Cramér–Rao bound called?An efficient estimator.
How does MAP differ from ML?MAP multiplies in the prior density of the parameter; with a flat prior it coincides with ML.

📌 Worked example with real numbers

Estimating a DC level from N=10 samples of noise \sigma=1: the Cramér–Rao bound is 0.1, the simulated variance of the sample mean is 0.1001, so the sample mean is an efficient estimator.

10Optimal filtering: Wiener and KalmanM23

🎓 Theory

The orthogonality principle says the error of a least-squares estimate must be orthogonal to the data. The Wiener filter applies it to stationary processes; the Kalman filter works recursively for time-varying systems (Barkat, sections 7.2, 7.3 and 7.5).

Scalar Wiener gain
w=\frac{\sigma_s^2}{\sigma_s^2+\sigma_n^2},\qquad \text{MSE}=\frac{\sigma_s^2\sigma_n^2}{\sigma_s^2+\sigma_n^2}

❓ Frequently asked

How do Wiener and Kalman differ?Wiener is for stationary processes and designed in frequency; Kalman updates recursively sample by sample.
Does a Wiener filter always reduce the error?It gives the smallest mean-square error among linear filters, so it is never worse than leaving the data alone.

📌 Worked example with real numbers

A scalar signal of variance 1 in noise of variance 0.25: Wiener gain 0.8, mean-square error 0.2 (simulated 0.2006) versus 0.2504 if the data is left alone.

11Adaptive CFAR thresholdsM26

🎓 Theory

When the noise power varies, a fixed threshold lets the false-alarm probability drift. CFAR estimates the noise level from reference cells around the cell under test and sets a proportional threshold, keeping P_{FA} constant (Barkat, chapters 11 and 12).

CA-CFAR threshold factor
P_{FA}=\left(1+\frac{\alpha}{N}\right)^{-N}\;\Longrightarrow\;\alpha=N\left(P_{FA}^{-1/N}-1\right)

❓ Frequently asked

Why not a fixed threshold?Because P_{FA} depends on the noise power; if the noise doubles, false alarms jump.
What if a target sits in the reference cells?The threshold is pushed up and the target is masked; other CFAR variants are reviewed in section 11.3.2.

📌 Worked example with real numbers

CA-CFAR with N=16 reference cells and P_{FA}=10^{-2} in square-law noise: threshold factor \alpha=5.336 times the reference-cell mean; a 500 000-trial simulation gives P_{FA}=0.0099.

12Numerical verification and reportingall modules

🎓 Theory

A result is not finished until two independent methods agree: FFT with a direct sum, numerical integral with a closed form, formula with simulation. When reporting, state f_s, N, the window, the random seed and the library versions so others can reproduce it.

❓ Frequently asked

Why two methods?Because a single method can be wrong in the same direction as you (a 2\pi constant, an exponent sign, a 1/N normalisation).
What should be recorded to reproduce it?The experiment parameters, the random seed, and the NumPy/SciPy versions used.

📌 Worked example with real numbers

Every notebook in this course does exactly this: for example module 1 prints the deviation between FFT and direct sum and stops if it exceeds 10^{-9}.

📊 Datasets and notebooks

All data is generated in code inside the notebooks, so no external files are needed.

📊 See all notebooks and data