Inverse Fourier transform from logged fft data
4 views (last 30 days)
Show older comments
Sansi Rajalingam
on 1 Mar 2020
Commented: Sansi Rajalingam
on 1 Mar 2020
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
on 1 Mar 2020
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)
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!