envelope_spectrum — ACOUSTICS bearing op

• 数据种类:signal → table

• 调用: import fullseye as fs; fs.ledger.envelope_spectrum(x, rate, low, high, order=4, n_peaks=5)(要直接调用实现,import acoustics; acoustics.envelope_spectrum(x, rate, low, high, order=4, n_peaks=5);从台账取用则 opsacoustics.get("envelope_spectrum"))

用法

带通 → 解调 → 变换。轴承缺陷真正显现的地方。

> 以下的详细说明为原文 —— 摘要与标题已翻译。

The three steps are each already available (dsp.bandpass, dsp.envelope, numpy.fft); what is not available anywhere in dsp is the *composition*, and the composition is the diagnostic. The raw spectrum of a defective bearing shows a resonance at some kHz and nothing at the defect rate; the envelope of that resonance band, transformed, shows the defect rate as a clean line.

low / high are the demodulation band in Hz and are required, not optional. Choosing the band is the analysis; a default would hide the one decision that has to be made. spectral_kurtosis finds a candidate band when there is no prior knowledge of the resonance.

The envelope's mean is removed before the transform (otherwise a large DC line dominates every plot), amplitudes are single-sided (2/N), and DC is excluded from peak picking.

Returns a dict: freqs, magnitude, peak_freq, peak_amplitude, peak_freqs / peak_amplitudes (the n_peaks largest, descending), band, envelope_mean, resolution_hz, plus two numbers that exist because this operator always returns a peak frequency, including when there is nothing there:

peak_prominence

the peak divided by the median of the whole magnitude spectrum.

Band-width dependent, and it inverts in a narrow band — see

local_prominence below and the table in _local_prominence.

local_prominence / local_noise_floor

the peak divided by the median of its own neighbourhood (±50 Hz,

excluding ±5 Hz of the peak itself), and that median. Use this one to

decide whether a peak is real: measured over both a 2000-4000 Hz and a

2900-3100 Hz demodulation band, pure noise and a constant signal stay

at 2.2-3.3 while a real 107 Hz defect reaches 1558 (wide) and 33.9

(narrow). peak_prominence puts pure noise at 11375 in the

narrow band, above the real defect's 9434 — the ordering is reversed,

which is why the number below the table in this docstring ("white

noise 365") only holds at that one band width.

band_fraction

the RMS of the band-passed signal divided by the RMS of the input — how

much of the record actually lives in the demodulation band.

Found by adversarial audit and not repaired by an exception, because there is nothing invalid to refuse: a constant signal band-passed over 100-2000 Hz has an envelope made of rounding error, and this operator dutifully reported peak_freq = 8.0000 Hz. Nothing raised, nothing was NaN, and 8 Hz is a perfectly plausible number to write down. Measured, the four cases separate on the returned numbers rather than on any invented

threshold:

================ ======== ========= =========== =============

input peak Hz peak amp prominence band_fraction

================ ======== ========= =========== =============

AM, defect 107 107.0000 4.997e-01 10018.6 9.999e-01

impulse + noise 107.0000 1.968e-01 9384.7 9.201e-01

white noise 128.0000 2.785e-02 365.2 3.745e-01

constant signal 8.0000 1.691e-12 173.0 1.995e-12

================ ======== ========= =========== =============

No cut-off is imposed here: a defect that is genuinely 20 dB into the noise is a real finding and refusing it would be worse than reporting it. The numbers are returned so the caller can see the difference between row 1 and row 4, which peak_freq alone does not show.

Measured on synthesize_bearing_signal (25600 Hz, 1 s, 3 kHz carrier, 107 Hz defect, m = 0.5) demodulated over 2000-4000 Hz: peak_freq = 107.000000 Hz, peak_amplitude = 0.499677 — the modulation depth itself, because the analytic envelope of that signal is exactly 1 + 0.5 cos(2 pi 107 t). The ordinary spectrum of the same signal has a one-sided amplitude of 4.291662e-16 at 107 Hz: the defect rate is not present as a frequency component at all, which is the entire point of the operator.

That number needs a scaling step that used to be missing from this sentence. dsp.spectrum returns the raw |rfft|, not an amplitude — the raw value in that bin is 5.493328e-12, and the one-sided amplitude above is mag * (2.0 / len(x)), here 2/25600 = 7.8125e-05. This operator and order_spectrum apply that 2/N *internally* and so return amplitudes directly (carrier 3000 Hz: raw 12800, amplitude 1.000000; sidebands 2893 / 3107 Hz: raw 3200, amplitude 0.250000 = m/2). The two conventions coexist in the library, so do not apply 2/N twice when comparing a dsp spectrum against one of these.

Raises ValueError: everything _as_signal and dsp.bandpass refuse (non-finite, complex, masked, non-1-D, a band edge outside (0, rate/2), a signal too short for zero-phase filtering), plus a non-positive n_peaks.

详细使用指南

• acoustic_condition_monitoring 族使用指南

参考(示例数据、文献)

• 示例数据目录(下载 URL / 许可证) —— 2-D 用 skimage.data(BSD/公有领域)加合成图,3-D 给出真实数据源(Stanford/PDS 等)的下载 URL。

• 算子来历与参考文献 —— 该算子族所依据的研究/方法出处。

• 算法的正典(作者、年份)与用途见上面的族使用指南。

可运行的示例(实际调用该算子并已验证的样例)

• acoustic_condition_monitoring — py -3.11 examples/acoustic_condition_monitoring.py

• poc_bearing_diagnosis — py -3.11 examples/poc_bearing_diagnosis.py

类型可衔接的下一个算子(可接受 table 作为输入)

istft

同类别(bearing)

bearing_defect_frequencies · spectral_kurtosis · cepstrum


*Provenance: acoustics.py — ACOUSTICS 算子登记表。本条目由 tools/opdocs.py md 自动生成(请勿手工编辑)。*

© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.