Double integration of the acceleration signals to obtain displacment signals
306 views (last 30 days)
In order to obtain the displacement signals from the acceleration data, The following steps are used to convert the acceleration data to achieve the displacement values:
1- The acceleration signals are filtered [High pass filter]
2- The cumtrapz is applied to integrate the displacement to obtain the velocity
3- The velocity signals are filtered [High pass filter]
4- Finally, the filtered signals of velocity is integrated to get the displacement signals.
The concern is still about the correct methods and the accuracy of the results which are obtained.
Please have look at the Matlab Program as stated below; If there any comments and contribution regarding the proposed methodology please do not hesitate to shear us your experience, Thank you
%%accelerations are integrated twice to produce displacements
time = load('D:\Users\Desktop\time.txt');
acc = load('D:\Users\Desktop\data.txt');
%%Design High Pass Filter
fs = 8000; % Sampling Rate
fc = 0.1/30; % Cut off Frequency
order = 6; % 6th Order Filter
%%Filter Acceleration Signals
[b1 a1] = butter(order,fc,'high');
plot(time,accf,'r'); hold on
%%First Integration (Acceleration - Veloicty)
%%Filter Veloicty Signals
[b2 a2] = butter(order,fc,'high');
velf = filtfilt(b2,a2,velocity);
%%Second Integration (Velocity - Displacement)
Its working ıts working , Thank you so much my friend . Really saved my life today. I hope the sun may always shine upon your path.
One more thing , we usually measure disp. in mm and those calculation above give us result ,generally, in meters so this is just a reminder.
Hasan Siddiqui on 14 Jul 2016
What units does the original accelerometer data need to be in originally? I have data collected from an arduino that is a 10 bit voltage reading from 0-1023. Does it need to be converted to the range of the accelerometer in gs first (-3g to 3g)?
Aashish Sah on 19 May 2020
Edited: Aashish Sah on 19 May 2020
I have one question regarding this code. I have acceleration data in terms of g, so I multiply by 9.8 to get in terms of ms^-2. The displacement should then be in terms of m. However, when I apply the filter to my acceleration data, it normalizes the data. For example, the max and min of raw acceleration data is [10.5, 9.6] ms^-2 and after I apply the filter I get [0.68 -0.56]. It seems that filtering process normalizes the raw data between -1 and 1.
This introduces an issue for me since I wish to compare the actual displacement from different accelerometer sensors.