# Format location from LPC magnitude

I am confusing when I find the lpc roots magnitude, f1=0.9313, f2=0.9308, f3=0.91 and f4=0.95 but when I look at LPC envelope the f1 is higher than f4 in term of magnitude in dB. Could anybody explain it ?

I have wrote following MATLAB code :

frame=wave((i-1)*frame_length+1:(i*frame_length));
a=lpc(frame,30);
r=roots(a);
r=r(imag(r)>0.01);           % only look for roots >0Hz up to fs/2
for k=1:length(r)
z(k) = abs(r(k));
ffreq(k)=(atan2(imag(r(k)),real(r(k)))*fs/(2*pi));% convert to Hz and sort
end
[ff,index]=sort(ffreq);
fprintf('\n Start of frame %d \n ',i);
for j=1:length(ff)
fprintf('Formant %d Frequency %.1f --- %.2f\n',j,ff(j),z(index(j)));
end
fprintf('\n End of frame %d \n ',i);


The magnitude of the roots does not give you the format gain. You need to evaluate the frequency response of the filter $H(z)=\frac{1}{A(z)}$, where $A(z)$ is the polynomial returned by the LPC function, at the point on the unit circle corresponding to the desired format frequency. Like this freqz(1,a, angle(r)) for instance.