Frequency domain to Time domain
7 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
John Gunipe
il 4 Mag 2022
Commentato: John Gunipe
il 5 Mag 2022
Hi,
I have experimental data of a signal in terms of frequency and acceleration. I want to convert this signal as a function of time using an inverse Fourier transform (ifft). What script could I use to the ifft? Is my approach correct? or should I have to use any thing about sampling frequency in my code? (if so, please help). The frequencies evenly spaced from 0 to 1024 at an interval of 0.5 Hz?
acceleration = xlsread('data','Sheet1','B3:B2051');
frequency = xlsread('data','Sheet1','A3:A2051');
time = ifft(frequency);
abs_time = abs(time);
subplot(2,1,1), plot(frequency,acceleration)
subplot(2,1,2), plot(abs_time,rms)
Thanks. It would be a huge help, I have no knowledge of signal processing concepts.
2 Commenti
Paul
il 5 Mag 2022
Hi John,
After running the code in the qeustion, can you post the results from the following commands:
[frequency(1:5) frequency(end)]
numel(frequency)
I'm asking because the question doesn't seem to line up with plots in the Answer below.
Risposta accettata
Star Strider
il 4 Mag 2022
The acceleration data must be complex, or the data must consist of an acceleration magnitude and an acceleration phase. The highest frequency should be the Nyquist frequency, or at least the sampling frequency of the original signal must be known.
Assuming that the acceleration magnitude and phase signals both exist, the frequency spacing is regular, and the highest frequency is the Nyquist frequency, the inversion would go something like this —
First, create a complex variable from the magnitude and phase vectors if it is not already complex:
accelz = mag .* exp(1j*phase) % The 'phase' Value Is The Unwrapped Phase In Radians
and the full acceleration signal becomes:
accelz_full = [accelz flip(conj(accelz))]
The time vector is derived from the one-sided frequency vector ‘fv’ as:
tv = linspace(0, numel(accelz_full)-1, numel(accelz_full))/(2*max(fv))
Then take the ifft of ‘accelz_full’ to get the time domain signal:
accelt = ifft(accelz_full, 'symmetric')
The result of the ifft calculation should be real.
.
6 Commenti
Star Strider
il 5 Mag 2022
As always, my pleasure!
If you have the ‘rms’ data with the phase information, then the inversion is possible.
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Fourier Analysis and Filtering in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
