LPC to/from Cepstral Coefficients

Convert linear prediction coefficients to cepstral coefficients or cepstral coefficients to linear prediction coefficients

Library

Estimation / Linear Prediction

dsplp

Description

The LPC to/from Cepstral Coefficients block either converts linear prediction coefficients (LPCs) to cepstral coefficients (CCs) or cepstral coefficients to linear prediction coefficients. Set the Type of conversion parameter to LPCs to cepstral coefficients or Cepstral coefficients to LPCs to select the domain into which you want to convert your coefficients. The LPC port corresponds to LPCs, and the CC port corresponds to the CCs. For more information, see Algorithm.

The block input must be a sample-based row vector, which is treated as a single channel, or a matrix, which is treated as a single channel per column.

Consider a signal x(n) as the input to an FIR analysis filter represented by LPCs. The output of this analysis filter, e(n), is known as the prediction error signal. The power of this error signal is denoted by P, the prediction error power.

When you select LPCs to cepstral coefficients from the Type of conversion list, you can specify the prediction error power in two ways. From the Specify P list, choose via input port to input the prediction error power using input port P. The input to the port must be a vector with length equal to the number of input channels. Select assume P equals 1 to set the prediction error power equal to 1 for all channels.

When you select LPCs to cepstral coefficients from the Type of conversion list, the Output size same as input size check box appears. When you select this check box, the length of the input vector of LPCs is equal to the output vector of CCs. When you do not select this check box, enter a positive scalar for the Length of output cepstral coefficients parameter.

When you select LPCs to cepstral coefficients from the Type of conversion list, you can use the If first input value is not 1 parameter to specify the behavior of the block when the first coefficient of the LPC vector is not 1. The following options are available:

  • Replace it with 1 —- Changes the first value of the coefficient vector to 1. The other coefficient values are unchanged.

  • Normalize — Divides the entire vector of coefficients by the first coefficient so that the first coefficient of the LPC vector is 1.

  • Normalize and Warn — Divides the entire vector of coefficients by the first coefficient so that the first coefficient of the LPC vector is 1. The block displays a warning message telling you that your vector of coefficients has been normalized.

  • Error — Displays an error telling you that the first coefficient of the LPC vector is not 1.

When you select Cepstral coefficients to LPCs from the Type of conversion list, the Output P check box appears on the block. Select this check box when you want to output the prediction error power from output port P.

Algorithm

The cepstral coefficients are the coefficients of the Fourier transform representation of the logarithm magnitude spectrum. Consider a sequence, x(n), having a Fourier transform X(ω). The cepstrum, cx(n), is defined by the inverse Fourier transform of Cx(ω), where Cx(ω) = logeX (ω). See the Real Cepstrum block reference page for information on computing cepstrum coefficients from time-domain signals.

LPC to CC

When in this mode, this block uses a recursion technique to convert LPCs to CCs. The LPC vector is defined by [a0a1a2...ap] and the CC vector is defined by [c0c1c2...cp...cn1]. The recursion is defined by the following equations:

c0=logeP

cm=am+1mk=1m1[(mk)akc(mk)],1mp

cm=k=1p[(mk)makc(mk)],p<m<n

CC to LPC

When in this mode, this block uses a recursion technique to convert CCs to LPCs. The CC vector is defined by [c0c1c2...cp...cn] and the LPC vector is defined by [a0a1a2...ap]. The recursion is defined by the following equations

am=cm1mk=1m1[(mk)c(mk)ak]

P=exp(C0)

where m=1,2,...,p.

Dialog Box

Type of conversion

Choose LPCs to cepstral coefficients or Cepstral coefficients to LPCs to specify the domain into which you want to convert your coefficients.

Specify P

Choose via input port to input the values of prediction error power using input port P. Select assume P equals 1 to set the prediction error power equal to 1.

Output size same as input size

When you select this check box, the length of the input vector of LPCs is equal to the output vector of CCs.

Length of output cepstral coefficients

Enter a positive scalar that is the length of each output channel of CCs.

If first input value is not 1

Select what you would like the block to do when the first coefficient of the LPC vector is not 1. You can choose Replace it with 1, Normalize, Normalize and Warn, and Error.

Output P

Select this check box to output the prediction error power for each channel from output port P.

References

Papamichalis, Panos E. Practical Approaches to Speech Coding. Englewood Cliffs, NJ: Prentice Hall, 1987.

Supported Data Types

  • Double-precision floating point

  • Single-precision floating point

See Also

Levinson-DurbinDSP System Toolbox
LPC to LSF/LSP ConversionDSP System Toolbox
LSF/LSP to LPC ConversionDSP System Toolbox
LPC to/from RCDSP System Toolbox
LPC/RC to AutocorrelationDSP System Toolbox
Real CepstrumDSP System Toolbox
Complex CepstrumDSP System Toolbox

Was this topic helpful?