Inverse Fourier transform from logged fft data

5 views (last 30 days)
Hi,
I have some measured vibrational displacement spectral data (in dB), but I would like to inverse Fourier transform it in order to get the time domain signal. What I have tried so far is to use the ifft-function, however I don't seem to get the signal that I expected (a sinusoidal signal with a bit of distortion). As far as I remember the data was logged with a sampling frequency of 2048Hz, and I'm pretty sure I need to use this information when doing the ifft. However, I don't know how.
I've attached the data as a MAT-file. The first column is the frequency data and the second is the magnitude in dB.
Could someone guide me in the right direction? Thanks alot!

Accepted Answer

Thiago Henrique Gomes Lobato
You can't exactly reconstruct the time signal since you lost the phase information while transforming it to dB. The best you can do is to get the absolute value of each bin from the dB value, assign a random phase to each one and perform an ifft. If I do this in your signal I get a sine-like result, although it is just an approximation of the real measured time data.
dataLin = sqrt(10.^(data(:,2)./10)); % get amplitude
randomPhase = rand(size(dataLin))+1j*rand(size(dataLin)); % generate random phase
dataLin = ifft(dataLin.*randomPhase./abs(randomPhase),'symmetric');
Fs = 2048;
time = 0:1/Fs:1/Fs*(size(dataLin,1)-1);
figure,plot(time,dataLin)
  1 Comment
Sansi Rajalingam
Sansi Rajalingam on 1 Mar 2020
Hi Thiago, that makes lot of sense, now that you point it out. Thanks for the answer!

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!