IFFT of frequency dataset
조회 수: 4 (최근 30일)
이전 댓글 표시
I have software exported data in the form of real and imaginary components across a range of frequencies (not starting at 0). I used MATLAB's IFFT command on it, but the resultant A-scan doesn't match the one automatically generated by the software. I have previously used the code below when performing an FFT of A-scan data, is there a similar method (or better) for IFFT?
j = length(Tdata); NFFT = 2^nextpow2(j);
Fs = 1/(Tdata(2,1)-Tdata(1,1)); Fn = Fs/2;
FTD = fft(Tdata(:,2) - mean(Tdata(:,2)),NFFT)/j;
Fv(:,1) = linspace(0, 1, NFFT/2-1)*Fn;
Iv(:,1) = 1:numel(Fv); Y = abs(FTD(Iv))*2;
댓글 수: 0
답변 (1개)
Star Strider
2025년 2월 18일
‘(not starting at 0)’
That’s probably the problem.
Essentially your data are then a sort of rectangular-window-bandpass-filtered version of your signal. It is not possible to ‘guess’ what the missing frequencies annd associated data are (altthough filling them with zeros is an option). The ifft result is probably the best you can hope for.
You did not share your ifft code here. Note that it will be necessary for you to concatenate the complex conjugate version of your vector onto the end of the existing vector in order for ifft to have any chance of reconstruction your signal, so schematically this:
signal = ifft([fft_vector conj(fft_vector)]) % Assumes Row Vectors
Make the appropriate time vector to match ‘signal’.
.
댓글 수: 2
Star Strider
2025년 2월 18일
I was away for a few minutes.
It would be necesary to know how ‘the software’ computes the inverse Fourier transform.
Using the second argument to ifft would increase the time resolution, and may result in a better signal reconstruction (use NFFT=2^nextpow2(numel(Fscan)) as in your example, in addition to prepending with the requisite number of zeros to fill the frequencies from 0 to 9 GHz).
Also, use the symflag argument (as mentioned in the documentation) if your Fourier transform data have an even number of elements (i.e. the vector is symmetric). This prevents imaginary values from appearing in the inverted signal.
In general, inverting a less-than-complete Fourier transform (any that do not have valid data from D-C to tthe Nyquist frequency) will have problems. You may nave to guess at the Nyquist frequency if you do not know the original sampling frequency. That should be the maximum frequency of the original Fourier transform, and so tthe maximum frequency of your Fourier transform vector.
.
참고 항목
카테고리
Help Center 및 File Exchange에서 Multirate Signal Processing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!