White Noise, Harmonics, and Speed of Sound — Study Notes (Part 2)
White Noise, Harmonics, and Speed of Sound — Study Notes
- Theme: Moving from a monochromatic sine-time signal to a white-noise-driven spectrum to extract the fundamental frequency from harmonic content and use it to compute the speed of sound.
- Goal: Use Fourier analysis and peak detection on averaged spectra to identify the basic frequency and its harmonics, then relate f and λ to obtain the speed of sound in air.
Overview of the experiment (signal types and goals)
- Previously discussed: recording monochromatic sound gives a time-domain sine wave with a single frequency; in the frequency domain, there is a single peak.
- Now: replace the input with white noise, which has a broad frequency spectrum.
- Observation: from the broad set, only certain frequencies are amplified — these are the resonant harmonics of the fundamental frequency determined by the physical cavity (the cube).
- Explanation: resonant frequencies are those that satisfy a condition like n × (λ/2) for the standing wave in the cavity, where n is an integer. Those are the strong peaks in the spectrum.
- In short: the time signal is a mixture of several harmonic frequencies; the Fourier transform yields an equidistant set of harmonic peaks corresponding to multiples of the fundamental frequency f1 = basic frequency.
- Visual cue: peaks at f = 1×f1, 2×f1, 3×f1, … (roughly around 100 Hz and higher in this setup).
- Calibration concept: the harmonic peaks lie on what can be used to form a linear calibration curve, enabling a more precise extraction of the basic frequency f1.
Frequency domain details and harmonic structure
- The spectrum shows equidistant harmonic frequencies: f_k = k f1 for k = 1, 2, 3, ….
- The spectrum is symmetric due to the Fourier transform of real-valued time signals; we only examine one half (positive frequencies).
- The observed harmonics are tied to the physical resonance condition: strong peaks occur at n × (λ/2) (n is an integer).
- The goal of the analysis is to identify the basic frequency f1 with high precision by leveraging multiple harmonics and their linear arrangement in the spectrum.
Spectrum averaging and calibration frequencies
- An averaging step is performed to produce an average spectrum (harmonic spectrum), which is much smoother than individual spectra.
- Calibration references used earlier: two calibration frequencies around ~1400 Hz and ~1540 Hz (approximate values mentioned).
- After averaging, the scale is refined using the harmonic content rather than relying on a single peak.
- The workflow includes repeating runs to improve the scale and the precision of f1 by focusing on harmonic frequencies.
Thresholding and peak selection in the spectrum
- Threshold concept: threshold = peak height (amplitude). It must be high enough to reject noise but not so high that true peaks are missed.
- If threshold is too low: noise gets counted as peaks.
- If threshold is too high: real peaks are missed.
- Practical threshold values discussed: initial runs might use around 50; higher values (e.g., around 150) can improve reliability of peak extraction.
- The average spectrum typically shows dozens of peaks (e.g., around 50–55 peaks in a given run).
- Peak selection process: a program reads the spectrum, detects peaks by evaluating derivatives (peak finding / maximum detection), and plots the peaks on the spectrum.
- The detected peak positions are then written to a data file (data1 folder) for subsequent analysis.
- In the spectrum, only the positive half is used for downstream processing (the symmetric negative half is discarded).
Program flow and block-diagram understanding
- Block diagram components (program structure):
- Acquire: hardware interface connected to a microphone to capture the time-domain signal.
- Transform: split the time-domain signal and apply the Fourier transform to produce the frequency-domain spectrum.
- Plot: display the frequency spectrum (frequency spectrum graph).
- Average: perform averaging over multiple spectra (e.g., 50 or 300 samples) to obtain a smooth spectrum.
- Peak search: identify peaks in the averaged spectrum using a derivative-based method (maximum function).
- Data output: send the peak frequencies (n × f1) to a measurement file for later analysis.
- File management: data files are saved in a folder (data1). Each run appends a sequential suffix (FT8, FT9, etc.). The latest run is the most recent file; previous runs remain for reference.
- Data inspection steps: open the latest file, ignore time stamps, and plot the consecutive peak frequencies (in Excel, use a scatter plot to visualize the line of n f1 values).
- Important note: when plotting in Excel, discard the symmetric portion of the Fourier spectrum and focus on the positive half.
Data handling, plotting, and regression analysis
- After exporting peak frequencies, you plot them as a scatter plot to observe linearity in the harmonic series.
- To perform a linear fit, select a linear region of the data (a subset of consecutive peaks) and fit a line:
- Display the equation of the best-fit line and the coefficient of determination R^2.
- Use the slope of the line to determine the basic frequency f1 (the intercept is typically near zero for a clean harmonic series).
- Practical steps when data has a slightly non-linear region or a stray point:
- Delete the outlier point and redraw the regression on the clean linear region.
- Recompute the fit to improve the estimate of f1.
- The outcome of the regression gives the estimated basic frequency for the harmonic oscillator (the fundamental frequency f1).
- Relationship used: for a harmonic in a resonant cavity, the product fn × λn equals the speed of sound v (assuming the usual standing-wave relations in the cavity).
- In terms of the fundamental and the longest wavelength:
- The basic frequency is f1 and the longest wavelength is λ1 (fundamental mode).
- The speed of sound can be obtained as:v = f_1 imes oxed{ \, \, }
- A more general form for any harmonic n is: fn = n f1,\ \lambdan = rac{oxed{}}{n},
\v = fn \lambdan = f1 \lambda_1.
- The practical goal is to compute v using the extracted f1 and the corresponding longest wavelength λ1 (the fundamental or the largest wavelength observed in the spectrum). This provides an estimate for the speed of sound in air under the experimental conditions.
- Significance: demonstrates how spectral analysis of a noisy signal, followed by a robust extraction of the fundamental frequency, can yield a fundamental physical quantity (the speed of sound) through the straightforward relationship between frequency and wavelength.
Calibration, accuracy, and practical considerations
- Calibration frequencies used to set the scale help anchor the spectrum; these were around ~1400 Hz and ~1540 Hz as reference points.
- Increasing the number of averaged spectra improves the smoothness of the harmonic spectrum and the precision of frequency estimation.
- The choice of threshold and the number of samples to average affect the precision of f1; too few samples or too low a threshold reduces the reliability of peak detection.
- When refining the fit, it can be beneficial to select a linear region of the spectrum that excludes outliers and non-linear portions of the harmonic sequence.
- Practical data handling tips:
- Keep track of last run and newer runs in the data folder; each run is appended with an index (e.g., FT8, FT9).
- Use a scatter plot to visualize the linearity of the harmonic peaks and perform a regression to extract f1.
- Use the regression equation and R^2 value to assess the quality of the fit; refine by adjusting the range of peaks used for the fit.
Symmetry considerations and why only half the spectrum is used
- The Fourier transform of a real-valued time signal yields a spectrum that is symmetric about 0 Hz.
- For practical analysis, we examine only the positive-frequency half, which contains all unique information about peak locations and spacings.
Summary of key concepts and takeaways
- White noise excites a broad spectrum; resonant frequencies emerge as harmonics of the fundamental frequency f1 due to the cavity’s modes.
- The spectrum shows equidistant peaks at f_k = k f1, with k = 1, 2, 3, …; the longest wavelength corresponds to the fundamental mode.
- Averaging multiple spectra yields a smoother harmonic spectrum, improving the precision of f1 extraction.
- Peak detection relies on derivative-based methods to locate peaks in the averaged spectrum and record their frequencies (n f1).
- Plotting the detected peak frequencies and fitting a line yields f1; the speed of sound is obtained from the product of f1 with the corresponding longest wavelength λ1 (or, equivalently, v = fn λn for any harmonic n).
- Calibration references and careful thresholding improve accuracy; data is stored in an organized folder structure with sequential file naming; data analysis includes transferring peak positions to a spreadsheet for regression and validation.
Important equations (in LaTeX)
- Harmonics of the fundamental frequency:
fk = k f1, \quad k = 1,2,3,\, ext{…} - Relationship between speed, frequency, and wavelength (standing waves):
v = fn \,
ange{\lambdan} - Harmonic wavelength in terms of fundamental (for a typical cavity):
\lambdan = \frac{\lambda1}{n} - Fundamental relation for speed of sound using the fundamental and longest wavelength:
v = f1 \lambda1 - General speed of sound from any harmonic:
v = fn \lambdan = n f1 \cdot \frac{\lambda1}{n} = f1 \lambda1