Conversion of acceleration to velocity and displacement

I have seen two different versions for converting acceleration to velocity and displacement and vice versa. 1- Some websites mentioned (Velocity = Acceleration/-i*w) where omega is the frequency in (radians/sec) = 2*pi*f with f in Hz. and (Disp=Acc/-w^2).
i is sqrt(-1)
2-While in some forum it is written (Velocity = Acceleration/i*w) and (Disp=Acc/w^2).
So which one is correct? I noticed that if the fourier transform of time displacement is taken, then the first sentence is correct. However, when the inverse of fourier transform for continuous time displacement is taken, then the second sentence is correct.
I appreciate if some experienced mates help me out.

5 Comments

I checked; I reckon that for using Omega Arithmetic method, I need to differentiate the inverse of transformed function. So the second sets of equations are correct. based on that, I have written a script to convert the acceleration time records to velocity and displacement and obtain their spectral densities. based on data, all of them are showing correct peaks, but i am not sure about phase information (whether I have to check or not) and units after conversion. Would you comment on it? Cheers
% code
clear;
signal = load ('d2_Sin.txt');
fs = 50; %sampling frequency Hz
ts= 1/fs; %intervals between data points/distance between data points
N = length (signal); %number of data points
tmax= (N-1)*ts;
t = 0:ts:tmax; %time-step size
bin_num = 0:N-1;
fbins = bin_num*fs/N; %shows frequencies in Hz
N_2 = ceil (N/2); %keeping only positive side
Acc = fft (signal);
Velo = zeros(size(N));
Disp = zeros(size(N));
for i=1:N
if fbins(i)>= 1 % filter the value at this frequency ~= 0
Velo(i)=Acc(i)/(2*pi*fbins(i)*sqrt(-1));%Velocity frequency domain
Disp(i)=Acc(i)/(2*pi*fbins(i))^2; %Displacement frequency domain
else
Velo(i)= 0;
Disp(i)= 0;
end
end
%%reverse Fourier Transform to switch back to time domain
Acc_time = ifft(Acc);
Velo_time = ifft(Velo);
Disp_time = ifft(Disp);
%---------[Spectral Density]---------%
Acc_psd = (Acc.* conj(Acc))/N; % power spectral density (PSD)
[Acc_welch,Fy] = pwelch(signal,N,[],N,fs); %PSD using Welch method
Velo_psd = zeros(size(N));
Disp_psd = zeros(size(N));
Velo_welch = zeros(size(Acc_welch));
Disp_welch = zeros(size(Acc_welch));
for i=1:N
if fbins(i)>= 1
Velo_psd(i)=Acc_psd(i)/(2*pi*fbins(i))^2;
Disp_psd(i)=Acc_psd(i)/(2*pi*fbins(i))^4;
else
Velo_psd(i)= 0;
Disp_psd(i)= 0;
end
end
for i=1:size(Acc_welch)
if Fy(i)>= 1
Velo_welch(i)=Acc_welch(i)/(2*pi*Fy(i))^2;
Disp_welch(i)=Acc_welch(i)/(2*pi*Fy(i))^4;
else
Velo_welch(i)= 0;
Disp_welch(i)= 0;
end
end
%Plotting output in frequency domain
figure('Name','Measurements Conversion in Hz'); subplot (3,1,1);plot(fbins(1:N_2),abs(Acc(1:N_2)),'r'); axis tight;
xlabel('Frequency (Hz)');ylabel('Acceleration (m/s^2) '); title('Acceleration,Velocity and Displacement');
subplot (3,1,2);plot(fbins(1:N_2),abs(Velo(1:N_2)),'k');axis tight;ylabel('Velocity (m/s)');
subplot (3,1,3);plot(fbins(1:N_2),abs(Disp(1:N_2)),'b'); axis tight;ylabel('Displacement (m)');
%
figure('Name','Spectral densities using Fourier Transform'); subplot (3,1,1);plot(fbins(1:N_2),10*log10 (abs((Acc_psd(1:N_2)))),'r'); axis tight;
xlabel('Frequency (Hz)');ylabel('(m/sec^2)^2/Hz'); title('PSD using Fourier Transform for Acceleration,Velocity and Displacement');
subplot (3,1,2);plot(fbins(1:N_2),10*log10 (abs((Velo_psd(1:N_2)))),'k');axis tight;ylabel('Velocity (m/sec)^2/Hz)');
subplot (3,1,3);plot(fbins(1:N_2),10*log10 (abs((Disp_psd(1:N_2)))),'b'); axis tight;ylabel('Displacement (m)^2/Hz');
end
i am in need of input given to this program to check with my own input from accelerometer.pl send to my mail id madhurijanaki13@gmail.com
The input can be anything, in this case is recorded due to impact force on a rectangular object.
@Shz713
After using the code provided by you. The velocity and displacement are obtained in complex number. How do I get both V and D in real numbers. I tried taking abs() of them. But the result didnt match when I tried to check it with the ground motion data obtained from peer berkeley website.

Sign in to comment.

Categories

Find more on Fourier Analysis and Filtering in Help Center and File Exchange

Asked:

on 21 Jan 2016

Commented:

on 16 Feb 2018

Community Treasure Hunt

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

Start Hunting!