LPC spectra estimate |
LPC spectra estimate |
Feb 6 2009, 03:26
Post
#1
|
|
|
Group: Members Posts: 99 Joined: 2-August 07 From: Shanghai,China Member No.: 45817 |
LPC spectra should correspond with the envelope of DFT spectra.
I plot LPC spectra with matlab. The LPC spectra keep the same shape with the envelope of DFT spectra. But it is larger with a offset than the DFT envelope. Why? Where it go wrong? Here is the matlab script which illustrate it. N = 2560; [x,fs] = wavread('lpc.wav',N); % any speech signal can be used p=12; a = lpc(x,p); X =fft(x); X = X(1:N/2+1)'; X = 10*log10(abs(X).^2); Z = fft(a,N); Z = 1./Z(1:N/2+1); Z = 10*log10(abs(Z).^2); figure; plot(X'); hold on; plot(Z,'r'); grid; offset = 10; figure; plot(X+offset); hold on; plot(Z,'r'); grid; |
|
|
|
![]() |
Feb 18 2012, 23:33
Post
#2
|
|
|
Group: Members Posts: 1 Joined: 18-February 12 Member No.: 97241 |
Hello i have got a question regarding LPC theory:
e=signal_esti - signal and then we find that Signal(Z)=e/H(Z) with H(Z)=(1+ ai(z(i)+....apz(p)) The problem is that we plot the entry signal, and then we compare it to signal_estimated. so when we say: > [a,e] =lpc(x,p); > > X =fft(x); > X =X(1:N/2+1)'; > X = 10*log10(abs(X).^2); > > Z =fft(a,N); > Z1 =1./Z(1:N/2+1); > > Z = Z1.*sqrt(e*N); =A0% to use sqrt(e*N),not sqrt(e),Why? > Z = 10*log10(abs(Z).^2); when we plot Z, we plot the original signal, and not the estimated signal !!!!!!! Please i am stucked here i can't understand it well. i want to plot the estimated signal in function of error, and now from theory we are ploting the original signal. iS THERE SOMETHING WRONG WITH MY COMPREHENSION, THANKS A LOT |
|
|
|
Mar 7 2012, 10:08
Post
#3
|
|
|
Group: Members Posts: 1 Joined: 7-March 12 Member No.: 97618 |
Hello i have got a question regarding LPC theory: e=signal_esti - signal and then we find that Signal(Z)=e/H(Z) with H(Z)=(1+ ai(z(i)+....apz(p)) The problem is that we plot the entry signal, and then we compare it to signal_estimated. so when we say: > [a,e] =lpc(x,p); > > X =fft(x); > X =X(1:N/2+1)'; > X = 10*log10(abs(X).^2); > > Z =fft(a,N); > Z1 =1./Z(1:N/2+1); > > Z = Z1.*sqrt(e*N); =A0% to use sqrt(e*N),not sqrt(e),Why? > Z = 10*log10(abs(Z).^2); when we plot Z, we plot the original signal, and not the estimated signal !!!!!!! Please i am stucked here i can't understand it well. i want to plot the estimated signal in function of error, and now from theory we are ploting the original signal. iS THERE SOMETHING WRONG WITH MY COMPREHENSION, THANKS A LOT May the following explanation will help you. (perhaps with many odd expressions and grammatical errors due to my poor English) Once we get the lpc of the predication filter H(z) , we can say: 1. d[n] pass the filter H(z), results in x[n].% original signal. 2. delta[n] pass the filter H(z), results in h[n]. % impulse response. where d[n] is the predicted error. the lpc function in Matlab returns the lpc coefficients a and the prediction error variance g, [a,g] = lpc(x,p). thus. E{|d[n]|^2}=g. actually, the ensemble average is difficult to calculate, and usually replaced it by the time average. g={sum_{n=0}^{N-1}|d[n]|^2}/N. N is the length of the original signal, not the length of latter FFT. then the energy of the original signal x[n] equals gN times the energy of the impulse response h[n]. therefore, when we compare the power density of the impulse response h[n] to that of the original signal x[n] (usually use FFT analysis method, e.g. M points FFT), we should multiply the impulse response h[n] by a factor (i.e. gN for power density, while sqrt(gN) for amplitude density). the estimated signal can be calculated by the following: est_x = filter([0 -a(2:end)],1,x);%estimated signal where x is the original signal. |
|
|
|
hyeewang LPC spectra estimate Feb 6 2009, 03:26
SebastianG QUOTE (hyeewang @ Feb 6 2009, 03:26) LPC ... Feb 7 2009, 00:10
hyeewang QUOTE (SebastianG @ Feb 7 2009, 07:10) QU... Feb 7 2009, 03:26
hyeewang QUOTE (hyeewang @ Feb 7 2009, 10:26) QUOT... Feb 7 2009, 15:51
SebastianG QUOTE (hyeewang @ Feb 7 2009, 15:51) QUOT... Feb 7 2009, 16:54
hyeewang QUOTE (SebastianG @ Feb 7 2009, 23:54) QU... Feb 8 2009, 02:58
SebastianG QUOTE (hyeewang @ Feb 8 2009, 02:58) but ... Feb 10 2009, 09:44
hyeewang QUOTE (SebastianG @ Feb 10 2009, 16:44) Q... Feb 11 2009, 04:17
SebastianG QUOTE (hyeewang @ Feb 11 2009, 04:17) QUO... Feb 11 2009, 10:30
hyeewang QUOTE (SebastianG @ Feb 11 2009, 17:30) Q... Feb 11 2009, 14:25
SebastianG QUOTE (hyeewang @ Feb 11 2009, 14:25) Ind... Feb 11 2009, 17:05
hyeewang QUOTE (SebastianG @ Feb 12 2009, 00:05) Q... Feb 12 2009, 02:45
SebastianG QUOTE (hyeewang @ Feb 12 2009, 02:45) But... Feb 12 2009, 13:41
hyeewang QUOTE (SebastianG @ Feb 12 2009, 20:41) Q... Feb 18 2009, 10:17
SebastianG QUOTE (hyeewang @ Feb 18 2009, 10:17) You... Feb 18 2009, 22:44![]() ![]() |
|
Lo-Fi Version | Time is now: 19th June 2013 - 10:06 |