PhysSandbox
Classical MechanicsWaves & SoundElectricity & MagnetismOptics & LightGravity & OrbitsLabs
🌙Astronomy & The Sky🌡️Thermodynamics🌍Biophysics, Fluids & Geoscience📐Math Visualization🔧Engineering🧪Chemistry

More from Math Visualization

Other simulators in this category — or see all 52.

View category →
NewUniversity / research

Mandelbrot Deep Zoom

Drag/wheel deep zoom into the Mandelbrot set with smooth continuous coloring and named landmarks.

Launch Simulator
NewUniversity / research

Julia Set Explorer

Pick c by clicking the embedded mini-Mandelbrot or animate c along a circle; Fatou dust vs connected sets.

Launch Simulator
NewUniversity / research

Newton Fractal

Basins of attraction for Newton iteration on zⁿ−1 with adjustable relaxation ω.

Launch Simulator
NewUniversity / research

Rössler Attractor

RK4 integration of ẋ=−y−z, ẏ=x+ay, ż=b+z(x−c); period-doubling cascade as c grows.

Launch Simulator
NewSchool

L-Systems (Turtle)

Lindenmayer string rewriting + turtle: Koch, Sierpinski, Hilbert, Heighway dragon, plant.

Launch Simulator
NewSchool

Bézier & de Casteljau

Drag control points; live recursive linear-interpolation scaffolding evaluates B(t).

Launch Simulator
PhysSandbox

Interactive physics, chemistry, and engineering simulators for students, teachers, and curious minds.

Physics

  • Classical Mechanics
  • Waves & Sound
  • Electricity & Magnetism

Science

  • Optics & Light
  • Gravity & Orbits
  • Astronomy & The Sky

More

  • Thermodynamics
  • Biophysics, Fluids & Geoscience
  • Math Visualization
  • Engineering
  • Chemistry

© 2026 PhysSandbox. Free interactive science simulators.

PrivacyTermsContact
Home/Math Visualization/Polyphase L/M Resampling

Polyphase L/M Resampling

Sampling-rate conversion by integer factors L (upsample) and M (downsample) is usually drawn as zero insertion by L, a linear-phase FIR low-pass at the intermediate rate L·F_s, then decimation by M. The FIR must simultaneously attenuate spectral images created by stuffing zeros (anti-imaging) and prevent aliasing when the high-rate signal is decimated by M (anti-alias), which in the idealized full-band setting leads to a cutoff on the order of min(π/L, π/M) radians per high-rate sample. The polyphase decomposition rewrites the same FIR as L shorter subfilters E_r(z^L) that operate only on input-rate samples—this is the computational form behind efficient interpolators and rational resamplers (Noble identities). The page implements the direct high-rate convolution path for clarity, aligns output samples to the original finite input window after compensating FIR group delay, lets you toggle a no-filter path to see aliasing/imaging, and compares windowed-sinc spectra before and after resampling. It does not implement coefficient sharing, multistage decimation, or half-band shortcuts.

Who it's for: Undergraduate DSP or audio students learning multirate systems, interpolation, decimation, image rejection, and why generic FIRs are oversized when you exploit polyphase structure.

Key terms

  • Polyphase decomposition
  • Noble identities
  • Upsampling
  • Decimation
  • Anti-aliasing filter
  • Anti-imaging filter
  • Rational resampling
  • Windowed sinc

Live graphs

L / M resampler

4
3
65taps
0.88×min(π/L,π/M)
3.2
0.95

Measured values

Output length127
Effective rate1.3333×Fs_in
ω_c (rad/sample @ high rate)0.6912
Polyphase arms L4
Taps / phase (ceil)17

How it works

Integer L/M resampling in canonical form: zero-insert by L, FIR low-pass at the high rate with cutoff tied to min(π/L, π/M) to suppress imaging (after upsampling) and aliasing (before downsampling), then keep every M-th sample. The same FIR can be rearranged by the Noble identities into a polyphase bank of L shorter filters running at the input rate—identical arithmetic, lower rate inside each branch. Toggle skip FIR to see what breaks when the anti-alias / anti-image step is removed.

Key equations

u[k] = Σ x[i] δ[k − iL] (zero stuffing), y[m] = (u * h)[m₀ + mM]
H(z) = Σ_{r=0}^{L−1} z^{−r} E_r(z^L) — L polyphase components E_r

Frequently asked questions

Why is the cutoff tied to min(π/L, π/M)?
After ↑L, spectral copies appear every 2π/L in normalized high-rate frequency; a low-pass must keep below roughly π/L to suppress images before they fold. Before ↓M, energy above about π/M would alias when you keep every Mth sample. Using the stricter of the two keeps both effects under control in this simplified full-band sine test.
Is this the same as a polyphase implementation computationally?
Mathematically the outputs match (up to numerical detail and boundary handling). A true polyphase structure avoids explicitly forming the long zero-stuffed sequence and runs L cheap convolutions at the input rate; this page emphasizes the signal-flow picture first.
What goes wrong when I skip the FIR?
Images from zero-stuffing remain, and decimation folds them into the output band, producing ghost tones and a broken spectrum—classic missing anti-alias / anti-image filtering.
Why is output length close to, but not exactly, N_in·L/M?
The simulator emits output samples whose high-rate timestamps fall on the original input window after FIR group-delay compensation. Because the ratio L/M is rational and sample counts are integers, the count is floor((N_in − 1)L/M) + 1, which is the number of decimated instants that land from the first through the last input sample.