フィルターのクリア

Fourier transform to reciprocal space vs. time-frequency transform

8 ビュー (過去 30 日間)
L'O.G.
L'O.G. 2022 年 3 月 23 日
編集済み: Star Strider 2022 年 3 月 24 日
I have been trying to take an FFT of a function in real space to calculate an analagous quantity in "reciprocal space". My understanding is this is the same as the regular FFT from the time to frequency domain. The calculation should be:
which often in physics is taken as a radial Fourier transform, i.e.,
where ρ is the density of the fluid. Attached is what and should look like in a model system. I imagine I can just follow Eq. 1. I have the data for for that model system, so I do the following:
nfft = 2^nextpow2(length(gr));
dt = r(2) - r(1);
df = 1/dt;
Freq = (df/2)*linspace(0,1,nfft/2+1);
sk = fft(gr,nfft)/length(gr);
And then I think I should take the one-sided FFT and the amplitude following Eq. 1, so I plot the following:
plot(Freq,1+rho*2*abs(sk(1:numel(Freq))))
But I get something radically different (attached) from the known case. Note k is interchangeable with q. So I'm doing something wrong, but any ideas what?

回答 (1 件)

Star Strider
Star Strider 2022 年 3 月 23 日
There appears to be a very high D-C (constant offset) component. That is equivalent to the mean of the signal, so subtracting it before taking the Fourier transform could help.
Perhaps:
sk = fft(gr - mean(gr),nfft)/length(gr);
will be closer to what you want.
Also, using the resample functon to resample the original ‘gr’ signal to a finer (higher) sampling rate might produce a smoother plot. Strictly optional.
.
  2 件のコメント
L'O.G.
L'O.G. 2022 年 3 月 24 日
編集済み: L'O.G. 2022 年 3 月 24 日
@Star Strider I just realized in Eq. 1 they are vectors: , but not in Eq. 2. Also, I think Eq. 1 is therefore a triple integral. Is there a way to modify the code then to tackle Eq. 1?
Star Strider
Star Strider 2022 年 3 月 24 日
編集済み: Star Strider 2022 年 3 月 24 日
I’m confused.
In Eq(1), r is the variable of integration. While k can be a vector, this simply means evaluating the integral in a loop (or using the 'ArrayValued' name-value pair in integral) for various values of k.
A triple integral requires the integrand to be a function of three variables (at least as I understand), however it is only a function of r.
I need to understand what you want the integration to do. Just now, I do not.
EDIT — (24 Mar 2022 at 19:52)
I am still not certain aboout the triple integral. However the fftn function will calculate N-dimensional fast Fourier transforms if you want to take them over more than one dimension.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeSignal Processing Toolbox についてさらに検索

タグ

製品


リリース

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by