Frequency domain to Time domain
6 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
John Gunipe
el 4 de Mayo de 2022
Comentada: John Gunipe
el 5 de Mayo de 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 comentarios
Paul
el 5 de Mayo de 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.
Respuesta aceptada
Star Strider
el 4 de Mayo de 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 comentarios
Star Strider
el 5 de Mayo de 2022
As always, my pleasure!
If you have the ‘rms’ data with the phase information, then the inversion is possible.
Más respuestas (0)
Ver también
Categorías
Más información sobre Fourier Analysis and Filtering en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
