Cepstrum Analysis

GX-TXT DEV112 P011-bis

Compute the cepstrum of a signal and interpret the position of the peaks on the quefrency axis.

GX-TXT P011-bis · module 1.1.1. Cepstrum Analysis estimates periodicity by computing the real cepstrum of a uniformly sampled trace. The report distinguishes the quefrency axis, expressed in seconds, from its interpretation as an equivalent frequency.

Prepare the time series

From Session → New Session → Generate Session choose the Generator cepstrum_analysis and create a Standalone Session. Enable cepstrum.source in Datasets. Check in Preview and Metadata the time in s, harmonic_series_V in V and the uniform grid of 4,096 samples at 4,096 Hz.

Cepstrum Analysis Generator in the guided Session creation.
Cepstrum Analysis Generator in the guided Session creation.

Values in the Analysis tab

In Configuration → Modules → Analysis & Services search for Cepstrum Analysis, check Health and press Enable module. In Analysis select Run / recalculate now. In Dataset sources choose cepstrum.source as primary. + Add source adds aliases and Remove releases a source. Bind Independent time coordinate to primary.time_s and Signal variable / channel to primary.harmonic_series_V. With auto the engine uses role and metadata to identify the variables.

Analysis window
rectangular assigns a uniform weight. hann tapers the edges. hamming applies the window of the same name with reduced-weight edges. blackman_harris reduces the side lobes further with a wider main lobe. flat_top favors the spectral amplitude rendering at the expense of close resolution. The window acts before the logarithm.
Pre-transform detrend
none keeps the trend, mean subtracts the mean, linear removes a linear trend.
Log-magnitude floor relative to peak [dB]
Limits the minimum magnitude before the logarithm. The initial value of −240 dB is relative to the peak of the spectrum. Less negative values clip the very small components earlier.
Minimum / Maximum fundamental search frequency [Hz]
Bound the search for the maximum at positive quefrency through the inverses of the limits. 80–200 Hz corresponds to 5–12.5 ms. The variant uses 100–200 Hz. A different interval can select a multiple of the period.
Cepstrum result Dataset ID
Initially cepstrum.result. Change it before a new run if you want to keep several tables in the same Session.
Configuration with Hann, linear detrend and search between 100 and 200 Hz.
Configuration with Hann, linear detrend and search between 100 and 200 Hz.

Read the periodicity and the cepstrum

Open Run, update the plan and start the selective computation. In Results the file cepstrum_report.txt distinguishes window, grid, interval, quefrency and equivalent frequency. The test rectangular with mean detected 0.0078125 s, i.e. 128 Hz. With hann and linear the maximum is at about 0.00780973 s.

Enable cepstrum.result in Datasets. Open Canonical table for the pair quefrency in seconds and real_cepstrum. Metadata and Technical details document the source. The 4,096-sample case published 2,049 rows.

Results of the computation with rectangular window and mean detrend.
Results of the computation with rectangular window and mean detrend.

Examine the curve

In Plots select 01_real_cepstrum or a persistent variant Plot p…. Read the peak of interest within the reported search interval. Select a persistent row Plot p… of type plot.dataset. From Presentation → Title and labels… you can rename the plot, save and regenerate with Render → Rerender. Graph → Open PNG 1:1 opens the plot at the original resolution.

Plots list with the real cepstrum and its variants in the Session.
Plots list with the real cepstrum and its variants in the Session.
Plot displayed at native resolution with the title Cepstrum reale del segnale a 128 Hz.
Plot displayed at native resolution with the title Cepstrum reale del segnale a 128 Hz.