Elapsed time × rate. 0–120 s. Paused while hidden.Reduced motion: no autoplay. Use Play, time input or single steps.
°
0° In phase180° Opposite360°
Envelope at probe1.996
At different frequencies, the envelope varies with position and time.
Discover in 3 steps
What can phase change?
1 / 3 Record this setup and pause time.
Example: both 5 Hz, amplitude 1, phase 0°. You can restore your setup.
Why is this useful?
Cancellation requires matching frequency and amplitude as well as phase. If frequencies differ, a small displacement at one instant will not persist. Zero displacement does not prove that energy has vanished.
Opposing mode matches wave 2 to wave 1 in frequency and amplitude, with phase 0°. Wave 1 controls both. Returning to the same direction restores your independent wave 2 settings.
● Wave 1 →
Hz
● Wave 2 →
Hz
Choose a wave pattern
Frequency difference |f₂−f₁|1.0 Hz
Envelope repeat period1.000 s
Upper bound A₁+A₂2.00
Lower bound |A₁−A₂|0.00
Nearby frequencies produce observable beats. Instantaneous displacement is shown below the plot.
What the parameters mean
Frequency f₁ / f₂: 1–20 Hz in 0.5 Hz steps
Oscillations per second. A higher frequency fits more cycles into a fixed distance. Two nearby frequencies can produce observable beats.
Amplitude A₁ / A₂: 0.1–2 in steps of 0.1
The maximum displacement of each wave, in relative units. These values are not sound pressure or loudness.
Phase φ: 0–360° in 5° steps
The initial phase added to wave 2. At different frequencies, the phase relationship also varies with time and position.
Propagation direction
Same direction and beats both use right-going waves; beats also displays the envelope. Opposing mode is the existing equal-frequency, equal-amplitude standing-wave model.
Playback rate: 0.1–3.0×
Changes only how quickly displayed time advances, not the physical frequency or wave speed. At high frequencies or playback rates, display sampling can alias the motion; pause or step through time to inspect it.
Equations and assumptions
The model analytically adds one-dimensional sinusoidal waves in a linear, nondispersive, undamped medium. The vertical axis is relative displacement. The drawing illustrates signed addition; it does not model sound as a transverse wave.
For waves traveling in the same direction, Δ = (k₂−k₁)x − 2π(f₂−f₁)t + φ. The envelope amplitude is R = √(A₁² + A₂² + 2A₁A₂ cos Δ). Equal frequencies give constant R. At different frequencies, R is distinct from instantaneous displacement y.
Opposing: y = 2A₁ sin(k₁x) cos(2πf₁t)
Opposing mode sets φ = 0, A₂ = A₁ and f₂ = f₁. Node spacing is λ₁/2 and antinode amplitude is 2A₁. Fixed-end boundary conditions and selection of resonant frequencies are not calculated.
Wave speed c = 340 m/s retains the existing reference value. Temperature and medium effects on sound speed are not calculated. λ₁ = m、λ₂ = m。
All plots use the same position x and time t, with a fixed displacement scale shared by all waves. Three lanes are used normally; short screens overlay the waves. Edits and resizing while paused retain the time. Hidden pages pause without adding hidden time on return. Playback stops at 120 seconds.
Reading the spectrum and Lissajous plot
The spectrum is an analytical line spectrum, not an FFT measurement. Equal-frequency waves traveling in the same direction combine into one phase-aware amplitude. Different frequencies remain separate. Standing mode shows each traveling component amplitude, not the local standing-wave amplitude.
The Lissajous plot uses wave 1 displacement on X and wave 2 on Y at x = 17 m. It samples the preceding two seconds analytically at fixed 1 ms intervals, extending the sinusoidal formula to negative time when t < 2 s. The bright dot is the current value. Shape is independent of rendering frame count.
Does zero displacement mean zero energy?
This diagram calculates summed displacement. A standing-wave string can be momentarily straight while moving, so it can still have kinetic energy. Energy is not a simple sum of displacements; evaluating it requires the medium, velocities, gradients, boundaries and sources. This model has no energy output.
Adjust frequency, amplitude, and phase of two sinusoidal waves to observe composite wave, beats, and complete interference in real time. Understand wave relationships from multiple perspectives via spectrum and Lissajous figure.
Original explanations and share inputs are retained.
I've heard about 'beats' in music class, but why does playing two close frequencies make that 'wobbling' sound?
🎓
You can calculate it with the addition theorem. When you superpose two waves with f₁ = 440Hz and f₂ = 441Hz, the amplitude of the combined wave varies as A·cos(2π·1·t) — meaning you hear a 'louder-softer' cycle once per second. That's the beat frequency |f₁-f₂| = 1Hz. Try the 'Beats' preset and you'll see the green combined wave's amplitude pulsing.
🙋
When I set the phase difference to 180°, the combined wave became zero! Is this noise cancellation?
🎓
Exactly that. Noise-canceling headphones use a microphone to pick up external noise, then instantly generate an inverted-phase (180° shifted) sound wave and superpose it. With the same frequency, amplitude, and opposite phase, the amplitude becomes zero — the sound 'disappears'. However, because it's real-time processing, there's a tiny time delay — it's not perfect, but it's highly effective for steady noises like the low-frequency engine hum on airplanes.
🙋
Looking at the 'Spectrum' tab, I see bars at f₁ and f₂. If I set f₁=5 and f₂=10, does that become 'harmonics'?
🎓
Yes, f₂ = 2f₁ is the 'second harmonic' (2nd overtone) relationship. The timbre of string instruments differs because the amplitude ratio between the fundamental (f₁) and each harmonic varies. A pure sine wave has zero harmonics. The reason a violin and a flute playing the same 'A' sound different is due to their different harmonic spectrum compositions. Switch to the 'Harmonics' preset in the Spectrum tab and you'll see f₁ and f₂ are not 'right next to each other' but spaced an octave apart.
🙋
I've heard that Lissajous figures form closed shapes when the frequency ratio of two vibrations is an integer ratio. Where is this actually used?
🎓
In the old days, you'd feed two signals into an oscilloscope in X-Y mode to visually determine the frequency ratio. Even today, in control system testing, the phase difference between a reference signal and a measured signal is read from the tilt of the ellipse in a Lissajous figure. In a CAE context, it's useful for visualizing the frequency response of a 2-DOF vibration system. f₁:f₂=1:2 gives a 'figure-8', 1:3 gives a 'twisted M-shape' — try the simulator to see how the pattern gets more complex as the ratio becomes more complicated.
🙋
Is wave superposition also used in structural vibration analysis?
🎓
It's a core concept. 'Modal superposition method' is a technique that computes the vibration response of a complex structure as the superposition of its natural modes — it's a standard algorithm in finite element solvers. Each mode is treated as a simple sine wave, and their sum gives the actual displacement. It's also used in seismic response analysis via the 'response spectrum method', where the input energy at each natural frequency is accumulated mode by mode to find the maximum response.
Frequently Asked Questions
Are there cases where the superposition principle does not hold?
It does not hold in nonlinear media. For example, when high-intensity laser light passes through a nonlinear optical crystal, second harmonic generation (SHG) occurs, doubling the frequency. In sound waves, large amplitudes also produce nonlinear effects, forming shock waves. In CAE, examples include nonlinear soil response and material nonlinearity under large deformation. Under normal engineering conditions (small displacement, linear materials), superposition can be used.
What can we learn from measuring the beat frequency?
The frequency difference between two vibration sources is directly obtained. In musical instrument tuning, a reference tuning fork (440 Hz) and the instrument sound are superimposed; the beat is heard and tuning continues until the beat becomes zero. In ultrasonic flow meters, the difference in propagation speed (Doppler shift) in the fluid appears as a beat and is converted to flow rate. In rotating machinery monitoring, subtle frequency changes due to bearing damage can be detected as beats.
How are Fourier transform and wave superposition related?
The Fourier transform is an operation that decomposes any waveform into a superposition of sine waves. This simulator does the opposite: it shows the superposition of two sine waves. The bar chart displayed in the spectrum tab corresponds to the result of applying a Fourier transform to the composite wave. In CAE, vibration data (time series) is decomposed into frequency components via FFT, and specific natural frequency components are analyzed.
How are standing waves (stationary waves) created?
When two waves of the same frequency and amplitude travel in opposite directions, a standing wave is created: y = A·sin(kx-ωt) + A·sin(kx+ωt) = 2A·sin(kx)·cos(ωt). This produces a pattern of fixed antinodes and nodes depending on position. This is the vibration of strings in string instruments and air columns in wind instruments. For a string fixed at both ends, stable standing waves occur only when the wavelength is an integer fraction of the string length, which determines the harmonic structure.
What happens to the composite wave when the phase difference φ = 90°?
When f₁=f₂ and A₁=A₂, the composite amplitude is A·√2 ≈ 1.414A, forming a sine wave with a 45° phase shift. This is intermediate between complete constructive interference (φ=0°, amplitude 2A) and complete destructive interference (φ=180°, amplitude 0). In general, when A₁=A₂=A, the composite amplitude is given by 2A·cos(φ/2). Moving the phase difference slider from 0° to 180° shows the amplitude of the composite wave smoothly decreasing.
What is the modal superposition method?
This is an analysis method that calculates the dynamic response of a structure by superposing each natural mode. Using n mode shapes (φ₁, φ₂, ..., φₙ) obtained from eigenvalue analysis as a basis, the displacement is expanded as u(t) = Σ qᵢ(t)·φᵢ. Since the response qᵢ of each mode follows the vibration equation of a single-degree-of-freedom system, the analysis becomes simpler. It is widely used in seismic response analysis and unbalance response calculation of rotating machinery, significantly reducing computational cost compared to solving all degrees of freedom directly.
How to Use
Set the frequency f1 and amplitude A1 of wave 1 and f2, A2 of wave 2 with the sliders or number fields (1–20 Hz, amplitude 0.1–2)
Adjust the phase difference: 0° gives constructive and 180° destructive interference
Switch to the spectrum tab to see peaks at f1 and f2, and to the Lissajous tab to see how the frequency ratio and phase difference shape the figure
Worked Example
With f1 = 10 Hz, f2 = 12 Hz, A1 = A2 = 1 and phase difference 0°, the beat frequency is f_beat = |12 − 10| = 2 Hz and the beat period is T_beat = 1/2 = 0.5 s. The maximum amplitude at the in-phase instant is 2 and the minimum at the out-of-phase instant is 0, so the time trace shows an envelope that swells every 0.5 s.
Practical Notes
Beats are clearest when the frequency difference is a few hertz and the amplitudes are similar; once the difference is large enough to hear as a pitch interval (tens of hertz), you perceive two tones rather than a beat
Equal amplitudes cancel completely at destructive interference; with unequal amplitudes the minimum of the envelope is |A1 − A2|
The phase difference shifts the beat envelope but does not change f_beat = |f1 − f2|
🎬 Watch it in motion
Beats | two close tones make the volume pulse #Shorts
The Wave Equation | how waves travel, bounce, and overlap #Shorts