How Do You Calculate Vertical Displacement from Experimental Data with Noise?

  • Context: Undergrad 
  • Thread starter Thread starter Pasquale
  • Start date Start date
  • Tags Tags
    Displacement Vertical
Click For Summary

Discussion Overview

The discussion revolves around calculating vertical displacement from experimental data collected by an accelerometer in a vehicle. Participants explore methods to process noisy data, integrate acceleration to obtain displacement, and account for orientation errors. The scope includes theoretical and practical aspects of data analysis in experimental physics.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • One participant describes their approach to simulating experimental data, using acceleration components and orientation to calculate vertical displacement.
  • Another participant corrects a formula used for calculating vertical displacement, suggesting that the proper expression involves integrating acceleration to get velocity and then integrating velocity to get displacement.
  • A participant expresses confusion about the results obtained, questioning whether the calculated vertical displacement accurately reflects the vehicle's elevation profile.
  • Concerns are raised about the accuracy of accelerometer readings, particularly regarding offsets and noise that could affect displacement calculations.
  • Suggestions are made to correct for orientation errors by averaging accelerometer readings when the vehicle is stationary.
  • Another participant proposes a method to force endpoints of the displacement calculation to match, thereby removing accumulated error.
  • Some participants discuss the potential application of filtering techniques, such as Kalman filters, to reduce noise in the data before processing it for displacement calculations.
  • There is mention of alternative methods, such as Fast Fourier Transformation (FFT), to improve the results.

Areas of Agreement / Disagreement

Participants do not reach a consensus on the best method for calculating vertical displacement. Multiple competing views and approaches are presented, particularly regarding the handling of noise and orientation errors in the data.

Contextual Notes

Limitations include potential errors in accelerometer readings due to noise and orientation, as well as unresolved mathematical steps in the integration process. The discussion reflects varying assumptions about the accuracy of the data and the effectiveness of different computational methods.

Who May Find This Useful

Readers interested in experimental data analysis, particularly in the context of physics and engineering, may find this discussion relevant. It may also benefit those working with accelerometer data and seeking methods to improve accuracy in displacement calculations.

Pasquale
Messages
6
Reaction score
0
I'm doing a program for the simulation of some experimental data.
The data is recorded by a device and that the register are the:
- acceleration components along the (x, y, z),
- time (starting from 0, and change of each recording Delta t),
- orientation (azimuth, roll, pitch).

My goal is to be able to extrapolate a graph (elevation, time), the data is recorded by a device inside a passenger compartment, with the y-axis pointing upwards.
I read a lot about projectile motion, I think it's what I have to simulate substantially.
So for the calculation of the elevation, I would have thought to apply this formula:
vy = V_{iy} t + 1/2} a_y t^2
I thought to derive the speed through the Euler method, since dispose of acceleration and time data.
From this speed I should now extrapolate the vertical and horizontal speed, and if I understand correctly, the formula should be:
V_iy =V_i * sin (Φ)
the problem for me is to calculate precisely the angle Φ.
There is a way to calculate this angle?
 
Physics news on Phys.org
Hello Pasquale, :welcome:

Since your device also registers the acceleration in the x direction: you can analogously integrate to get the speed in the x-direction. Your azimuthal direction (if that is really what you mean with ##\phi##) has tangent ##v_y/v_x##.

Note: the ##v_y = V_{iy} t + {1/2} a_y t^2## is utterly wrong. Check the dimensions! The proper expression is ##y(t) = y_i + V_{iy} t + 1/2 a_y t^2##.
For the velocity you have ##v_y(t) = v_{i,y} + a_y t## etc.
 
  • Like
Likes   Reactions: Pasquale
Thanks for the answer, but I could not even get the desired result, I try to explain better my problem.
I register with a smartphone inside a vehicle, the data of the accelerometer, orientation and time.

From the vertical acceleration signal like in the image:
http://imgur.com/P0wf6pv

They should be able to pull out a chart (elevation, time), that Approximately give me a profile of the road pavement.

Because I need to figure this elevation for each point where making a recording so any deltaT ##(tn-to) / N##
My problem appears to be to understand the angle of elevation of the car compared to the asphalt in the presence of irregularities.
What I did for iteratively repeating the calculation process, was from an initial speed condition and displacement of 0.
##v0 = 0##.
##s0 = 0##.
And I calculated the deltaT, of the recording interval:

##deltaT = time (1) - time (0)##.

These since my disposal of accelerometers data I tried to calculate the speed and displacement for each point (t + 1):
##v(t + 1) = v (t) + ay(t) * deltaT##;
##s(t + 1) = s(t) + v(t) * deltaT + 0.5 * ay(t) * deltaT ^ 2##.

But what I get is a graph of this type:
http://imgur.com/LFfXtZa

that's not really what I expect. So I wanted to find a way to be able to calculate the car's corner at any time t. in such a way as to obtain the correct vertical acceleration for find vertical displacement. But i don't know how can do it.
 
Last edited:
The problem is your second step. Drop the 1/2 a t^2. That is already included in v(t).

Let me try to explain. You are thinking of the expression under constant acceleration

x(t) = x(0) + v(0) t + 1/2 a t^2

Note that the v(0) is a constant and is the velocity at zero time. Now think about where 1/2 a t^2 comes from. At constant acceleration v is the integral of a over time:

v(t) = v(0) + a t

and x is the integral of that and that gives the 1/2 a t^2. It IS the integral of v(t).

With varying acceleration you are doing these two steps expressly and serially. The integration of a to get v(t) is already included in your v(t). So your integration of v(t) to get x already includes the part you think of as 1/2 a t ^2. There is no other term. Also, with no better information you should assume x(0) is 0 and v(0) is 0

so you fist step
v(i)=v(i-1) + a(i) dt
is good. The second step should be
x(i)=x(i-1)+v(i) dt

You can quibble over what part of each interval had what acceleration and which speed and perhaps make an average speed for the interval, but it won't change the result much.
 
Thanks, i drop the ##0.5 * ay + deltaT^2##.
The result, however, seems to be almost equal as you have just told me.
That I can not understand is whether applying the procedure, what you get is the actual car's vertical displacement or less.
Graph I get is almost similar to what I posted before and values between them are always one larger than the other, but I was expecting something similar to graphic acceleration, or was left around of the values, and in the vicinity of peaks of acceleration, find the elevation peaks.

Forgive me for these questions, but I did not understand and I'm looking for explanations to solve this problem.
 
Does the accelerometer read zero when there is no acceleration? Try recording some data with the phone stationary on the desk. Any offset will cause a constant drift in the vertical displacement.
 
It doesn't read zero perfectly when there is no acceleration (I think it's due to vehicle vibrations), but values which are very close to zero, as the recording is very high frequency (100Hz).
The recording is done at the moment with the phone attached to the car dashboard.
 
While googling for data on smart phone accelerometer offset I found a reference to this video. At around 23:20 it discusses working out position (eg displacement) from acceleration using double integration. In short any error in orientation causes problems when you subtract g to get the actual acceleration. This creates an offset that when integrated causes a large drift (a graph just like you got). I think he says that a 1 degree orientation error gave him a 5m/s drift in position.

 
Last edited:
  • Like
Likes   Reactions: Pasquale
One possibility might be to arrange your software to correct for orientation error. For example after the phone is fixed to the dashboard (engine off) you know that the vertical acceleration should be zero. So instead of simply subtracting 9.81m/s^2 to zero the output instead record a few seconds worth and calculate the average value needed to zero the output. That should correct for any error in mounting the phone exactly level.
 
  • Like
Likes   Reactions: Pasquale
  • #10
Another approach is to force the end points to be at the same elevation. Drive a route that ends where it started and then remove the accumulated error assuming it is a constant drift by subtracting a straight line that passes through the end points.
 
  • Like
Likes   Reactions: Pasquale and CWatters
  • #11
Thank you both for the answer.
I'll try to follow your advice, I think that the result depends strongly from the error that I get to the base, as well as try as you said, I think to change approach, and then, or not to use the Euler method, or had read about the Fast Fourier Transformation (FFT).
 
  • #12
I read also that for remove noisy is possible applicate a Kalman-Filter, now I'm very confuse :/

If i start to reading my data during the travel.
When i finish i would to process my data, to obtain a final vertical displacement graph as i said, with only euler method i noticed that
it is impossible to have an adequate result.
I should first remove the noise from the data, and to do that I read that a way could be applicate the kalman filter,
if the approach might have been okay, then I should get the "clean" data, and these should apply the double integration techniques (Euler method, Runge Kutta, for example), the result could be far more true and real?
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
1K
Replies
11
Views
2K
  • · Replies 16 ·
Replies
16
Views
3K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 14 ·
Replies
14
Views
6K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 0 ·
Replies
0
Views
3K
  • · Replies 3 ·
Replies
3
Views
3K