Simulating motion in 1D with varying jerk?

In summary, the conversation discusses accurately simulating motion in 1D with a non-linearly changing jerk in the context of a physics simulation. The individual is trying to calculate distance traveled, delta acceleration, delta velocity, etc. in a given frame using a formula-based change in jerk over time. They are considering using an average jerk for the frame to get a better approximation, but are unsure if there is a more accurate method. The conversation suggests finding the exact values of acceleration, velocity, and distance at any time t using integrals, and recommends storing the calculation of ln(J0) in a variable to improve efficiency.
  • #1
Grumple
7
0
Hello,

I am trying to accurately simulate motion in 1D with a jerk that is changing non-linearly, but predictably. As an arbitrary example, picture jerk increasing logarithmically over time. This is being done in the context of a physics simulation that is 'stepping' frame-by-frame (ie 60 steps per second), calculating distances traveled, new accel, velocity, etc, at the end of each frame. Up until now I have been always assuming a constant jerk frame-to-frame, making things pretty simple. However, this is not very accurate when jerk is in fact changing during the frame itself.

I can make the simulation more accurate by increasing the number of frames per second, but only to a certain point before hitting a performance wall, and this would still be fundamentally ignoring the fact that jerk not actually constant during the frame.

For example, let's say that the jerk value at time T is initial jerk to the power of T. I'm trying to figure out how to calculate distance traveled, delta accel, delta, vel, etc in a given frame knowing jerk did in fact change (non-linearly) during the frame. I know all variables at the start of the frame, and just want to accurately generate the same variables for the end of the frame knowing constant elapsed time.

As far as I can tell, there is no way to accurately factor in the formula-based change in jerk, so instead I am considering using an 'average jerk' for the frame in order to get a best-approximation with the constant jerk based motion formulas. I am doing this by calculating what the jerk would be at the end of a given frame based on the formula for change in jerk over time, then calculating an average jerk for the frame based on the frame start (J0) and end values (ie literally (J0 + JT)/2.0).

Does this make sense? I know the average jerk I calculate isn't necessarily accurate as the jerk isn't changing linearly, but it seems like it would be a better approximation than assuming the jerk for the entire frame was whatever it was at the start of the frame.

Am I missing something obvious that would allow a more accurate calculation of metrics each frame with this formula-based change in jerk over time? Maybe a more accurate way to generate the 'average' knowing the formula for change in jerk?

Thanks for any help!
 
Physics news on Phys.org
  • #2
It seems to me that the solution should actually be pretty simple..
I hope I am understanding correctly.

But if your formula for the jerk at any time t is given as
[tex]J = J_{0}^{t}[/tex]
is that correct?
Then you can find the exact values of acceleration, velocity, and distance at any time t also (provided that you know all the initial conditions).
They would just be the integrals of each quantity before. Like so:
[tex]J(t) = J_{0}^{t}[/tex]
[tex]a(t) = \frac{J_{0}^{t} - 1}{ln(J_{0})} + a_{0}[/tex]
[tex]v(t) = \frac{J_{0}^{t} - 1}{ln^{2}(J_{0})} - \frac{t}{ln(J_{0})} + a_{0} t + v_{0}[/tex]
[tex]x(t) = \frac{J_{0}^{t} - 1}{ln^{3}(J_{0})} - \frac{t^{2}}{2 ln(J_{0})} - \frac{t}{ln^{2}(J_{0})} + \frac{1}{2} a_{0} t^{2} + v_{0} t + x_{0}[/tex]


I really do hope all of that is correct, it's a bit hard to keep all of the terms straight when writing it all in text lol. So I would recommend that you double check my work and make sure I did all of the integrals right.
If you wish you may be able to use this site to assist you: http://www.wolframalpha.com/
It can automatically compute integrals for example you can type integral(x^(2)*dx)

If my answers are correct than you will have an equation of x(t) for any time t. Also since this is a computer program I would strongly recommend that you just find ln(J0) one time, and store the quantity in a variable since it seems to be used a lot. It would slow down your program if you calculated the log every iteration and J0 is a constant any way so it would be a waste of time.

Hope this helps at all.
 

Related to Simulating motion in 1D with varying jerk?

1. What is jerk in the context of motion?

Jerk is the rate of change of acceleration with respect to time. In other words, it measures how quickly the acceleration of an object is changing.

2. Why is it important to simulate motion with varying jerk?

Simulating motion with varying jerk allows us to understand and predict the behavior of objects in more complex scenarios, such as when dealing with changing forces or acceleration profiles. It also allows for more accurate simulations of real-world motion.

3. How is jerk related to other quantities like velocity and acceleration?

Jerk is the third derivative of position with respect to time. It is related to velocity through the second derivative, acceleration, and to position through the first derivative, velocity. In simpler terms, jerk affects how quickly the velocity and acceleration of an object change over time.

4. What are some common applications of simulating motion with varying jerk?

Some common applications include studying the behavior of objects in roller coasters, rockets, and other forms of transportation. It is also used in robotics and animations to create more realistic and fluid movements.

5. How is jerk incorporated into mathematical models and simulations?

Jerk is typically represented as a function of time in mathematical models and simulations. This function can be defined and manipulated to simulate different scenarios and analyze the behavior of objects with varying jerk profiles.

Similar threads

  • Mechanics
Replies
3
Views
5K
Replies
5
Views
2K
  • Mechanics
Replies
7
Views
2K
Replies
2
Views
1K
Replies
25
Views
1K
Replies
5
Views
785
Replies
1
Views
1K
Replies
2
Views
929
Replies
5
Views
2K
Back
Top