Real Cepstrum Quefrency Marks an Invented Echo Delay
2026-11-26

Real Cepstrum Quefrency Marks an Invented Echo Delay

The Real Cepstrum transforms structure in a magnitude spectrum into a different coordinate called quefrency. For a technical record containing repeated signal features, this can expose a spacing that is difficult to describe using only a list of frequency peaks. The transform does not turn a quefrency bin into a new acoustic frequency, and its magnitude-only construction cannot preserve every timing or phase detail of the original waveform.

Take the logarithm of magnitude before the inverse transform

The original gsignal real cepstrum documentation defines the calculation as an inverse Fourier transform of the logarithm of the magnitude of the Fourier transform. For a real sampled sequence x, first compute X by a chosen discrete Fourier transform, then take log of absolute X, and finally apply the compatible inverse transform.

The original python-acoustics implementation makes these stages explicit in its real_cepstrum function: a forward FFT, NumPy natural logarithm of the absolute spectrum, and the real part of an inverse FFT. The accompanying mathematical docstring writes a different logarithm base, so the present arithmetic follows the actual natural-log implementation and states that choice.

Changing to a base-ten logarithm rescales the cepstral amplitudes by the reciprocal of the natural logarithm of ten. It does not move the bins. Taking the logarithm of power rather than magnitude would instead introduce a factor of two before the inverse transform. These are amplitude conventions that should be retained with a saved result.

Realcepstrum IFFTlnabsFFT N256 impulse1at0half4 minX.5.
Original invented digital signal, not an inspection trace. Source: Zhilianhai editorial desk, original AI-assisted conceptual illustration.

An echo produces spectral ripples and cepstral spacing

Create an invented discrete sequence with value one at index zero, value one half at index four, and zero elsewhere. The later term represents only a mathematical delayed copy of an impulse. Its spectrum is one plus one half times a complex exponential with a four-sample delay.

The magnitude varies across frequency because the two terms reinforce or oppose each other depending on their relative phase. It stays strictly positive in this example: by the triangle inequality its minimum is at least one half. Thus the natural logarithm can be evaluated without introducing an arbitrary floor or handling a spectral zero.

For an ideal continuous frequency variable, expanding the log magnitude gives cosine terms at integer multiples of the four-sample delay. With echo coefficient a of magnitude below one, the cosine coefficient for repetition k is the alternating quantity a to power k divided by k. Each cosine contributes half that amount to each of the corresponding positive and negative quefrency positions.

A finite calculation keeps its circular indexing visible

Use a 256-point forward and inverse transform of the invented sequence. Direct computation gives a real cepstral value approximately 0.25 at index four, negative 0.0625 at index eight, and 0.0208333 at index twelve. These agree with the first three expansion terms a divided by two, negative a squared divided by four, and a cubed divided by six for a equal to one half.

The finite transform also has corresponding values at indices 252, 248 and 244. On this circular coordinate those indices represent negative four, negative eight and negative twelve samples. They should not be treated as additional independent physical echoes merely because an array viewer lists only nonnegative indices.

For a declared sample rate of one thousand samples per second, index four corresponds to a quefrency of four milliseconds. It is not four hertz, nor does the number 250 hertz alone describe the cepstral amplitude. The original four-sample time separation remains the reference for this constructed comparison.

c4.25 c8minus.0625 c12.0208333 mirrors252248244 negativeindices fs1000delay4ms.
Original finite FFT arithmetic and indexing. Source: Zhilianhai editorial desk, original AI-assisted conceptual illustration.

Magnitude-only analysis cannot recover every original record

Circularly shifting the entire invented sequence by one sample changes its Fourier phase while preserving its magnitude. Consequently its real cepstrum is unchanged. This independent check demonstrates a limitation directly: the real cepstrum can preserve an internal echo spacing without identifying the absolute start time of the signal.

A complex cepstrum requires additional phase conventions and unwrapping information, so its inverse is a different procedure. A real cepstrum alone is not a general lossless waveform encoding. Likewise, a cepstral peak in measured data does not automatically identify a particular mechanical surface or component; windowing, multiple paths and the signal source can affect the pattern.

If real spectra contain zeros or values near a numerical noise floor, logarithm treatment becomes part of the analysis. Adding a floor changes the result and must be documented. The constructed example deliberately avoids this problem and makes no claim about a physical recording.

Keep sample rate, transform length, logarithm convention and signed circular-bin interpretation with the result. Related explanations appear in measurement signal principles and industrial data notes. Both original figures show synthetic sequence arithmetic, rather than an inspection, a medical recording or a deployed diagnostic system.

18028484626 CONTACT US

公司:智联海(惠州)科技有限公司

地址:惠州仲恺高新区陈江街道白云山工业大道 5 号六楼 601

Q Q:18028484626

Copyright © 2002-2026

粤xxx

咨询 在线留言 电话:18028484626
微信 微信扫码添加我