Sensor - accelerations to displacements, error

AI Thread Summary
The discussion centers on converting acceleration readings from a sensor into displacement, with the user experiencing inaccuracies in their results despite using MATLAB's cumtrapz function for integration. They have attempted various methods to improve accuracy, including centering velocity and ensuring initial conditions are correct, but still face challenges. Suggestions include exploring Simpson's rule for integration, which can handle discrete data, and testing with sinusoidal data to identify errors. The conversation highlights that small initial measurement errors can lead to significant drift in velocity and position over time. Overall, the user seeks advice on refining their approach to achieve more accurate displacement calculations.
Maria Redericki
Messages
7
Reaction score
0
Hello everybody, apologies from outset for bad English.

I wonder if anyone can give me some advice regarding my problem. I have a sesnor that gives acceleration readings. I have been working hard to turn these readings into position or displacements. I tried many method but MATLAB cumptrapz was most effective. I integrated my data twice and got position

This has been quite successful but I have recently had some test data where by I know exactly the distance traveled because I was able to measure it at the time. I now see that displacement given by cumtrap is out by a small amount. How can I improve upon accuracy. I have looked at centering my velocity aound before carrying out the second integration i have also made sure of these things such as start at point where acceleration is zero and where velocity is zero but I still have some problems. Also I find to completely do these things is tricky so I have do it with some slight error. Can you advise for me some help?
Thank you
 
Physics news on Phys.org
What ever in the world is cumtrapz?

Just guessing that it might be a routine based on trapezoidal integration, you might us a better integration algorithm such as Simpson's rule.
 
Hello Doctor, This is a algoirthm on Mathlab based upon the trapezium rule as you suggest. I think everything around simpsons rule they have on there needs function and I just have discrete data? Do you think this will solve my problem of being a little out in terms of distance it is not by much but I want to correct
 
An acceleration sensor will always give lead to some errors - a small measurement error early on leads to a constant offset in the velocity, even with an impossible perfect integration scheme.

Is the deviation between estimated and measured distance getting worse over time?
 
Maia, it is hard to say what will correct your problem when I do not know ith certainty what is wrong.

Simpson's rule works (approximately) with both discrete and continuous data.

You can make up a test case, perhaps pure sinusoidal data, to check the calcs to see where the error is coming in.
 
Well when I examine the velocity I see that I have drift and it is quadratic. This makes me think that it could be causing error in the position data but I am not sure how to rectify this.
 
Hi there, im studying nanoscience at the university in Basel. Today I looked at the topic of intertial and non-inertial reference frames and the existence of fictitious forces. I understand that you call forces real in physics if they appear in interplay. Meaning that a force is real when there is the "actio" partner to the "reactio" partner. If this condition is not satisfied the force is not real. I also understand that if you specifically look at non-inertial reference frames you can...
I have recently been really interested in the derivation of Hamiltons Principle. On my research I found that with the term ##m \cdot \frac{d}{dt} (\frac{dr}{dt} \cdot \delta r) = 0## (1) one may derivate ##\delta \int (T - V) dt = 0## (2). The derivation itself I understood quiet good, but what I don't understand is where the equation (1) came from, because in my research it was just given and not derived from anywhere. Does anybody know where (1) comes from or why from it the...
Back
Top