Foundations to Frontier
Tests
J. Scientific Machine Learning › J9 Scientific ML in Space Science

Gravitational-wave detection

Merging black holes shake spacetime, and detectors such as LIGO measure the resulting stretch of about one part in 10²¹, buried in coloured noise. Because the waveform is predicted by general relativity, the search is a matched filter against a bank of templates. This page builds a detector-like noise spectrum, Newtonian inspiral chirps and a noise-weighted matched filter. It sets thresholds from noise-only data and compares the template bank with an unmodelled excess-power search, measuring detection rates and chirp-mass errors.

Level 0: Foundation

★☆☆☆☆ Introductory⏱ 5 minGeneral audience. No mathematics required.

Listening for colliding black holes

When two black holes spiral into each other they send out gravitational waves, ripples in spacetime that stretch and squeeze everything they pass. The signal is a chirp: its frequency and loudness rise until the merger. The stretch at Earth is a thousand times smaller than a proton, so detector noise is far larger than the signal. Because physicists know what the chirp should look like, they can slide predicted waveforms along the data and look for a match.

Space science lab
A chirp mass of 20 M☉ spends 0.23 s and about 15 wave cycles between 40 Hz and 350 Hz; frequency and amplitude rise towards merger. Lighter systems and lower cut-offs give longer signals with more cycles, which is why matched filtering measures the chirp mass precisely.
Why engineers care

LIGO’s first detection, GW150914, was two black holes of about 36 and 29 solar masses merging 1.3 billion light-years away.

📝 Quick check (Level 0)
0/3 answered
  1. 1. A binary inspiral signal is…
  2. 2. Gravitational waves are found by…
  3. 3. Compared with the noise, the signal is…

Level 1: Beginner

★★☆☆☆ Basic⏱ 20 minSecondary-school mathematics: arithmetic and elementary algebra.

By hand

  • Strain: the fractional change in arm length, h ≈ 10⁻²¹ for typical events.
  • Noise power spectral density S(f): seismic noise dominates below about 20 Hz, a sensitive band lies around 100–300 Hz, and shot noise rises at high frequency.
  • Chirp mass: Mc = (m₁m₂)^(3/5)/(m₁+m₂)^(1/5) sets how fast the frequency rises at leading order. It is the best-measured mass parameter.
  • Matched filtering: the optimal linear filter for a known signal in Gaussian noise is the noise-weighted correlation with the template, giving an SNR time series.
  • Template bank: the unknown masses are covered by a grid of templates, and the search takes the maximum SNR over templates, times and phases.
  • Unmodelled searches: excess-power and wavelet methods (cWB) find signals of unknown shape at the cost of sensitivity. Machine learning is used for glitch classification (Gravity Spy) and fast detection.
📝 Quick check (Level 1)
0/3 answered
  1. 1. The best-measured mass combination is…
  2. 2. Matched filtering is optimal for…
  3. 3. Below about 20 Hz, ground detectors are limited by…

Level 2: Intermediate

★★★☆☆ Intermediate⏱ 25 minUndergraduate students and practising engineers.

A matched filter in coloured noise

Exercise 1.

  • 4 s of data at 1024 Hz.
  • A PSD S(f) = x⁻⁴ + 2 + 2x² with x = f/150 Hz, effectively infinite below 20 Hz.
  • Newtonian chirps with frequency f(τ) = (1/π)(5/256τ)^(3/8)(G Mc/c³)^(−5/8), kept between 40 and 350 Hz.
  • Noise-weighted inner product ⟨a,b⟩ = 4 Re Σ a b*/S Δf.
  • The matched-filter SNR |⟨d,h e^(iφ)⟩|/√⟨h,h⟩, maximised over phase with a complex filter and over time with an FFT.

Practice.

  • Whiten by the measured PSD and check that whitened noise looks Gaussian; real data contain glitches.
  • Space templates so that no signal loses more than a few per cent of its SNR to the nearest template.
  • Measure the background by time-sliding data between detectors, and quote a false-alarm rate.
  • Require coincidence between detectors and use signal-consistency tests such as χ².
  • Tools: GWpy, PyCBC, LALSuite, Bilby for parameter estimation, and GWOSC for open data.
import numpy as np

def matched_filter(d, h, psd, fs):
    n = len(d)
    df, hf = np.fft.rfft(d) / fs, np.fft.rfft(h) / fs
    dF = fs / n
    sigma = np.sqrt(4 * np.sum(np.abs(hf) ** 2 / psd) * dF)
    z = np.fft.ifft(np.r_[df * np.conj(hf) / psd, np.zeros(n - len(hf))]) * n * 4 * dF
    return np.abs(z) / sigma
🐍 Exercise 1: building the filter
Generate coloured detector noise and a Newtonian chirp, implement the noise-weighted matched filter, and check it on pure noise and on an injected signal.
📝 Quick check (Level 2)
0/3 answered
  1. 1. Real detector data must be checked for…
  2. 2. The background of a search is measured by…
  3. 3. A Python package for gravitational-wave searches:

Level 3: Advanced

★★★★☆ Advanced⏱ 25 minGraduate level, with full derivations and proofs.

Theory

Why matched filtering. For a signal h in stationary Gaussian noise with PSD S, the linear statistic with the largest SNR weights each frequency by h̃(f)/S(f), giving ⟨d,h⟩. Its optimal SNR is ρ² = ⟨h,h⟩ = 4∫|h̃|²/S df. A complex filter, using the template and its 90° phase shift, removes the unknown phase. On pure noise, |SNR|² is then the sum of two unit-variance squares and averages 2. In Exercise 1 it averaged 2.0. A chirp-mass-20 signal injected at SNR 10 was recovered at 10.9, at the right time. It spends only 0.23 s between 40 and 350 Hz, with 10 zero crossings in the first half of that time and 18 in the second.

How long a signal stays in band. At leading order the time left before merger from frequency f is τ = (5/256)(πf)^(−8/3)(G Mc/c³)^(−5/3). Lowering the cut-off from 40 to 10 Hz multiplies it by 4^(8/3), about 40, which is why low-frequency sensitivity matters.

Templates and the look-elsewhere effect. Taking the maximum over templates, times and phases raises the noise background, so the threshold comes from noise-only data. A template with the wrong chirp mass loses SNR by the match, the normalised overlap. Because the phase depends strongly on Mc, the best template measures it precisely. An unmodelled search sums power in time–frequency tiles. It needs no template but spreads the signal over many noise degrees of freedom.

📝 Quick check (Level 3)
0/3 answered
  1. 1. Noise-only |SNR|² from a complex filter averages…
  2. 2. Lowering the low-frequency cut-off from 40 to 10 Hz multiplies the in-band time by about…
  3. 3. A wrong template reduces the SNR by…

Level 4: Expert

★★★★★ Expert⏱ 30 minResearchers: original papers and open problems.

At what SNR does a template bank reliably detect inspirals compared with an unmodelled excess-power search at the same false-alarm rate, and how well does the best template measure the chirp mass?

History.

  • A. Einstein (1916) predicted gravitational waves.
  • R. Hulse and J. Taylor (1974) found a binary pulsar whose orbital decay matched their emission.
  • B. Sathyaprakash, S. Dhurandhar and others developed template-bank matched filtering in the 1990s.
  • LIGO detected GW150914 on 14 September 2015, and LIGO–Virgo saw the neutron-star merger GW170817 with light in 2017. D. George and E. Huerta (2018) detected signals with deep learning.

Exercise 2.

  • The bank has 30 templates with chirp masses from 8 to 40, spaced geometrically.
  • Thresholds are the largest statistic over 40 noise-only 4-s segments, a false-alarm probability of about 1/40 per segment.
  • At optimal SNRs of 6, 8, 10 and 12, chirps with chirp masses of 10–35 and random merger times are injected 25 times each.
  • The excess-power search whitens the data, sums 40–350 Hz power in tiles of 1/8, 1/4 and 1/2 s, and takes the largest tile relative to the median tile.

Seed 0 (fraction recovered by bank / by excess power; median chirp-mass error of the best template):

optimal SNR bank excess power chirp-mass error
6 0.76 0.12 3.2%
8 1.0 0.24 2.4%
10 1.0 0.64 1.9%
12 1.0 0.8 1.4%
  • Thresholds: bank 5.5 and excess power 2.2. The bank threshold is well above the single-template noise level because of the maximum over 30 templates and 4096 lags.
  • The template bank found every signal from SNR 8; excess power still missed a fifth at SNR 12. Knowing the waveform is worth a large factor in sensitivity.
  • The best template gave the chirp mass within 1.4–3.2%, limited by the bank spacing as well as by noise.
  • Seeds 1 and 2:
    • thresholds 5.9 / 2.0 and 5.2 / 1.9;
    • bank recovery at SNR 6 was 0.6 and 0.92, and 1.0 from SNR 8 in both;
    • excess power at SNR 12 was 0.92 and 0.84;
    • chirp-mass errors 1.5–3.4%.
🐍 Exercise 2 (research): at what SNR does a template bank reliably detect inspirals compared with an unmodelled excess-power search at the same false-alarm rate, and how well does the best template measure the chirp mass?
Search coloured noise for injected chirps with a template bank and with excess power at thresholds set from noise-only data, and measure recovery and chirp-mass error at SNRs of 6 to 12.

Gravitational-wave searches in practice

  • Pipelines: PyCBC, GstLAL, MBTA and SPIIR run template banks of hundreds of thousands of waveforms in low latency; cWB runs unmodelled searches.
  • Catalogues: GWTC-3 lists about 90 events from the first three observing runs, and the fourth run has added many more candidates.
  • Machine learning: Gravity Spy classifies glitches with citizen science and CNNs; neural networks detect signals and estimate parameters in seconds (DINGO).
  • Future: LISA in space will hear massive black-hole mergers at millihertz frequencies; the Einstein Telescope and Cosmic Explorer will reach the early universe.

References

  1. B. P. Abbott et al. (LIGO Scientific and Virgo Collaborations) (2016). “Observation of gravitational waves from a binary black hole merger.” Physical Review Letters.
  2. B. Allen, W. G. Anderson, P. R. Brady, D. A. Brown and J. D. E. Creighton (2012). “FINDCHIRP: an algorithm for detection of gravitational waves from inspiraling compact binaries.” Physical Review D.
  3. B. S. Sathyaprakash and S. V. Dhurandhar (1991). “Choice of filters for the detection of gravitational waves from coalescing binaries.” Physical Review D.
  4. D. George and E. A. Huerta (2018). “Deep learning for real-time gravitational wave detection and parameter estimation.” Physics Letters B.
  5. M. Zevin et al. (2017). “Gravity Spy: integrating Advanced LIGO detector characterization, machine learning, and citizen science.” Classical and Quantum Gravity.