problem in comparison of Linear Predictive spectrum and FFT spectrum
7 views (last 30 days)
Show older comments
I want to create Signal FFT and LPC Estimate FFT.Seen from the picture the shape of LPC is close to the FFT,but its position is lower the FFT.Why it happens? Thank you

[y_sound fs]=wavread('c.wav'); y_length=length(y_sound); Ny1=20*fs/1000; win_h=hamming(Ny1); Ny2=1024; if y_length<(Ny1+Ny1/2) win_h=hamming(y_length); y4=y_sound; win_y=y_sound.*win_h; fft_y(1:Ny2,1)=fft(win_y,Ny2); p=120; [a120_y(1,:),g120(1)]=lpc(win_y,p); else frame_all=floor((y_length-(Ny1/2))/(Ny1/2)); y_sound=y_sound(1:(frame_all+1)*(Ny1/2)); y3=reshape(y_sound,(Ny1/2),[]); y4=[y3(:,1:frame_all);y3(:,2:(frame_all+1))]; p=120; for j=1:frame_all win_y=y4(:,j).*win_h; fft_y(1:Ny2,j)=fft(win_y,Ny2); [a120_y(j,:),g120(j)]=lpc(win_y,p); end end i=5; fma=freqz(1,a120_y(i,:)); figure; plot(0:((fs/2)/(Ny2/2-1)):(fs/2),20*log10(abs(fft_y(1:Ny2/2,i))),0:((fs/2)/(Ny2/2-1)):(fs/2),20*log10(abs(fma))+10*log10(g120(i))); grid; legend('Signal FFT','p=120 LPC'); title('Signal FFT and LPC Estimate FFT'); xlabel('Frequency in Hz'); ylabel('Magnitude in dB');
0 Comments
Answers (0)
See Also
Categories
Find more on Signal Modeling in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!