kevinrcase
Member
Hey I learn something new I did not even know there was a S curve function block with the FB part control logix. But this would only simplify the configuration; not reduce the processing time.
Steve Bailey said:Keith,
Without going through all the algebra, the formula you want is:
X = [V^2 / (2 * a)] + [(V * a) / (2 * J)]
As I said in my first post, you can splice two third order equations together and get a smooth position and velocity profile.Steve Bailey said:Peter,
You're correct of course, but the conditon you cite introduces a discontinuity to the velocity profile.
Accel Jerk
Segment 1 + + Accelerating from stop
Segment 2 + 0 Accelerating
Segment 3 + - Accelerating
Segment 4 0 0 At constant velocity
Segment 5 - - Decelerating
Segment 6 - 0 Decelerating
Segment 7 - + Decelerating to stop
Steve Bailey said:That's probably what the drive is going to do. When you're stopping from a speed such that a^2 > V * J, you can't keep the values of a and J without introducing the discontinuity I mentioned. The "different set of equations to calculate the coefficients" has the net effect of changing either a or J (or both). If I were writing the S-curve algorithm for the drive, I would probably treat the J value as a minimum, and increase it if necessary to produce a continuous curve when stopping from a low speed.
t(n)=2*sqrt(V/J) Time for the ramp down
X=V* sqrt(V/J) Distance during ramp down
Start at segment 5
For t = 0 to sqrt(V/J)
X(t)=V(0)*t-(J/6)*t^3
V(t)=V(0)-(J/2)*t^2
A(t)=-j*t
Now let
X1=X(sqrt(V/J))
V1=V(sqrt(V/J))
A1=A(sqrt(V/J))
Skip segment 6
Start segment 7
For t = 0 to sqrt(V/J) A1 is negative J is positive
X(t)=X1+V1*t+(A1/2)*t^2+(J/6)*t^3
V(t)=V1+A1*t+(J/2)*t^2
A(t)=A1+J*t
I haven't had the time to redo the equation for different J values at the opposite ends of the profile. Peter, do you have any idea why anyone would specify a different value for J during segment 7 than the value specified for segment 5?
Originally quoted by Peter Natchway
No, this brings up some philosophy about motion control commands. Most motion controllers traditionally let the user specify the jerk, acceleration, deceleration, velocity and position when giving a command. I call this specifying the means. From a lot of experience and tech support calls I have learned what most user have no idea what to use for acceleration and jerk. All the users really want to do is to specify the end result. They want to give commands like “I want to be at this speed when I and at that position” or “I want to be here in so many seconds.” Like Keith, too many struggle with the math. I can calculate this for them, but they shouldn’t need to call me. All the things the user may want to do should be built into the ramping blocks or motion controllers. In short, the users should be able to specify the end result and not worry about how to achieve the results.