cepstrum

From STX Wiki
Jump to navigationJump to search

Compute the real cepstrum or the cepstrum smoothed/liftered spectrum of the logarithmic spectrum x.


Usage 1
cepstrum(x)
x
a vector containing a log. amplitude spectrum
  • note: because the fft/ifft is used for the computation, the spectrum stored in x must be computed from a signal with L=2^M</samples> (-> nrow(x)=2^M/2+1).
Result 1
The next (nearest) possible signal window length.

Usage 2
fft(x)
x
signal vector or matrix; if x is a matrix a spectrum of each column is computed
Result 2
A matrix y with ncol(x) columns and L+2 rows, where each column y[*,j] contains the complex spectrum of the column (channel) x[*,j]. The transformation length L is set to npow2(nrow(x)).

Usage 3
fft(x, n {, ytype, poffset, prange, aref})
x
signal vector or matrix; if x is a matrix a spectrum of each column is computed
n
desired length of analysis window;
  • If n < nrow(x), the analysis window length L is set to nrow(x), otherwise L is set to n.
  • If the analysis window length L is a power of 2 (L=2^M), the fft algorithm is used, otherwise the dft is used.
  • If L is greater than nrow(x), zero padding is applied to the signal.
ytype
select the type and format of the computed spectrum (default=0) -> see Result 3
poffset
offset in samples to the signal begin or the selected zero phase position (default=0)
poffset=0 -> phase[i] = atan2(im[i], re[i])
otherwise -> phase[i] = (atan2(im[i], re[i]) - 2*pi*i/L * poffset) % (2 * pi)
prange
selects the range of phase values (default=0)
prange=0 -> 0 <= phase[i] < 2*pi
otherwise -> -pi <= phase[i] < pi
aref
reference amplitude if the log. spectrum (ytype=4) is requested (default=1)
Result 3
A matrix y with ncol(x) columns, where each column y[*,j] contains the spectrum of the column (channel) x[*,j]. The type and the length of the spectra is selected by the argument ytype.
ytype description content of y[*,j] nrow(y)
0 complex spectrum in cartesian format { re0, im0, re1, im1, ... } L+2
1 complex spectrum in polar format { amp0, phase0, amp1, phase1, ... }
with: ampi=sqrt(rei2 + imi2),
phasei see poffset
L+2
2 amplitude spectrum { amp0, amp1, ... } L+1
3 power spectrum { amp02, amp12, ... } L+1
4 logarithmic amplitude spectrum { lev0, lev1, ... }
with: levi=20*log10(ampi/aref)
L+1

See also
ifft, dft, dct, cepstrum, lpc, complex arithmetic

<function list>



cepstrum

Cepstrum.

Usage:

cepstrum(x)

Function:

Computes the real cepstrum of x.

Result:

A vector containing the cepstrum coefficients.

Usage:

cepstrum(x, n)

Function:

Computes the cepstrum smoothed spectrum of x using the first n coefficients.

Result:

The cepstrum smoothed spectrum. This is the same type as x.

Usage:

cepstrum(x, o, n)

Function:

Computes the cepstrum smoothed spectrum of x using the coefficients o to o+n-1.

Result:

The cepstrum smoothed spectrum. This is the same type as x.

Notes:

x must be a log. amplitude spectrum computed with a radix-2 fft.

Navigation menu

Personal tools