4

我在 Matlab 中使用 FFT 函数试图分析行波激光模型的输出。

该模型的时域形式为(实部、虚部),其思想是将 FFT 应用于复数输出,以获得频域中的相位和幅度信息:

%load time_domain field data
data = load('fft_data.asc');

% Calc total energy in the time domain
N = size(data,1);
dt = data(2,1) - data (1,1);
field_td = complex (data(:,4), data(:,5));


wavelength = 1550e-9;
df = 1/N/dt;
frequency = (1:N)*df;
dl = wavelength^2/3e8/N/dt;
lambda = -(1:N)*dl +wavelength + N*dl/2;

%Calc FFT
FT = fft(field_td);
FT = fftshift(FT);
counter=1;
phase=angle(FT);
amptry=abs(FT);
unwraptry=unwrap(phase);

在展开之后,将最佳拟合应用于感兴趣区域中的相位,然后从相位本身中减去,以尝试消除感兴趣区域中相位的波长依赖性。

for i=1:N % correct phase and produce new IFFT input
    bestfit(i)=1.679*(10^10)*lambda(i)-26160;
    correctedphase(i)=unwraptry(i)-bestfit(i);
    ReverseFFTinput(i)= complex(amptry(i)*cos(correctedphase(i)),amptry(i)*sin(correctedphase(i)));
end

手动执行了最佳拟合后,我现在有了如上所示的逆 FFT 输入。

pleasework=ifft(ReverseFFTinput);

我现在可以从中提取时域中的相位和幅度信息:

newphasetime=angle(pleasework);
newamplitude=abs(pleasework);

然而,虽然相位的输出与时域的输入相比有很大的不同

蓝色=反向 FFT 返回后的时域相位输出

校正数据的幅度似乎变化不大(如果有的话!),

在此处输入图像描述 在此处输入图像描述

尽管相位缩放。从物理上讲,这似乎不正确,因为我的理解是消除相位的波长依赖性应该“压缩”脉冲输入,即缩短脉冲宽度但提高峰值。

我的主要问题是我是否未能正确使用逆 FFT 或正向 FFT 或两者,或者这类似于窗口或规范化问题?

对不起,冗长的问题!并提前感谢。

4

1 回答 1

4

You're actually seeing two effects.

First the expected one goes. You're talking about "removing wavelength dependence of phase". If you did exactly that - zeroed out the phase completely - you would actually get a slightly compressed peak. What you actually do is that you add a linear function to the phase. This does not compress anything; it is a well-known transformation that is equivalent to shifting the peaks in time domain. Just a textbook property of the Fourier transform.

Then goes the unintended one. You convert the spectrum obtained with fft with fftshift for better display. Thus before using ifft to convert it back you need to apply ifftshift first. As you don't, the spectrum is effectively shifted in frequency domain. This results in your time domain phase being added a linear function of time, so the difference between the adjacent points which used to be near zero is now about pi.

于 2012-08-21T19:50:51.207 回答