# lpc coefficients

Started by May 17, 2001
 Hi, is anybody familiar with LPC analysis? I tried to write a code that computes the LPC coefficients of a given signal sequence using 'autocorrelation method' and 'Durbin's recusion algorithm' to solve for the coefficients. It seems to computes correctly according to the equation: [R(i,j)]. [a] = [R(i)] ; i = 1,2,...,p The result that I got agrees with matrix inversion method, that is: [a] = inv([R(i,j)]).[R(i)] , but when I compare my result with the result when using 'LPC' function in MATLAB, they are different. Anybody has any idea why direct implementation of autocorrelation followed by Durbin's recursion doesn't give the correct result? Thanks in advance Henry. _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com
 Never mind my earlier posting, I've figured out what's wrong with my program. Henry >From: "Henry Wijaya" <> >To: >Subject: [matlab] lpc coefficients >Date: Thu, 17 May 2001 19:34:46 > > Hi, is anybody familiar with LPC analysis? I tried to write a code that >computes the LPC coefficients of a given signal sequence using >'autocorrelation method' and 'Durbin's recusion algorithm' to solve for the >coefficients. It seems to computes correctly according to the equation: > [R(i,j)]. [a] = [R(i)] ; i = 1,2,...,p > > The result that I got agrees with matrix inversion method, that is: > > [a] = inv([R(i,j)]).[R(i)] > >, but when I compare my result with the result when using 'LPC' function in >MATLAB, they are different. >Anybody has any idea why direct implementation of autocorrelation followed >by Durbin's recursion doesn't give the correct result? >Thanks in advance > >Henry. >_________________________________________________________________ >Get your FREE download of MSN Explorer at http://explorer.msn.com _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com
 Henry- Is it possible that the MATLAB built-in LPC function returns analysis coefficients while you are calculating synthesis coefficients? Or vice versa? There is often naming convention confusion between coefficient types that are related; e.g. analysis, reflection, etc. Jeff Brower DSP sw/hw engineer Signalogic On Thu, 17 May 2001, "Henry Wijaya" <> wrote: > Hi, is anybody familiar with LPC analysis? I tried to write a code that >computes the LPC coefficients of a given signal sequence using >'autocorrelation method' and 'Durbin's recusion algorithm' to solve for the >coefficients. It seems to computes correctly according to the equation: > [R(i,j)]. [a] = [R(i)] ; i = 1,2,...,p > > The result that I got agrees with matrix inversion method, that is: > > [a] = inv([R(i,j)]).[R(i)] > >, but when I compare my result with the result when using 'LPC' function in >MATLAB, they are different. >Anybody has any idea why direct implementation of autocorrelation followed >by Durbin's recursion doesn't give the correct result? >Thanks in advance > >Henry.
 To solve for the linear prediction coefficients , a(i), i=1:p, you need to solve the Yule-Walker equation R*a=x, where R=[r(0), r(1), ... , r(p-1); r(-1), r(0), ...., r(p-2); ................................ r(1-p), r(2-p), ...., r(0)]; and x(i)=r(-i), i=1:p; with r(k) the autocorrelation at lag k. Once you have r, (using xcorr for example), form R and x, and solve either by inverting R directly or using Levinson-Durbin. I think the matlab LPC function returns the prediction error filter coefficients, b, which are related to the linear prediction coefficients via b=[1,-a(1),-a(2),.....a(p)].'. You might expect to get slightly different answers depending on how the autocorrelation sequence is calculated. Hope this helps. Henry Wijaya wrote: > Hi, is anybody familiar with LPC analysis? I tried to write a code that > computes the LPC coefficients of a given signal sequence using > 'autocorrelation method' and 'Durbin's recusion algorithm' to solve for the > coefficients. It seems to computes correctly according to the equation: > [R(i,j)]. [a] = [R(i)] ; i = 1,2,...,p > > The result that I got agrees with matrix inversion method, that is: > > [a] = inv([R(i,j)]).[R(i)] > > , but when I compare my result with the result when using 'LPC' function in > MATLAB, they are different. > Anybody has any idea why direct implementation of autocorrelation followed > by Durbin's recursion doesn't give the correct result? > Thanks in advance > > Henry. -- Dr. Steve Hayward MIMA, C.Math Signal Processing Group, Room E511, DERA Malvern, St. Andrews Road, Malvern, Worcs., WR14 3PS, UK. tel: +44 (0) 1684 894532 fax: +44 (0) 1684 896502 email: The views expressed herein are entirely those of the writer, and do not represent the views, policy or understanding of any other person or official body. The Information contained in this E-Mail and any subsequent correspondence is private and is intended solely for the intended recipient(s). For those other than the intended recipient any disclosure, copying, distribution, or any action taken or omitted to be taken in reliance on such information is prohibited and may be unlawful.