# Cepstrum

The cepstrum (plural cepstra ) is the result of a mathematical transformation in the field of Fourier analysis and can be viewed as an analogue to the frequency spectrum . The term cepstrum was introduced in 1963 in an article by Bogert, Healy, and Tukey. The cepstrum is used to analyze periodic structures in frequency spectra. Such structures arise from echoes / reflections in the time signal, or from the occurrence of harmonic frequencies such as B. Overtones . Mathematically, the cepstrum deals with the problem of inverse convolution (deconvolution) of signals in the frequency domain.

References to the article by Bogert, Healy and Tukey are often misquoted: The terms in the title “quefrency”, “alanysis”, “cepstrum” and “saphe” were newly introduced by the authors by replacing letters in the well-known English-language terms “frequency "," Analysis "," spectrum "and" phase "have been arranged differently.

The name “Cepstrum” is the result of interchanging the first 4 letters of “Spectrum”. While the spectrum is defined as a function of the frequency, the "cepstrum" is a function of the "quefrenz" (quefrency). The Quefrenz has "time" as a unit. The Quefrenz can be interpreted as a measure of the time shift of patterns in the time domain.

The cepstrum is the result of the following order of calculation:

1. Transformation of a signal from the time domain to the frequency domain
2. Take the logarithm of the spectral amplitudes
3. Transformation into the limit area, in which the independent variable again represents a time axis

There are numerous uses for the cepstrum:

• the treatment of interference from signals caused by echoes or reflections (radar, sonar and seismological applications)
• Determination of the fundamental frequency of a speaker's voice
• Speech recognition and analysis
• Medical applications in the field of electroencephalograms (EEG) and brain waves
• Analysis of machine vibrations, especially in connection with malfunctions in gears, turbines or other rotating elements

There are numerous variants of the cepstrum. For their naming we stick to the English technical terms. The most important variants are:

• Power Cepstrum: The logarithm is the “Power Spectrum” or the car power spectrum
• Complex Cepstrum: The frequency spectrum determined by Fourier analysis is logarithmized
• Real Cepstrum: The amplitude values ​​of the frequency spectrum are taken logarithmically. The phase is not used.

However, there are other variants that are not explained in more detail below.

## Abbreviations

The following abbreviations are used to explain the cepstrum in more detail:

abbreviation Explanation
${\ displaystyle f (t)}$ Signal, as a function of time
${\ displaystyle C}$ Cepstrum
${\ displaystyle {\ mathcal {F}}}$ Fourier transformation : The abbreviation can stand for a continuous Fourier transformation as well as a discrete Fourier transformation (DFT) or a z transformation , since the z transformation can be viewed as a generalization of the Fourier transformation.
${\ displaystyle {\ mathcal {F}} ^ {- 1}}$ Inverse Fourier Transformation
${\ displaystyle \ left | {\ mathcal {F}} \ {f (t) \} \ right | ^ {2}}$ Power spectrum
${\ displaystyle \ log (x)}$ Logarithm of x: The choice of base b depends on the user. In some articles it is not specified, other articles prefer the base 10 or e. The choice of the base does not affect the basic calculation rules. But sometimes the natural logarithm with base e has advantages (see section: Complex cepstrum)
${\ displaystyle \ left | x \ right |}$ Absolute value of x: If x is a complex number , the absolute value is formed from the real part and the imaginary part, using the Pythagorean theorem.
${\ displaystyle \ phi}$ Phase angle of a complex number

## Power cepstrum

The "cepstrum" was originally defined as the power cepstrum as follows:

${\ displaystyle C_ {p} = \ left | {\ mathcal {F}} ^ {- 1} \ left \ {\ log \ left (\ left | {\ mathcal {F}} \ {f (t) \} \ right | ^ {2} \ right) \ right \} \ right | ^ {2}}$ The main applications of the Power Cepstrum are in the analysis of vibrations and noises or other oscillations. It serves as a supplementary tool for spectral analysis .

Sometimes it is also defined like this:

${\ displaystyle C_ {p} = \ left | {\ mathcal {F}} \ left \ {\ log \ left (\ left | {\ mathcal {F}} \ {f (t) \} \ right | ^ { 2} \ right) \ right \} \ right | ^ {2}}$ Because of this formula, the cepstrum is also called the “spectrum of a spectrum”. It can be shown that the two formulas actually correspond. The shape of the cepstrum is the same. The only difference is a scaling factor that can also be changed later. Some publications prefer the second formula.

Other notations are possible, since the logarithm of the power spectrum corresponds to the logarithm of the amplitude spectrum if a scaling factor of 2 is used:

${\ displaystyle \ log (| {\ mathcal {F}} | ^ {2}) = 2log (| {\ mathcal {F}} |)}$ and therefore:
${\ displaystyle C_ {p} = \ left | {\ mathcal {F}} ^ {- 1} \ left \ {2 \ log \ left (| {\ mathcal {F}} | \ right) \ right \} \ right | ^ {2}}$ , or
${\ displaystyle C_ {p} = 4 \ cdot \ left | {\ mathcal {F}} ^ {- 1} \ left \ {\ log \ left (| {\ mathcal {F}} | \ right) \ right \ } \ right | ^ {2}}$ , with which a connection to the Real Cepstrum has been established (see below).

It should also be mentioned that the formation of squares at the end of the terms of is quite controversial. Some publications say it is (mathematically) redundant and other publications just leave it out. However, due to the squaring, the tips in the cepstrum appear better in the graphical representation. ${\ displaystyle C_ {p}}$ ## Complex cepstrum

The Complex Cepstrum was introduced by Oppenheim as part of the development of his "homomorphic system theory". However, the corresponding formula is also given in other literature:

${\ displaystyle C_ {c} = {\ mathcal {F}} ^ {- 1} \ left \ {\ log ({\ mathcal {F}} \ {f (t) \}) \ right \}}$ Since it delivers complex values, it can also be represented as a product of the amount and phase , and in the following - using the logarithm - also as a sum. The further simplification is obvious when the base e is used for the logarithm: ${\ displaystyle {\ mathcal {F}}}$ ${\ displaystyle {\ mathcal {F}}}$ ${\ displaystyle \ log ({\ mathcal {F}}) = \ log ({\ mathcal {| F | \ cdot e ^ {i \ phi}}})}$ ${\ displaystyle \ log _ {e} ({\ mathcal {F}}) = \ log _ {e} ({\ mathcal {| F |}}) + \ log _ {e} (e ^ {i \ phi }) = \ log _ {e} ({\ mathcal {| F |}}) + i \ phi}$ The Complex Cepstrum can also be written as follows:

${\ displaystyle C_ {c} = {\ mathcal {F}} ^ {- 1} \ left \ {\ log _ {e} ({\ mathcal {| F |}}) + i \ phi \ right \}}$ The Complex Cepstrum contains the information about the phase position. In this case it is therefore possible to transform back from the frequency range to the frequency range:

${\ displaystyle f (t) = {\ mathcal {F}} ^ {- 1} \ left \ {b ^ {\ left ({\ mathcal {F}} \ {C_ {c} \} \ right)} \ right \}}$ , where b corresponds to the base used for the logarithmization

The main application is the modification of the signal in the frequency range (liftering) as an analog procedure for filtering (filtering) in the frequency range. One example is the reduction of echo effects by suppressing the corresponding cross limits.

## Real cepstrum

The Real Cepstrum is derived from the Complex Cepstrum by setting the phase to zero. The Real Cepstrum focuses on periodic properties that are visible in the amplitude spectrum:

${\ displaystyle C_ {r} = {\ mathcal {F}} ^ {- 1} \ left \ {\ log ({\ mathcal {| {\ mathcal {F}} \ {f (t) \} |}} ) \ right \}}$ And so the Real Cepstrum is directly related to the Power Cepstrum (see above):

${\ displaystyle C_ {p} = 4 \ cdot C_ {r} ^ {2}}$ ## literature

• KR Holland: The Use of Cepstral Analysis in the Interpretation of Loudspeaker Frequency Response Measurements . Proceedings of the Institute of Acoustics, Vol. 15, Part 7, 1993, pp. 65-71
• S. Wendt, GA Fink, and F. Kummert: Forward masking for cepstrum-based speech recognition systems . In W. Hess and K. Stöber (Eds.): Electronic Speech Signal Processing , Volume 22, Study Texts on Speech Communication, pp. 85–91, Bonn: 2001
• AV Oppenheim and RW Schafer: From Frequency to Quefrency: A History of the Cepstrum . IEEE Signal Processing Magazine, Vol. 21, Issue 5, Sept. 2004, pp. 95-106
• RB Randall, J. Hee: Cepstrum Analysis . Brüel & Kjaer Technical Review ( ) No. 3, 1981