Np -k A(z) = 1 - SUM p(k) z . k=1
The power spectrum corresponding to the all-pole LPC filter is
S(w) = g^2 / |A(w)|^2 ,
where A(w) is short-hand notation for A(exp(jw)). The power spectrum is the Fourier transform of the (infinite) set of autocorrelation coefficients The cepstrum for the autocorrelation coefficients is given by the inverse Fourier transform of the log power spectrum. Equivalently the cepstral coefficients are the Fourier series coefficients of the (periodic) log power spectrum,
ln[S(w)] = 2 ln[g] - ln[|A(w)|^2]
inf = SUM c(k) exp(-jkw) . k=-inf
The cepstral coefficients are symmetric, c(-k) = c(k). For a minimum-phase A(z), the integral of ln[|A(w)|^2] is zero. The coefficient c(0) is then the average of the log power spectrum, c(0) = 2 ln[g]. In this routine, g is assumed to be unity, giving c(0) = 0. An expression for the other cepstral coefficients is obtained by expanding the ln[A(w)] in a Laurent series and taking the derivatives. This gives the recursion
1 n-1 c(n) = p(n) + - SUM (n-k) c(n-k) p(k), n=1,2,... . n k=1
This routine returns the first Ncep cepstral coefficients.
Predictor coefficients are usually expressed algebraically as vectors with 1-offset indexing. The correspondence to the 0-offset C-arrays is as follows.
p(1) <==> pc[0] predictor coefficient corresponding to lag 1 p(i) <==> pc[i-1] 1 <= i < Np