Skip to content
ScienceQuest
Waves & Optics Simulator School

Doppler Effect Simulator

See the Doppler effect as wavefronts bunch ahead of a moving source and stretch behind it, with the observed frequency and a shock cone past Mach 1.

Simulator

Heard approaching
f(v + vo)/(v - vs). Steady while the source is still distant, not rising as it comes.
652.1 Hz
Heard receding
Defined even above Mach 1, because sound behind a receding source is stretched rather than piled up and arrives in the order it left.
405.4 Hz
Pitch drop
The musical size of the swoop as it passes. A whole tone is 2 semitones, an octave is 12.
8.23 semitones
Wavelength ahead
(v − vs)/f. Zero means consecutive crests leave from the same place. Negative means the source arrives before its own sound, which is not a wavelength.
0.526 m
Mach number
Source speed over wave speed, here 343 m/s. Regime: subsonic.
0.233
Cone half-angle
arcsin(1/M), measured from the flight path. Below Mach 1 the wave outruns the source in every direction, so there is no cone.
no cone
Parameters
Hz

What the source produces. A siren is a few hundred hertz.

m/s

Positive means moving towards the observer. Past the wave speed a cone forms.

m/s

Positive means moving towards the source. Compare it against the same source speed: the two are not equivalent.

m

How far off the track the observer stands. A closer pass makes the pitch drop faster.

Nominal values. All three depend on temperature, and water also on salinity and depth.

Read the approaching pitch with only the source moving, then give the observer the same speed with the source still, and compare. They are not the same, because a moving source changes the wavelength in the medium while a moving observer only changes how often it meets one.

  • Heard by the observer
  • Emitted
Frequency heard against arrival time as the source passes. Flat and high while it approaches, flat and low once it has gone, and the whole change happens over the short interval when it goes by.

Citing this tool

Last updated . Add the date you accessed it as well, which a citation of a page that can change asks for. If a specific result matters, cite the permalink from the tool’s share row instead of this page: it reproduces the exact parameters.

Teaching with this? You can put it on a class page or LMS for free, with no ads inside the frame. Get the embed code.

The equation

f′=f v±vov∓vsf' = f\,\frac{v \pm v_o}{v \mp v_s}

Doppler (1842)

The pitch is steady, then it drops, then it is steady again

Almost everyone describes a passing siren as rising in pitch as it comes towards them. It does not. Watch the graph: the frequency is high and almost flat during the whole approach, then falls steeply over a second or so, then sits low and almost flat as the vehicle recedes.

The reason is geometry rather than acoustics. Only the component of motion along the line of sight shifts the frequency, so both speeds get multiplied by the cosine of the angle between the track and the line joining source and observer. While the source is still far up the road that cosine is very close to 1 and barely changes. It swings through its entire range, from +1 through 0 to −1, only during the short interval when the source is nearby.

That is why the famous swoop is the transition and not the approach, and it is why standing closer to the road makes the drop sharper: a smaller miss distance means the angle sweeps through its range in less time. Set the miss distance to 10 m and then to 300 m and compare the steepness of the graph.

A moving source and a moving observer are not the same thing

This is the part the formula quietly tells you and most explanations skip. f′ = f(v + v_o)/(v − v_s). The observer speed is in the numerator. The source speed is in the denominator. They are not interchangeable, and the difference is physical.

A moving source genuinely changes the wave in the medium. Each crest leaves from a point further along than the last, so the crests ahead are packed closer together: the wavelength in the air is actually shorter. Look at the wavefronts in the scene, which is exactly what they are showing.

A moving observer changes nothing about the wave. The crests are where they always were, evenly spaced, and the observer simply runs into them more often. The medium is untouched.

At low speeds the two give nearly identical answers, which is why the distinction is easy to miss. Set both to 30 m/s in air and the results differ by under a percent. Set both to 300 m/s and they diverge completely: a source at 300 m/s nearly reaches the wave speed and the denominator collapses, driving the pitch up enormously, while an observer at 300 m/s merely roughly doubles it. Push the source past 343 m/s and the formula stops having an answer at all, whereas an observer can keep going indefinitely.

What happens at the speed of sound

As the source speed approaches the wave speed, the wavelength ahead of it, (v − v_s)/f, shrinks towards zero. Every crest is emitted from almost exactly where the previous one was, so they pile up on top of each other. That is the readout going to zero, and it is the wavefronts in the scene becoming tangent at a single point.

At and just past that speed there is no single frequency to report, and the simulator says so rather than printing a number. An observer ahead of the source hears nothing at all, because the source is keeping pace with its own sound, and then receives the whole accumulated disturbance at once as a pressure jump. A pressure jump is not a tone, and asking what pitch it has is the wrong question.

Beyond the wave speed the source outruns its own sound, and the crests it emitted earlier are now behind it. Their common tangent is a cone whose half-angle from the flight path is arcsin(1/M), with M the Mach number. At Mach 1 that is 90 degrees, a flat front. At Mach 2 it is 30 degrees, and it keeps narrowing as the speed rises.

The cone is the sonic boom, and this clears up a common misconception. The boom is not a one-off event at the instant an aircraft crosses Mach 1. The cone trails the aircraft for as long as it stays supersonic, and you hear a boom when the cone sweeps over you, which can be long after the aircraft has passed overhead and many kilometres from where it went transonic.

Sound behind the source still behaves normally

Notice that the receding frequency is reported at every source speed, including supersonic. It is not an oversight. Sound emitted behind a receding source is stretched rather than compressed, so those crests arrive in the order they left and there is a perfectly well defined frequency.

The receding case has its own limit, and it belongs to the observer rather than the source. If the observer recedes faster than the wave travels, no further crest ever catches up, and there is nothing to hear. That is a different failure from the transonic one, and the model distinguishes them.

Light needs a different formula

The idea carries over to light. The formula does not.

Everything on this page depends on a medium. There is a wave speed measured relative to that medium, and the numerator and denominator can be different precisely because "the source moving" and "the observer moving" are distinguishable states. Light has no medium, so only the relative velocity of source and observer means anything, and the correct expression is the relativistic Doppler formula. It is necessarily symmetric in that relative velocity, and it carries a time-dilation factor that has no counterpart in sound.

At everyday speeds the two agree closely enough that a police radar can be understood with the acoustic version. At the speeds of distant galaxies they do not. And cosmological redshift is a third thing again: it comes from space expanding while the light is in flight, not from motion through space, which is why very distant objects can show a redshift that the velocity formula would read as faster than light.

What this model leaves out

The medium is still. A wind changes the effective wave speed along the line of sight and shifts every number here, which is one reason distant sound carries better downwind. Temperature does the same: the 343 m/s figure is dry air at 20 °C, and the speed moves by roughly 0.6 m/s per degree, so a cold night is several m/s slower.

The source is a point, the track is straight, and the speed is constant. Nothing here accounts for a vehicle accelerating, cornering, or having any size. There is no attenuation and no spreading loss, so the wavefronts are drawn at equal strength however far they have travelled, whereas real sound falls off with distance and the high frequencies are absorbed faster than the low ones.

There are no reflections, so no echo and no ground bounce, both of which are audible in practice. The treatment is linear acoustics throughout, which is a real limitation near Mach 1: a genuine shock is a nonlinear phenomenon and the model does not attempt it, which is exactly why the approaching frequency is refused inside the transonic band rather than reported as an enormous number.

Common mistakes

  • Getting the signs wrong. The most common failure by a wide margin. Here v_o is positive towards the source and v_s is positive towards the observer, so approaching motion raises the pitch on both counts. Write the convention down before substituting, every time.
  • Putting the source speed in the numerator. Source in the denominator, observer in the numerator. Swapping them gives an answer that is close at low speed and completely wrong near the wave speed.
  • Saying the pitch rises as it approaches. It is high and steady while approaching. The change happens during the pass.
  • Thinking the boom happens when the aircraft breaks the sound barrier. The cone trails it continuously. You hear the boom when the cone reaches you.
  • Using this formula for light. Use the relativistic one. There is no medium, so the source and observer cases cannot differ.
  • Treating the wave speed as a property of the source. It belongs to the medium. Changing the medium changes every result on this page while the source does nothing different.
  • Expecting a symmetric graph. Plotted against arrival time it is not, because while the source closes in, each crest has less distance to cover than the one before, so the approach is squeezed into less time than the departure.

Model and assumptions

Method
Exact expression, no time stepping
Repeatability
Deterministic. The same link gives the same numbers on any machine.

What it assumes

  • Classical Doppler for a wave carried by a medium, so source and observer speeds enter the expression differently.
  • The sign convention is stated once and used throughout: observer speed is positive moving towards the source, source speed positive moving towards the observer.
  • The readouts take motion along the line joining them, and the pass curve resolves both speeds along the line of sight to an observer a miss distance off the track. The medium itself is still.

Where it stops holding. Source speeds at or above the wave speed, where the denominator vanishes and a shock forms, and anything relativistic, which needs a different formula entirely.

Numerical accuracy

No method error to report: the result is a closed-form expression evaluated directly, with no time stepping to accumulate error. What remains is double-precision rounding, of order one part in 10^16 per operation.

Doppler Effect Simulator: the equation f′ = f (v ± v o)/(v ∓ v s).
The equation the simulator is built on, with its source. Image © ScienceQuest, CC BY 4.0. Free to reuse with credit and a link to this page; how to reuse it. Download PNG

Common questions

Why does a siren drop in pitch as it passes rather than while approaching?

Because the pitch is steady while the source approaches in a straight line, and steady again once it has gone; the change happens over the short interval when it passes you. Approaching, every wavefront is emitted closer to you than the last, so they arrive bunched and the pitch is high and constant. Once past, they are emitted further away each time and arrive stretched, so the pitch is low and constant. The famous swoop is the transition between the two.

Is a moving source the same as a moving observer?

Not quite, and the formula shows why: the source speed appears in the denominator and the observer speed in the numerator. A moving source physically changes the wavelength in the medium, since each crest leaves from a different place. A moving observer meets unchanged wavelengths at a different rate. The two give almost identical answers at low speeds, but they diverge as the speed approaches the wave speed, where a moving source drives the wavelength towards zero and a moving observer does nothing of the sort.

What happens when the source reaches the speed of sound?

The wavefronts ahead of it pile up on top of one another, because the source keeps pace with the crest it emitted, and the denominator of the formula goes to zero. Past that speed the source outruns its own sound and the wavefronts form a cone behind it whose half-angle is arcsin(1/M), with M the Mach number. That cone is the sonic boom, and it is heard as the cone sweeps over you rather than at the moment the aircraft breaks through.

Does this apply to light as well as sound?

The idea does, the formula does not. Light needs the relativistic Doppler formula, because there is no medium to be moving relative to and only the relative velocity of source and observer means anything. At everyday speeds the two agree closely, which is why a police radar can be understood with the sound version. At the speeds of distant galaxies they do not, and cosmological redshift is a further effect again, coming from expanding space rather than motion through it.