Function to calculate valve motion velocity
Function to calculate valve motion velocity
(OP)
I am trying to write some functions to calculate the velocity, acceleration, and jerk (change in acceleration) of some valve motion data.
The data is typically about 220 points
The x axis is evenly spaced with an increment of 1
The y axis is provided in a list of "position data"
I would like to know the best way to accuratly calculate the
velocity, acceleration, and jerk of the y axis at each increment
along the x axis.
Below are two methods I have tried to calculate velocity at EXACTLY the point along the X axis of the distance measurment, obviouslyat least one of them is wrong.
Note: Calculating the velocity between two points is easy, the problem is finding the velocity on the point.
X Increment, Y Position, Velocity, Avg Velocity,
1 ------------- 1
>----------- 1
2 ------------- 2 >----------- 4.5 (velocity at 2)
>----------- 8
3 ------------- 10
X Increment, Y Position, Avg Position, Velocity,
1 ------------- 1
>----------- 1.5
2 ------------- 2 >---------- 3.75 (velocity at 2)
>----------- 6
3 ------------- 10
Is there a better way to do this?
The data is typically about 220 points
The x axis is evenly spaced with an increment of 1
The y axis is provided in a list of "position data"
I would like to know the best way to accuratly calculate the
velocity, acceleration, and jerk of the y axis at each increment
along the x axis.
Below are two methods I have tried to calculate velocity at EXACTLY the point along the X axis of the distance measurment, obviouslyat least one of them is wrong.
Note: Calculating the velocity between two points is easy, the problem is finding the velocity on the point.
X Increment, Y Position, Velocity, Avg Velocity,
1 ------------- 1
>----------- 1
2 ------------- 2 >----------- 4.5 (velocity at 2)
>----------- 8
3 ------------- 10
X Increment, Y Position, Avg Position, Velocity,
1 ------------- 1
>----------- 1.5
2 ------------- 2 >---------- 3.75 (velocity at 2)
>----------- 6
3 ------------- 10
Is there a better way to do this?
Jonathan T. Schmidt
http://www.schmidtmotorworks.com





RE: Function to calculate valve motion velocity
Valve velocity ==> Three point rule for f'(x)
Valve acceleration ==> Three point rule for f'(x)
for jerk apply the f'(x) above to the velocity values instead of the position values.
h= increment
h
RE: Function to calculate valve motion velocity
Also thanks for posting "h= increment" I was trying to figure out what the characters represented. Any other tips would be appriciated.
Jonathan T. Schmidt
http://www.schmidtmotorworks.com
RE: Function to calculate valve motion velocity
A star to someone who really helped you is always a good move.
Regards
eng-tips, by professional engineers for professional engineers
Please see FAQ731-376: Eng-Tips.com Forum Policies for tips on how to make the best use of Eng-Tips Fora.
RE: Function to calculate valve motion velocity
h
that contains the (hopefully) correct formulas.
Plug your data in and redo the charts and you should be away.
I haven't used any particular units so you will probably need to scale them to suit.
Another point is that by the time you get to the third derivative (jerk) the cumulative error might be getting to a point where it is significant. But at least you will have a general idea where things are headed.
HTH
RE: Function to calculate valve motion velocity
RE: Function to calculate valve motion velocity
I think you are on to something, the more I look at this, it becomes clear that using 3 points isn't enough to find the slope at point two.
I would like to do the Cubic Spline Interpolation (or maybe Quintic) but I don't know how to write the formula for either. I ordered a book on splines, any pointers would be appriciated.
http
Jonathan T. Schmidt
http://www.schmidtmotorworks.com
RE: Function to calculate valve motion velocity
Jonathan T. Schmidt
http://www.schmidtmotorworks.com
RE: Function to calculate valve motion velocity
http://www.nrbook.com/a/bookcpdf.php
I'd suggest that you try to find a Math Package that does a Cubic Spline Interpolation. You are correct that you may need a higher order function as a Cubic Spline connects acceleration at points to be equal in direction but not in magnitude.
RE: Function to calculate valve motion velocity
See http://www
Norm
RE: Function to calculate valve motion velocity
I guess it is time to elevate my excel knowledge.
Jonathan T. Schmidt
http://www.schmidtmotorworks.com
RE: Function to calculate valve motion velocity
How about if I use a general conic equation from five points?
x y
0.0 0.1
0.25 0.2
0.5 0.3
0.75 0.7
1.0 0.9
(32 * x^2)+(-120* x*y)+(100*y^2)+(12*x)+(1) = 0
Can someone show me how to write an equation to get the:
velocity in y axis
acceleration in y axis
jerk (change in acceleration) in y axis
at 0.5 (the third point)?
Jonathan T. Schmidt
http://www.schmidtmotorworks.com
RE: Function to calculate valve motion velocity
http://
However with a second order equation, you will have a velocity equation, the acceleration will be a constant and the jerk will be zero.
The cubic spline is an improvement since third order equations are strung together (there is a new cubic equation between every two points). You can differentiate every equation to give
First derivative = Second Order Equation for velocity.
Second derivative = First order equation for acceleration.
Third derivative = A constant Jerk in the interval.
RE: Function to calculate valve motion velocity
Yes, now I get it, the conic won't work I need to use a cubic spline instead.
Now I will focus on figuring out how to do that.
I ordered a book on splines, I hope I can figure it out from that.
Jonathan T. Schmidt
http://www.schmidtmotorworks.com
RE: Function to calculate valve motion velocity
http://www.xlxtrfun.com/XlXtrFun/XlXtrFun.htm
An Excel add on that will give you Cubic Spine Interpolation and the first and second derivatives (Velocity and Acceleration). Hopefully, cells will contain the second derivative equations so you can get the jerk.
RE: Function to calculate valve motion velocity
http://www.designofmachinery.com/
RE: Function to calculate valve motion velocity
Thanks for the link, it does have a good spreadsheet to learn from but the code is buried in an xll and dll file.
The dll has two functions
ddydx
Returns the second derivative of the interpolated curve at the given X using the defaults of Interpolate
dydx
Returns the first derivative of the interpolated curve at the given X using the defaults of Interpolate
I guess I can use the functions but would prefer to code them myself if possible.
My cam handbook just arrived in the mail, maybe it has some functions.
Jonathan T. Schmidt
http://www.schmidtmotorworks.com
RE: Function to calculate valve motion velocity
http://o