LPC spectra estimate 
LPC spectra estimate 
Feb 6 2009, 03:26
Post
#1


Group: Members Posts: 99 Joined: 2August 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: 18February 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: 7March 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}^{N1}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. 


LoFi Version  Time is now: 13th October 2015  18:58 