Sunday 30 August 2015

Correlation between frequency and initial phase estimates using FFT


Why is there a high negative correlation between frequency estimation errors and initial phase estimation errors when measured using FFT? I have a simple code showing this negative correlation. is there a known explanation for that? here is the code


clear all;clc;close all;

%%
T = 0.2;
fs = 500;
f = 200;
ts = 1/fs;
snr = 5;
n = fs*T;
t = linspace(0,T-ts,n);
theta = 0.1;
y = exp(1i*2*pi*(f.*t + theta));

for count = 1:2000
count;
yy = awgn(y,snr,'measured');
NFFT = 2^16;
fVals = fs/NFFT.*[0:NFFT-1];
X = fft(yy,NFFT)./n;
plot(abs(X))
[~,M] = findpeaks(abs(X),'MinPeakheight',0.8);
measuredAngle = angle(X(M))/2/pi;
errfreq(count) = fVals(M) - f;

errph(count) = measuredAngle - theta;
end
cov(errfreq,errph)
corrcoef(errfreq,errph)


ans =
1.0000 -0.8506
-0.8506 1.0000


No comments:

Post a Comment

readings - Appending 内 to a company name is read ない or うち?

For example, if I say マイクロソフト内のパートナーシップは強いです, is the 内 here read as うち or ない? Answer 「内」 in the form: 「Proper Noun + 内」 is always read 「ない...