A topic in the Open Knowledge Graph — a free, open map of 15,290 topics and the order to learn them in.

Window Functions and Spectral Leakage

Graduate Depth 107 in the knowledge graph I know this Set as goal
13topics build on this
682prerequisites beneath it
See this on the map →
Discrete Fourier Transform (DFT) and Fast Fourier Transform (FFT) AlgorithmsFourier Transform: Definition and PropertiesDigital Spectral Analysis: Nonparametric MethodsPower Spectral Density Estimation+2 more
windowing spectral-analysis dft frequency-domain

Core Idea

Spectral leakage occurs when analyzing finite-length signals with the DFT because the signal is not periodic within the window. Window functions taper the signal at the edges to reduce leakage at the cost of broader mainlobes. Common windows (Hann, Hamming, Blackman, Kaiser) trade off mainlobe width and sidelobe attenuation, making the choice critical for spectral accuracy.

Explainer

The DFT assumes the N samples you provide represent one complete period of a periodic signal. When you compute the N-point DFT, you are implicitly tiling the signal — pretending the N samples repeat forever. If the signal contains a frequency that does not fit an integer number of cycles within your window, the signal's value jumps discontinuously at the boundary between repetitions. That jump has energy at all frequencies, so it contaminates every spectral bin — this is spectral leakage. A pure sinusoid at exactly bin 5 produces energy only at bin 5; a sinusoid at frequency 5.3 (not a whole number of cycles in the window) smears its energy across all N bins.

This connects directly to what you learned about the Fourier transform and the DFT. Computing the N-point DFT of a finite segment of a signal is mathematically equivalent to multiplying the infinite signal by a rectangular pulse of width N, then transforming. In the frequency domain, multiplication becomes convolution: the DFT output is the convolution of the true spectrum with the Fourier transform of the rectangular window. The rectangular window's spectrum is a sinc-like function with a narrow mainlobe but sidelobes at only −13 dB below the peak — meaning a strong frequency can contaminate neighboring bins at 1/5 of its amplitude. The sidelobes fall off slowly, so leakage from a strong tone can bury a nearby weak tone.

The solution is a window function: taper the signal to zero at both edges before computing the DFT. A Hann window multiplies each sample n by w(n) = 0.5(1 − cos(2πn/N)), smoothly reaching zero at n = 0 and n = N−1. This eliminates the edge discontinuity. The cost is that the window's frequency-domain representation has a wider mainlobe — instead of resolving frequencies that differ by 1/N, you now need a separation of roughly 2/N. But the sidelobes drop to −31 dB, dramatically reducing the contamination. A Blackman window achieves −58 dB sidelobes at the cost of a 3/N mainlobe width.

The Kaiser window makes this tradeoff continuous via a parameter β: β = 0 gives a rectangular window, and increasing β widens the mainlobe while suppressing sidelobes. This lets you design the window to meet a specification — if you need to detect a signal 40 dB weaker than a nearby tone, choose β to give ≥40 dB sidelobe attenuation, then accept the resulting resolution loss. The design question is always: do you need to *resolve* close frequencies (want narrow mainlobe, tolerate sidelobes) or *detect* weak signals near strong ones (want low sidelobes, tolerate wider mainlobe)? These requirements pull in opposite directions, and no window satisfies both simultaneously.

Practice Questions 5 questions

Prerequisite Chain

Understanding ZeroThe Number ZeroCounting to FiveCounting to 10Counting to 20Counting a Set of Objects Up to 20Cardinality: The Last Number CountedMatching Numerals to QuantitiesSubitizing Small QuantitiesAddition Within 10Number Bonds to 10Addition Within 20Doubles and Near DoublesDoubles Facts Within 10Near Doubles Facts Within 20Mental Math Strategies for AdditionMental Math: Adding and Subtracting TensAddition Within 100Repeated Addition as MultiplicationMultiplication as Equal GroupsMultiplication: ArraysBasic Multiplication Facts (0s, 1s, 2s, 5s, 10s)Multiplication Facts Within 100Division as Equal SharingDivision as Grouping (Measurement Division)Division: Grouping (Repeated Subtraction) ModelDivision: Fair Sharing ModelDivision as Equal SharingDivision as GroupingBasic Division FactsDivision Facts Within 100Multiplication and Division Fact FamiliesRelationship Between Multiplication and DivisionDivision Facts as Inverse of MultiplicationRemainders and Quotients in DivisionDivision Word ProblemsMulti-Step Word ProblemsSolving Multi-Step Word ProblemsMultiplication Word ProblemsDivision Word ProblemsIntroduction to Long DivisionFactors and MultiplesPrime and Composite NumbersEquivalent FractionsRelating Fractions and DecimalsDecimal Place ValueIntegers and the Number LineComparing and Ordering IntegersAbsolute ValueAdding IntegersSubtracting IntegersMultiplying IntegersDividing IntegersUnit RatesProportionsPercent ConceptConverting Between Fractions, Decimals, and PercentsOperations with Rational NumbersTwo-Step EquationsSolving Multi-Step EquationsEquations with Variables on Both SidesAngle Pairs: Complementary, Supplementary, and VerticalParallel Lines and TransversalsCorresponding AnglesAlternate Interior AnglesTriangle Angle Sum TheoremExterior Angle TheoremTriangle Inequality TheoremSimilar Triangles: AA SimilaritySimilar Triangles: SSS and SAS SimilarityProportions in Similar TrianglesRight Triangle Trigonometry IntroductionSine, Cosine, and Tangent RatiosTrigonometric Ratios ReviewRadian MeasureConverting Between Degrees and RadiansThe Unit CircleGraphing Sine and CosineGraphing Tangent and Reciprocal Trigonometric FunctionsDerivatives of Trigonometric FunctionsAntiderivativesIndefinite IntegralsBasic Integration RulesRiemann SumsDefinite Integral DefinitionDouble Integrals: Definition and SetupIterated Integrals and Fubini's TheoremDouble Integrals over Rectangular RegionsDouble Integrals over General RegionsApplications of Double Integrals: Area, Mass, and MomentsCenter of MassConservation of Linear MomentumElastic CollisionsInelastic CollisionsCoefficient of RestitutionCollision Analysis and Real-World ApplicationsTwo-Body Collisions in the Center-of-Mass FrameReduced Mass and Two-Body ProblemsKinematics in Two DimensionsProjectile MotionCircular Motion: KinematicsSimple Harmonic MotionIntroduction to Differential EquationsLaplace Transform: Fundamentals and PropertiesZ-Transform: Fundamentals for Discrete-Time SignalsDiscrete-Time Fourier Transform (DTFT)Discrete Fourier Transform (DFT) and Fast Fourier Transform (FFT) AlgorithmsWindow Functions and Spectral Leakage

Longest path: 108 steps · 682 total prerequisite topics

Prerequisites (2)

Leads To (4)