FFT to IFFT issue with going back to time-domain
1 view (last 30 days)
Show older comments
Im trying to obtain displacements from frequency response function (I have data for acceleration and force) and with that information to obtain displacements by going back to time-domain with IFFT. I have issues with inverse Fourier transform, I know that I need some pre-conditioning regarding sizing but I couldnt find the solution. I get like mirror-image of the signal when I use ifft. I provided the code and functions for frequency response function along with data. Any help much appreciated!
Main Code:
file='accela2.txt'
data =load(file);
acc_1 = detrend(data(:,1)); %Acceleration is in g's
force_1 = (data(:,2)); %Force is in Newtons
Fs=1000; %Sampling Frequency (Hz)
%-------------Using My_FRF function to get FRF-acceleration---------------%
time=linspace(0,3,2049); %FRF function produces a vector (therefore size 2049)
[freq, HaMag] = My_FRF(acc_1,force_1,Fs); %My_FRF function - acceleration
FRFaccel=HaMag
% plot(freq,FRFaccel); xlim([0 30]); %Check on FRF graph
%--------Calculation of Radial (Force) Frequency-My_FFT function----------%
%Use Force_1 and Fs as input in My_FFT --> get force_1 frequency (f1)
%Multiply f1(omega) by 2*pi to convert to rad/s
[f1,m_wave1, psd_1] = My_FFT(force_1,Fs);
omega=transpose(f1).*(2*pi); % Hz to rad/s for force frequency
%----------------FRF-Displacements(from Acceleration FRF)----------------%
FRFdisp=FRFaccel./(-omega.^2);
FRFdisp=abs(FRFdisp);
Disp=ifft(FRFdisp);
figure(1);
plot(time,Disp);
xlabel('Time(s)')
ylabel('Displacements(m)')
0 Comments
Answers (0)
See Also
Categories
Find more on Transforms in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!