Using ifft2 to transform wavenumber-frequency to space-time

  • Context: MATLAB 
  • Thread starter Thread starter chiraganand
  • Start date Start date
  • Tags Tags
    Space-time Transform
Click For Summary
SUMMARY

The discussion focuses on using the inverse Fast Fourier Transform (ifft2) to convert wavenumber-frequency data to space-time representations. Key points include the importance of data ordering before applying the inverse Fourier Transform, specifically using Matlab commands fftshift and ifftshift to manage the arrangement of wavenumbers. The conversation also addresses the transformation process for angular spectra from transducers, emphasizing that the output can be a function of both position and time. Additionally, it clarifies that the first component of the FFT represents the zero-frequency component, which should oscillate around zero for accurate results.

PREREQUISITES
  • Understanding of Fourier Transforms, specifically inverse Fast Fourier Transform (ifft2)
  • Familiarity with Matlab commands fftshift and ifftshift
  • Knowledge of wavenumber-frequency relationships in signal processing
  • Basic principles of angular spectrum analysis from transducer data
NEXT STEPS
  • Research the implementation of 2D FFT in Matlab for spatial and temporal analysis
  • Explore the mathematical foundations of wavenumber-frequency transformations
  • Learn about the implications of data ordering in Fourier analysis
  • Investigate the significance of the zero-frequency component in FFT outputs
USEFUL FOR

Researchers and engineers in signal processing, particularly those working with transducer data, Fourier analysis, and Matlab programming for spatial-temporal transformations.

chiraganand
Messages
111
Reaction score
1
TL;DR
I have matrix of data in frequency-wavenumber domain and I want to transform this data into space-time. I use ifft2 to transform the data. I want to know what does the wavenumber transform into as from the sampling frequency we get the time axis, hence what do we get from the wavenumber sampling and how to interpret this in the space domain. Hence what I am trying to ask is what is the relationship between the wavenumber domain and the geometrical location.
equation is attached
1585729541242.png
 
Physics news on Phys.org
For ##N## data points, with wavenumbers ##k_i##, ##i = -N/2, \ldots, N/2## equally spaced by ##\Delta k \equiv k_{i+1} - k_i##, then the spatial positions are
$$
x_i = 2\pi \frac{i}{N \Delta k}, \quad i = 0, \ldots, N-1
$$
Be careful with the order of data before the inverse FT: it is assumed that all ##k_i## for ##i \ge 0## are stored first, then the negative (see the Matlab commands fftshift and ifftshift).
 
DrClaude said:
For ##N## data points, with wavenumbers ##k_i##, ##i = -N/2, \ldots, N/2## equally spaced by ##\Delta k \equiv k_{i+1} - k_i##, then the spatial positions are
$$
x_i = 2\pi \frac{i}{N \Delta k}, \quad i = 0, \ldots, N-1
$$
Be careful with the order of data before the inverse FT: it is assumed that all ##k_i## for ##i \ge 0## are stored first, then the negative (see the Matlab commands fftshift and ifftshift).
Thank you for your reply! I think I understand this, though I have a question regarding this. Does i need to start from -N/2 ? I am trying to find the angular spectrum of waves from a transducer, so I have N=200 and I have found the values of kx for these N=200, but if I consider the range from -N/2 then I get negative values of x, hence if I want to know the values of a spectrum of waves from a transdcuer with its centre at x=0, how would I go about it?
Also in the screenshot I have shown the equation dependent on kx and angular frequency. So I get a matrix of values with the rowds equal to different kx values and columns equal to different frequencies. When I ifft the matrix should I do it in 2 different steps? ie wavenumber- space first and then frequency- time?
 
chiraganand said:
Thank you for your reply! I think I understand this, though I have a question regarding this. Does i need to start from -N/2 ? I am trying to find the angular spectrum of waves from a transducer, so I have N=200 and I have found the values of kx for these N=200, but if I consider the range from -N/2 then I get negative values of x, hence if I want to know the values of a spectrum of waves from a transdcuer with its centre at x=0, how would I go about it?
I don't think I can help you with that. I will just say that you should be careful and make sure that a (complex) Fourier transform is what will give you what you want here. (Note that eq. (7) has ##x## ranging from ##-\infty## to ##+\infty##.)

chiraganand said:
Also in the screenshot I have shown the equation dependent on kx and angular frequency. So I get a matrix of values with the rowds equal to different kx values and columns equal to different frequencies. When I ifft the matrix should I do it in 2 different steps? ie wavenumber- space first and then frequency- time?
You can do a 2D FFT. Each row will become a function of position while the columns a function of time. Note that in eq. (8), there is no FT from frequency to time. This would correspond to doing a 1D FFT for each row, with the columns still corresponding to the different frequencies.
 
DrClaude said:
I don't think I can help you with that. I will just say that you should be careful and make sure that a (complex) Fourier transform is what will give you what you want here. (Note that eq. (7) has ##x## ranging from ##-\infty## to ##+\infty##.)You can do a 2D FFT. Each row will become a function of position while the columns a function of time. Note that in eq. (8), there is no FT from frequency to time. This would correspond to doing a 1D FFT for each row, with the columns still corresponding to the different frequencies.
Thank you.. I understand.. I just had a doubt when you said Eq(8) there is no FT from frequency to time. What I have been doing is solving equation 8 for frequency and corresponding k values (in this case k refers to the horizontal component of the wavenumber) values are fixed for all frequencies) and then doing an ifft2 on the matrix. Is that not correct?
 
chiraganand said:
Thank you.. I understand.. I just had a doubt when you said Eq(8) there is no FT from frequency to time. What I have been doing is solving equation 8 for frequency and corresponding k values (in this case k refers to the horizontal component of the wavenumber) values are fixed for all frequencies) and then doing an ifft2 on the matrix. Is that not correct?
Depends on what you want. What you are doing will result in ##V(x,t)##, which is ok if this is what you want, but is not the same as ##V(x,f)## found in eq. (7).
 
DrClaude said:
Depends on what you want. What you are doing will result in ##V(x,t)##, which is ok if this is what you want, but is not the same as ##V(x,f)## found in eq. (7).
Thank you for your response and the time! Also I have attached another equation which gives the value of V(x,f). I was wondering if the form in which the equation is given , if Fourier transforming the integrand will give the required value? I don't think so as the exponential terms are of a different form, but I just want another opinion
1585748299715.png
 
The integral is not a Fourier transform, because of the presence of ##k_z##.
 
DrClaude said:
For ##N## data points, with wavenumbers ##k_i##, ##i = -N/2, \ldots, N/2## equally spaced by ##\Delta k \equiv k_{i+1} - k_i##, then the spatial positions are
$$
x_i = 2\pi \frac{i}{N \Delta k}, \quad i = 0, \ldots, N-1
$$
Be careful with the order of data before the inverse FT: it is assumed that all ##k_i## for ##i \ge 0## are stored first, then the negative (see the Matlab commands fftshift and ifftshift).
Just another small question, if I had to transform from local x coordinates to wavenumber domain, then would the same relationship hold?ie swapping \Delta k with \Delta x
 
  • #10
chiraganand said:
Just another small question, if I had to transform from local x coordinates to wavenumber domain, then would the same relationship hold?ie swapping \Delta k with \Delta x
Yes.
$$
\Delta k = \frac{2 \pi}{N \Delta x}
$$
 
  • Like
Likes   Reactions: chiraganand
  • #11
DrClaude said:
Yes.
$$
\Delta k = \frac{2 \pi}{N \Delta x}
$$
Awesome thank you for all your help! I owe you big time!
 
  • #12
DrClaude said:
Yes.
$$
\Delta k = \frac{2 \pi}{N \Delta x}
$$
Hi, I have another question. not related to this but to fft transforms. I have a time domain signal extracted. When I Fourier transform it using the fft function, I get an extremely high value for the 1st value in the signal. Any idea why? The sampling frequency is 50 MHz and there are 1088 samples. The frequencies should be in the form of a gaussian shape with the centre frequency around 2.25 MHz. If i remove the first sample and plot , then I get the right frequencies. Any idea why this is happening?

Thanks and Regards
1587105260658.png

1587105308186.png
 
  • #13
The first component of the FFT is the zero-frequency component. The fact that it is not 0 means that your time signal is not oscillating around 0.
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 1 ·
Replies
1
Views
6K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 13 ·
Replies
13
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 7 ·
Replies
7
Views
11K
  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 5 ·
Replies
5
Views
3K