Kinematics Software Solutions for Software Engineers

  • Context: Undergrad 
  • Thread starter Thread starter Ares2600
  • Start date Start date
  • Tags Tags
    Kinematics Software
Click For Summary

Discussion Overview

The discussion revolves around the development of software for kinematics analysis, specifically focusing on how to derive velocity and acceleration from a series of xyz coordinates sampled at fixed intervals. Participants explore potential software libraries and mathematical equations that could assist in this analysis, particularly in the context of tracking the dynamics of a moving car.

Discussion Character

  • Exploratory
  • Technical explanation
  • Mathematical reasoning

Main Points Raised

  • One participant seeks guidance on software libraries or equations for calculating velocity and acceleration from sampled coordinates.
  • Another participant emphasizes the importance of understanding the definitions of velocity and acceleration and suggests a mathematical approach using provided coordinates.
  • A participant proposes using calculus libraries to compute differentials for velocity and acceleration but expresses concern about the reference frame of these calculations.
  • There is a suggestion to use finite difference approximation to derive velocity and acceleration components from the xyz data, considering the potential noise in the data.
  • Discussion includes the need to calculate the components of velocity and acceleration with respect to the unit-tangent vector along the trajectory, rather than just the axis components.
  • Participants discuss the use of dot products to determine the parallel and perpendicular components of the acceleration vector relative to the trajectory.

Areas of Agreement / Disagreement

Participants do not reach a consensus on a single approach or solution. Multiple methods and considerations for calculating kinematic quantities are presented, indicating a variety of perspectives on the problem.

Contextual Notes

Participants mention the potential impact of noise in the data and the need for averaging, as well as the importance of defining the trajectory for accurate calculations. There are also unresolved questions regarding the best mathematical models to apply.

Ares2600
Messages
2
Reaction score
0
Hi,

I'm more of a software engineer than a physicist, so I'm hoping someone here might be able to point me in the right direction. I'm developing some software that could benefit greatly from some kinematics analysis function and I can't seem to figure out exactly what to search for.

What I've got is a series of xyz coordinates sampled at fixed intervals and I'm hoping to programmatically get a series of velocity/acceleration numbers from those coordinates. Probably quite simple to those here who are more well versed in physics. Specifically I'm hoping to find the velocity of the object and the acceleration forces that are acting upon it at that particular time. I'm tracking the dynamics of a moving car and want to be able to get information regarding it's acceleration/braking as well as turning.

So two questions I guess.. Do you know of any software libraries that I might be able to utilize in my project that can accept this sort of information? Or secondly, is there a set of equations you could point me to that I could implement programmatically? (this isn't much of a problem.. calculation in software I can do, as long as I know the equations).

Thanks for any help or ideas you can shoot my way.
 
Physics news on Phys.org
Estimates for velocity, acceleration, etc according to time can be found quite easily. What is the definition of velocity? What is the definition of acceleration?

Answer these questions.
Say an object is moving in a single direction. Here are some coordinates in the form (time, displacement):

(0,0)
(1,2)
(2,4)
(3,4)
(4,3)
(5,6)

Try to deduce mathematically how one might go about determining such things. How you want to model it also depends on the nature of the movement itself. For example, a car would have a displacement vs time graph that is continuous and differentiable or "smooth", a velocity graph that is also smooth, but an acceleration graph that looks something like a step function.
 
Okay sure.. I was thinking I could either treat the entire thing as a function and use calculus libraries to take the differentials. (one diff is velocity and second diff is acceleration, right?) But I'm worried that that would be velocity/acceleration with respect to the axis rather than with respect to the car's current trajectory.

Here was my first thought:

find the distance between the first two points and divide it by the sample rate to get the velocity. I now have an initial velocity and the slope of the vector between those points would be the initial trajectory (assuming just xy coordinates for now for simplicity). I then take the third point and caculate the both the distance traveled with respect to that initial vector as well as the distance traveled perpendicular to that vector. Both of these numbers then feed into my calculation for acceleration in the two planes. I figure out a new trajectory based on the vector between these latest two points and then continue on through my series, recording my acceleration and velocities as I go.

That might not be perfectly clear, but does it sound like a move in the right direction?
 
Ares2600 said:
Okay sure.. I was thinking I could either treat the entire thing as a function and use calculus libraries to take the differentials. (one diff is velocity and second diff is acceleration, right?) But I'm worried that that would be velocity/acceleration with respect to the axis rather than with respect to the car's current trajectory.

Google: finite difference approximation
From your x,y,z data taken at known times, you can determine the x-, y-, and z- components of your velocity and acceleration vectors. Given the presence of noise in the data, you may wish to perform some averaging of the data.With all of this information, you can
plot your position data points (x,y,z) in space
and [if you wish] plot a vector based at each point corresponding to the velocity vector and another vector corresponding to the acceleration vector.
(Look here for some pictures and some code http://www.phy.syr.edu/~salgado/software/vpython/ . Note that in these programs I am sampling a trajectory generated by a differential equation, not reconstructing one from raw data.)

From the last statement,
"rather than with respect to the car's current trajectory",
you seem to want, not the x-,y-,z- components of the velocity and acceleration vectors, but the components of velocity and acceleration with respect to the unit-tangent vector along your trajectory. That's easy to do once you have the x-,y-,z- components of the velocity and acceleration vectors.

The velocity vector is tangent to the trajectory at each point, pointing in the forward direction, of course. The component of the acceleration vector parallel to the tangent direction is obtained using the dot-product: [tex](\vec a \cdot \hat v)\hat v[/tex] tells you if you are speeding up or slowing down. The remaining part of the acceleration vector [tex]\vec a - (\vec a \cdot \hat v)\hat v[/tex] is perpendicular to that tangent vector and tells you if you are turning. Once obtained, you may wish to plot for each data point the parallel and perpendicular components of the acceleration vector.
 
Last edited by a moderator:

Similar threads

  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 5 ·
Replies
5
Views
9K
  • · Replies 11 ·
Replies
11
Views
3K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 39 ·
2
Replies
39
Views
5K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K