cepstrum — ACOUSTICS bearing op

데이터 종류: signaltable

호출: import acoustics; acoustics.cepstrum(x, rate, mode='real', floor_ratio=1e-12, min_quefrency=0.0)(또는 opsacoustics.get("cepstrum"))

사용법

로그 스펙트럼의 스펙트럼 —— 주파수 축 위의 주기 구조.

> 아래 상세 설명은 원문입니다 —— 요약과 제목은 번역되어 있습니다.

A harmonic family or a family of modulation sidebands is periodic along the

frequency axis, so it collapses to a single line along the cepstrum's

quefrency axis (in seconds). Two things this finds that a spectrum does not:

an echo at delay `tau (a rahmonic at q = tau`) and a **sideband

family** spaced `df apart (a rahmonic at q = 1/df`). The second is the

bearing case — sidebands around a gear mesh spaced at the shaft rate.

`mode`:

• `"real"irfft(log|X|)`, the standard real cepstrum. Discards phase,

so it cannot be inverted; nothing here pretends otherwise.

• `"power"irfft(log|X|**2) = 2 * real`, kept because the two

conventions differ by exactly a factor of two and mixing them silently

halves or doubles every amplitude a caller compares against a reference.

`log(0) is handled by flooring the magnitude at floor_ratio` times its

own maximum (default 1e-12, i.e. -240 dB) rather than letting `-inf` enter

the inverse transform, where it would make the entire cepstrum NaN. The

number of floored bins is returned as `floored_bins` — a large count means

the signal is band-limited and the cepstrum is dominated by the flooring, not

by the signal.

`min_quefrency` (seconds) excludes the low-quefrency region from the peak

search. This is not cosmetic. The first few bins carry the **spectral

envelope** — the overall shape of the spectrum, which is large and has

nothing to do with periodic structure — and they dominate. Measured on an AM

tone with sidebands 50 Hz apart, the five largest cepstral values sit at

0.000125, 0.00025, 0.000375, 0.000625 and 0.001 s, i.e. all of them are the

envelope, and the default peak search returns 0.000125 s rather than the

1/50 = 0.02 s a reader would expect. Excluding the envelope is the standard

practice ("liftering") and is the caller's decision, so it is an argument

with a visible default of 0.

Returns a dict: `quefrency (s), cepstrum, rate, mode`,

`floored_bins, min_quefrency, peak_quefrency, peak_amplitude`,

`peak_rate_hz (1/peak_quefrency` — the sideband spacing or repetition

rate the rahmonic corresponds to). The peak is taken over

`min_quefrency < q < n/(2*rate)`; the cepstrum is symmetric past that.

Measured ground truths:

Echo. White noise at 8 kHz plus 0.6 times itself delayed by 200

samples: `peak_quefrency = 0.025000` s, peak index exactly 200, and

`floored_bins = 0`.

A periodic family of lines. A 50 Hz impulse train convolved with a

random 64-tap FIR (so the spectrum is broadband with lines every 50 Hz):

peak at `0.020000` s = 50.00 Hz exactly, with

`min_quefrency=0.002`.

What it looks like when the fundamental is not the largest. The

`mode="impulse"` bearing signal repeats every 1/107 s, and the largest

rahmonic above 2 ms is at 0.037383 s — which is `4/107`, the *fourth*

rahmonic, not the first. A cepstrum reports a family, and reading only

its maximum gives an answer that is off by an exact integer factor and

looks entirely reasonable.

Where it stops working. An AM tone has three spectral lines and

nothing else; every other bin is floored, the log spectrum is mostly the

floor, and there is no 1/50 s rahmonic to find at all. Cepstral sideband

analysis needs a *broadband* signal — a gear mesh, not a tone.

`mode="power" is exactly twice mode="real"` (measured max difference

0.000e+00).

Raises `ValueError: everything :func:_as_signal` refuses, an unknown

`mode, floor_ratio outside (0, 1), a negative min_quefrency`, a

`min_quefrency` at or past the half-length of the record (nothing would be

left to search), an identically zero signal, and a signal shorter than 4

samples.

자세한 사용 가이드

acoustic_condition_monitoring 패밀리 가이드

참고(샘플 데이터·문헌)

• 샘플 데이터 카탈로그(DL URL / 라이선스) —— 2-D 는 skimage.data(BSD/public)+ 합성, 3-D 는 실데이터 소스(Stanford/PDS 등)의 DL URL.

• 연산자의 내력·참고문헌 —— 이 연산자 족의 바탕이 된 연구/기법의 출처.

• 알고리즘의 정전(저자·연도)과 용도는 위의 패밀리 사용 가이드에 적혀 있습니다.

실행 가능한 예제(이 연산자를 실제로 호출하는 검증된 샘플)

acoustic_condition_monitoringpy -3.11 examples/acoustic_condition_monitoring.py

타입이 이어지는 다음 연산자(table 를 입력으로 받는 것)

istft

같은 카테고리(bearing)

envelope_spectrum · bearing_defect_frequencies · spectral_kurtosis


*Provenance: acoustics.py — ACOUSTICS 연산자 레지스트리. 이 op 노트는 tools/opdocs.py md 가 자동 생성합니다(직접 편집하지 마세요).*

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