Calculate distance - accleration, time, distance

In summary, the conversation is about calculating the distance between two points when an object is moved from one point to another with varying acceleration. The participants discuss the use of calculus and Euler's method to find the distance, as well as the potential use of an iPhone application to calculate the height of an object using the accelerometer. They also clarify the importance of considering the velocity as constant in small time intervals in order to accurately calculate the distance.
  • #1
asprsai
4
0
Hi guys,

Sorry I am not into physics that much, basically I am a software developer..., my question might be silly., but, I want to calculate distance between two points. The situation here is - if an object is moved from say point x to point y in t amount of time with an acceleration which is not constant, can we calculate the distance between those points?

We don't know what are the positions of x and y. All we know is how much time did they take to move the object from x to y and acceleration at every second.

Thanks,
aspr
 
Physics news on Phys.org
  • #2
As long as the initial velocity is zero (or otherwise known), it's no problem. How's your calculus?
Acceleration is the derivative of velocity, which itself is the derivative of displacement (i.e. position).
[tex]
a \equiv \frac{dv}{dt} \hspace{1in} v \equiv \frac{dx}{dt}
[/tex]

To find a change in displacement (x), one must integrate (reverse the derivative) of velocity---which may require first integrating the acceleration.

Numerically, there are lots of different methods to perform integrations. The simplest method, is Euler's method (pronounced Oil-er). To find the velocity at some time `2', given the velocity at `1' you do:
[tex]
v_2 = v_1 + a_{1,2}\times \Delta t
[/tex]
Where delta t is the time interval, and [tex]a_{1,2}[/tex] is the acceleration between 1 and 2.
 
  • #3
Thanks for the reply zhermes.

Yes, I think initial velocity is zero because we are moving an object from still position (point x). After moving some distance it stops at point y.

I was good at calculus when I was in high school., it has been 6 years since then and now I am very bad at it. I am sure if I go and check out some tutorials or notes I think i can get my calculus back.

I did search the web and I found out this:

Please correct me if I am wrong
v = v[tex]_0[/tex] + at; (Is 'a' here average acceleration? because it might be different at start, in the middle and at end.)

v = at (since v[tex]_0[/tex] = 0);

v = dx/dt;

at = dx/dt;

dx = at * dt? Is this how i need to approach? if so what should I do from there?
 
Last edited:
  • #4
What you have is right, but at the same time, not quite. In your question, you said that the acceleration is changing. The equation that you posted, however, can only, sadly, be used for constant acceleration. If you do some extra work, tinker with it and whatnot, you might be able to get it right, but otherwise, I'd go for a different approach.

As Zhermes has so kindly explained, the acceleration is simply the slope of the graph of the velocity, and velocity is simply the slope of the graph of position. Yes, I'm starting at the basics for Calc. here, but I'm not sure how much you remember. Finding the slope of an equation with respect to x is done by simply taking the derivative of the equation. What you need to do is the opposite.

Starting with an equation for acceleration (which I sincerely hope that you have, rather than a set of numbers. If the latter is the case, I'll have to fix this up a bit.), you simply take the integral twice. If you'd post the equation for acceleration, as well as any questions you have, I'd be more than willing to help you as much as I can.
 
  • #5
Lame One said:
Starting with an equation for acceleration (which I sincerely hope that you have, rather than a set of numbers. If the latter is the case, I'll have to fix this up a bit.), you simply take the integral twice.
I was assuming this was an iPhone's accelerometer, or something like that. Please clarify.
 
  • #6
Hey zhermes, you got me right., I was thinking of developing an application to build my portfolio. I want to develop an application which can calculate height of an object taking help of the accelerometer in iPhone, something like a pedometer but the person won't move he just moves his phone.

Sorry I should have said this before.. but yes that's what I am trying to develop and.. I have to get my physics right.

So now do you understand the question clearly or did I make a mess?

Thanks,
aspr
 
  • #7
Okay, gotcha! That's a really awesome idea---I've always wanted to try using the accelerometer data in iPhone apps.

Lets make sure the concepts are clear first, consider a simper situation.
You have a known constant velocity `v' (no acceleration), and you want to find the displacement. Velocity is just the change in displacement over the change in time [tex]v = d/t[/tex] thus to find the distance, you multiple your velocity by your time interval: [tex]d = v \Delta t[/tex].

If your velocity is changing, this doesn't work. If your velocity was ALMOST constant, it would be pretty accurate though... thus, let's use time intervals small enough that the velocity can be TREATED as constant. Thus the change in distance for at some particular moment in time `i,' will be: [tex] \Delta d_i = v_i \Delta t[/tex] where I'm assuming that the time interval is the same at every point in time (i.e. the phone is sampling the velocity [or acceleration or whatever] ever [tex]\Delta t[/tex] period). Thus, if the distance we've gone so far is [tex]x_i[/tex], and we want to find the distance at the next instant in time, [tex]x_{i+1} = x_i + \Delta x[/tex], we simply do: [tex] x_{i+1} = x_i + v_i \Delta t[/tex]. No problem.

Now in your case, the velocity isn't constant, so we have to do the exact same thing with the velocity first, then apply it to the displacement: [tex]v_{i+1} = v_i + a_i \Delta t [/tex] and combine that with the above.

Okay, end result for your application, using Euler's method (which I have been describing): your code might look something like this (note: i don't actually know what any of the iPhone accelerometer objects or methods are called):
Code:
while( ... ) {
    deltaT = [accelerometer getSamplingInterval];
    accel = [accelerometer getAcceleration];
    vel += accel*deltaT;   //integrate velocity
    dist += vel*deltaT;     //use new velocity to integrate distance
}

There may not be any method to get the sampling interval (or it may vary), thus you would have to compute it manually like...
Code:
while( ... ) {
   timeOld = timeNew;              //store previous time
   timeNew = [clock getTime];   //get new time
   deltaT = timeNew - timeOld;
   /* code from above */
}

If the changes in accerleration are relatively small, and the sampling rate is relatively fast---this will work well. Otherwise, you'll need a better integration method (i.e. fourth order runge-kutta would probably be your best bet). But you should start with Euler's method.

Let me know if anything is unclear.
 
  • #8
Thanks zhermes.

In iPhone we can set an timer and call the getAcceleration method so we can decide what deltaT should be. I also came to know that the iPhone accelerometer is not that good and it has lot of spikes.

I havnt started this app yet., but I will work on this and update you. It might take sometime for me to understand this and I am moving to a new apt so it might take more. I will try it out and surely update you on this.

Thank you so much for the help...
 
  • #9
Interesting... cool.
Happy to help asprsai---I'd really like to hear how it goes!
 

1. How do you calculate distance using acceleration, time, and distance?

To calculate distance using acceleration, time, and distance, use the formula d = v0t + 1/2at2, where d is the distance, v0 is the initial velocity, a is the acceleration, and t is the time. Plug in the values for each variable and solve for d.

2. What is the difference between acceleration and velocity?

Acceleration is the rate of change of velocity over time, while velocity is the rate of change of position over time. In simpler terms, acceleration measures how quickly an object's speed is changing, while velocity measures how quickly an object is moving and in what direction.

3. Can you calculate distance without using acceleration?

Yes, you can calculate distance without using acceleration by using the formula d = vt, where d is the distance, v is the constant velocity, and t is the time. This formula is used when acceleration is not present or is equal to 0.

4. How can I calculate the time it takes for an object to travel a certain distance?

To calculate the time it takes for an object to travel a certain distance, use the formula t = (d - v0t)/v, where t is the time, d is the distance, and v0 is the initial velocity. Plug in the values for each variable and solve for t.

5. What is the unit of measurement for acceleration, time, and distance?

The unit of measurement for acceleration is meters per second squared (m/s2), for time is seconds (s), and for distance is meters (m). It is important to use consistent units when calculating these values to ensure accurate results.

Similar threads

  • Introductory Physics Homework Help
Replies
5
Views
974
  • Introductory Physics Homework Help
Replies
9
Views
744
  • Introductory Physics Homework Help
Replies
13
Views
670
  • Introductory Physics Homework Help
Replies
11
Views
991
  • Introductory Physics Homework Help
Replies
5
Views
1K
  • Introductory Physics Homework Help
2
Replies
38
Views
1K
  • Introductory Physics Homework Help
Replies
2
Views
560
  • Introductory Physics Homework Help
Replies
15
Views
300
  • Introductory Physics Homework Help
Replies
1
Views
807
  • Introductory Physics Homework Help
Replies
7
Views
985
Back
Top