Spectra and frequency responses
Select a real signal and a valid sample rate. Spectral methods return frequency_hz in Hz, with values up to the Nyquist frequency, half the sample rate. At 256 Hz the exercise axis reaches 128 Hz. For paired methods, select the excitation as Primary measured signal and the response as Paired signal (only when required).
Welch window length and Window overlap fraction
Both settings appear for spectral.welch, spectral.asd, spectral.coherence, spectral.frf_h1, and spectral.frf_h2. Welch window length is the integer number of samples per segment, from 8 up to the total number of complete rows. The default is 256. Each segment uses a Hamming window. A longer window separates closer frequencies but leaves fewer segments to average. A shorter window provides more averages at lower frequency resolution.
Window overlap fraction ranges from 0 to 0.95 inclusive, with a default of 0.5. Set it to 0.5 for 50% overlap. The number of overlapping samples is the integer part of window length × fraction. The spacing between segment starts is the window length minus that overlap. With a length of 256 and an overlap of 0.5, the step is 128 samples. Increasing overlap can provide more segments but makes the averages less independent. Reset next to each field restores its default.
The viewer chooses the smallest power of two at least as large as both 256 and the window length. Bin spacing equals the sample rate divided by the FFT length. Zero-padding makes the displayed bins denser. The ability to resolve two tones still depends on the data and window. A tail shorter than one complete segment may be left out of the average. Check used_sample_count and window_count as well as full_input_rows.
spectral.periodogram — periodogram
Choose spectral.periodogram and a primary variable, then select Analyze. The method applies one Hamming window across the full acquisition. It does not subtract the mean and has no configurable Welch windows. The FFT length is the smallest power of two greater than or equal to max(256, row count). Use this method to locate frequency components in a single complete acquisition. The example tone has 513 binss and peaks at 32 Hz.
The table contains frequency_hz, psd_real and psd_imaginary. The PSD is power per frequency unit, with theoretical unit U²/Hz for a signal measured in U. The imaginary part is zero for self-spectrum. The version of the viewer leaves empty the derived units, which does not imply a dimensionless quantity. A DC offset tends to concentrate power near 0 Hz.
spectral.welch — power spectral density
Choose spectral.welch, set the window length and overlap, and select Analyze. The method subtracts the overall mean of the portion used and averages segment periodograms. Averaging stabilizes the estimate for stationary processes and can reduce the visibility of a short event. It returns the same three columns as the periodogram, with the same unit qualifications.
With 1,024 samples, a 256-sample window, and 0.5 overlap, the report shows 7 windows, 129 bins spaced 1 Hz apart, and a peak at 32 Hz. In the exercise data, that bin is approximately 0.366 for Welch and 1.467 for the periodogram. The window, step, and averaging affect bin height. To estimate power in a band, integrate the density across the band, accounting for bin width and spectral spreading due to the window.
spectral.asd — amplitude spectral density
Set the same Welch fields and start spectral.asd. The asd column is the square root of the PSD. The theoretical dimension is U/√Hz. The column of the unit remains empty when the viewer publishes the table. With the same settings the peak is at 32 Hz, with value about 0.605, the square root of 0.366. To integrate power, first recover the PSD by squaring the ASD.
spectral.coherence — magnitude-squared coherence
Select two distinct aligned channels, then set the window and overlap. Coherence is |Syx|²/(Sxx Syy), where Syx is the cross-spectrum Y·X* and Sxx and Syy are the autospectra. value_real is dimensionless and ranges from 0 to 1 within numerical precision. Focus on frequencies with sufficient energy and several useful segments. A single segment can give coherence of 1 even when the relationship is not repeatable. High coherence measures linear association in frequency and does not establish causality.
For drive and response = 2 × drive, coherence is approximately 1 in the exercise data. If a zero denominator makes the result undefined, the series containing nonfinite values is not returned as a table.
spectral.frf_h1 — H1 frequency response
Select the input as Primary and the output as Paired. Choose spectral.frf_h1 and set the window and overlap. H1 estimates the transfer as Syx/Sxx and is suitable when uncorrelated additive output noise dominates. Check excitation and coherence, especially where Sxx is small. Verify channel orientation against a known reference. Here drive → response gives approximately 2 + 0i.
spectral.frf_h2 — H2 frequency response
Keep the same channel order when comparing with H1. H2 estimates Syy/Syx*, using the conjugate of the cross-spectrum. It is the alternative when uncorrelated additive input noise dominates. Where the cross-spectrum is weak, the denominator can make H2 unstable. The exercise data have no independent noise and still give approximately 2 + 0i. If H1 and H2 differ, examine the noise assumptions, energy, and coherence.
Interpret the complex FRF
Both FRFs return frequency_hz, value_real, and value_imaginary. The real part is the in-phase component of the complex representation. The imaginary part is the quadrature component. Calculate magnitude as √(Re² + Im²) and phase as atan2(Im, Re). A negative real part can indicate phase near π even if the imaginary part is near zero. The theoretical unit is output unit divided by input unit. The viewer leaves the derived unit blank. The automatic plot shows frequency and the real part. The imaginary part remains in the table.