How to calculate displacement from acceleration data?

26 次查看(过去 30 天)
I have field vibration (acceleration) data that was collected at a sample frequency of 5k Hz. I would like to get instantaneous displacement for each acceration sample. I understand that in physics you would typically define your kinematic equation for acceleration, take the double integral, and input your time = t for when you are trying to calculate your instantaneous displacement.
Since I have messy field data that is a collection of various spectral energy, I can't fit a nice equation to my time history waveform. What is the best way to accomplish my above goal using MATLAB functions?
Please forgive me for forgetting much of my Algebra and Calculus knowledge...
  2 个评论
Daniel M
Daniel M 2019-10-9
What does the data look like after you integrate it twice?
AdamG2013468
AdamG2013468 2019-10-9
Well, part of my reason for asking the question was because I was't sure which functions to use. The standard "integral" function requires that you define the function you would like to be integration and I am unable to mathematically define a function from my field data (curve fitting doesn't appear to be an option).
I was able to use the trapz function to integrate (twice) across several samples (e.g. Data(1:5:end, or across 5 samples) and the value appeared to be what I would expect for displacement. I thought there was a way to get instantaneous displacement without curvefitting your acceleration function and taking an indefinite integral, but I have convinced myself otherwise.

请先登录,再进行评论。

采纳的回答

John D'Errico
John D'Errico 2019-10-9
You already know how to use trapz. Just use it twice. However, you mention instantaneous displacement, and the problem with trapz is it gives you an integral over the entire range.
So if you look at the help for trapz, you will see at the bottom, the name cumtrapz.
Cumtrapz gives you the integral cumulatively up to that point. I think this is what you are looking to find. Again, just use cumtrapz twice. The first call gives you velocity. The second call is dosplacement.
In general, if you don't know how to do something in MATLAB, then use tools like help, doc, lookfor. Check the links at the bottom of the help, as they may point you to something good. For example, if you tried this:
lookfor integration
then it would have mentioned cumtrapz as a possible utility of interest.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Numerical Integration and Differentiation 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by