我试图恢复在Matlab的简单(音频)信号的相位: 在MATLAB我做了以下内容:恢复时期从FFT
% This wave is perfectly periodic in the sample. That is,
% there are exactly 1000 periods.
swave = sin(2 * pi * (0:10000) * 441/44100);
% Find the fft
sFFT = fft(swave);
% Remove the duplicate data in the FFT
sFFT = sFFT(1:length(sFFT)/2);
% Take a look a the amplitudes from the FFT and it checks out
freqs = 44100/ 2*linspace(0,1,length(sFFT);
plot(freqs, abs(sFFT));
% Now to get the phase
plot(freqs, angle(sFFT));
这一结果使得几乎没有任何意义,我。因为这是一个正弦波(不是cos波)。我期望看到1/2 * pi = 1.57079的441hz bin值。相反,我看到从(441,-1.539)到(445,1.603)几乎不连续跳跃。为什么441距离正确的值太远?为什么445如此接近?
所有除了441赫兹的二进制位的值是一个谜给我。我还尝试了其他几种恢复相位的方法,包括展开(角度(sFFT))和atan2(图像(sFFT),真实(sFFT));这些改变了输出,但对我也没有任何意义。为什么441除了0之外的任何值(像abs(FFT)所示?)。为什么441料仓关闭但不是正确的值?
感谢您的帮助!
你试过'unwrap'吗?其校正的相位角,以产生平滑的相位图,看到http://www.mathworks.com/help/matlab/ref/unwrap.html – bla 2013-03-20 19:56:05