How to get spatial frequency from FFT?

조회 수: 103 (최근 30일)
Sohel Rana
Sohel Rana 2020년 11월 25일
댓글: Star Strider 2020년 11월 26일
Hi,
I have got the first graph based on the following code. How can I get the second graph after performing FFT?
I1=0.7;
I2=0.5;
I3=0.3;
L1=200;
L2=170;
n1=1;
n2=1.444;
lam=(1.52:0.0001:1.56);
Q12=(4*pi*n1*L1)./lam;
Q23=(4*pi*n2*L2)./lam;
Q13=Q12+Q23;
I=I1+I2+I3+2*sqrt(I1*I2).*cos(Q12)+2*sqrt(I2*I3).*cos(Q23)+2*sqrt(I1*I3).*cos(Q13);
plot(lam*1000,I)

채택된 답변

Star Strider
Star Strider 2020년 11월 25일
The Fourier transform neither knows nor cares whether the units of the independent variable are time, space, or anything else. It will do whatever you ask it to do (within limits, of course)
Try this:
I1=0.7;
I2=0.5;
I3=0.3;
L1=200;
L2=170;
n1=1;
n2=1.444;
lam=(1.52:0.0001:1.56);
Q12=(4*pi*n1*L1)./lam;
Q23=(4*pi*n2*L2)./lam;
Q13=Q12+Q23;
I=I1+I2+I3+2*sqrt(I1*I2).*cos(Q12)+2*sqrt(I2*I3).*cos(Q23)+2*sqrt(I1*I3).*cos(Q13);
figure
plot(lam*1000,I)
L = numel(lam);
Ts = mean(diff(lam));
Fs = 1/Ts;
Fn = Fs/2;
FTI = fft(I)/L;
Fv = linspace(0, 1, fix(L/2)+1)*Fn * 1E-3;
Iv = 1:numel (Fv);
[pks,locs] = findpeaks(abs(FTI(Iv)));
figure
plot(Fv, abs(FTI(Iv)))
xlim([0 0.5])
xlabel('Spatial Frequency (nm^{-1})')
ylabel('Amplitude')
text(Fv(locs), abs(FTI(locs)), sprintfc('Peak %d',(1:numel(locs))), 'HorizontalAlignment','center', 'VerticalAlignment','bottom')
producing:
.
  댓글 수: 9
Sohel Rana
Sohel Rana 2020년 11월 26일
Thank you very much for your detailed explanations. Actually, I wanted to the following third (center frequency corresponds to the first peak ) and fourth graphs (center frequency corresponds to the second peak )) from the first and second graphs. The x-axis would be wavelength (in my code it is lam). The first two graphs we have already got from the code and I need to seperate the last two graphs using the first two graphs since they have different center frequency.
Star Strider
Star Strider 2020년 11월 26일
As always, my pleasure!
You need to choose the passband frequencies from the centre frequency and the desirecd passband limits.
I am not certain what you are doing, so I must leave the details to you.
Remember the 1E-3 scaling factor in the ‘Fv’ vector in choosing the passbands with respect to your computed signals. It may be necessary to correct for that in the filter design.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Spectral Measurements에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by