Distance Calculation

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.
 
Peter,

You're correct of course, but the conditon you cite introduces a discontinuity to the velocity profile. Discontinuities are what S-curve acceleration/deceleration are supposed to prevent.

You have to ask how the drive would handle the situation. It could calculate the trajectory based on the specified a and J values and introduce the discontinuity or it could modify the value for J so as to produce a continuous velocity profile.
 
There is no discontinuity if you use the right equation

Steve Bailey said:
Peter,

You're correct of course, but the conditon you cite introduces a discontinuity to the velocity profile.
(n) As I said in my first post, you can splice two third order equations together and get a smooth position and velocity profile.
We call your motion profile a seven segment motion profile because there are seven segments to a move as shown

Code:
            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

When the jerk or velocity are too low you get a 5 segment motion profile which is like the 7 segment motion profile except segments 2 and 6 are missing. A 5 segment motion profile still uses third order equations like the 7 segment profile and is just as smooth as smooth. However, a 5 segment profile does require a different set of equations to calculate the coefficients for the third order equations and to calculate when each equation is used. A special case is where a^2=V*J. Now the segments 2 and 6 have a duration of 0 seconds and a distance of 0, BUT your equation still works because the desired acceleration is reached if only for a moment.
 
Keith,

Given the point that Peter raises about what happens when the velocity from which you're stopping is so low that a^2 > V * J, your logic probably needs to check for that condition and if necessary, increase the value of J so that a^2 = V * J.

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.

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?
 
There is not discontinuity for those that know.

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.

ENOUGH WITH THIS DISCONTINUITY BS. When a^2>V*J the following equations apply:

Code:
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

If you use V=10 and J=500 and a is any value so a^2>V*J then a will not be used.

sqrt(V/J)=0.141421
X1=1.178511
V1=5
A1=-70.710678
X(end)=1.414214
V(end) and A(end) are 0. They better be zero.

Now you can handle the case where a^2>V*J smoothly with out dicontinuities.


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?

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.
 
Thanks for the posts.

This is a straight-up velocity application. There really is no positioning with it, which is what allows me to be so loose on my stopping spec.
Steve, I did end up simplifying to your original equation. I never went through the excersize before since I had to support the dual jerk rates. But my general case does simplify down to your equation if both jerk rates are equal. Also, I was handling the case where V < a^2/j already, albeit with an incorrect equation. that will get fixed up.
I did some more checking on the two jerk rates thing. This came from a guy who used to work on big paper winders. Through trial and error they found they needed different jerk rates at the corners to prevent wind quality problems at speed transitions. I'm not sure why they didn't just use the worst case jerk (lowest value) for both. But that's the history of that.

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.

Peter, while conceptually I agree with you this can cause issues in it's own right. Unless you understand the intermediate effects of 'I want to be going X speed at Y position at Z time' how do you know how to size your system? I guess that's the value added part of a client/vendor relationship. You (the vendor) get to do it either way, you just don't need to drag someone else along while you do it.
In my case we use jerk to correct wind quality issues at speed transition, mostly necking and shoot-out. These are results of tension changes at these points. So in my case 'as good as it needs to be' is accurate enough and visual inspection provides appropriate feedback. If I were doing a system that made 10 moves a second all day long, I would be more worried about parameter optimization.
 
need additional help with the formula

We are winding a real lightweight sheet paper that tears easily. I to am trying to use a footage to stop formula on a control logix processor. We typically run 3000fpm, with a acceleration rate and deceleration rate of 128 ft per sec squared. Our jerk rate is 1 fps cubed. They go into an s curve block that creates the reference to the drive.
We tried the formula that Peter had in the thread X = [V^2 / (2 * a)] + [(V * a) / (2 * J)] , but we end up in the condition of a squared > vj as described further into the thread. If I increase J, our paper tears as the drive reacts too quickly.

How do I modify this formula in plc lingo to handle that. I am not sure how to do the math by the segments as discussed later by peter in the plc.
Any help would be appreciated.
 

Similar Topics

Are there any documents or standards for calculating the response time for a controls system? For example: Light Curtain response 20ms Safety...
Replies
3
Views
3,878
I am trying to calculate the safe distance for a light curtain. What's a good way to determine the maximum stopping time of a hazard? In my case...
Replies
17
Views
8,137
Hi guys, first time post so don't be too angry. I am basically a stupid person so I could use some help. I have created a FB that will output a...
Replies
7
Views
5,287
In a motion application I want to stop my motion at a certain point. For that point I want to know the distance it wil take to stop. The motion is...
Replies
20
Views
9,079
Hello everyone, What's the difference between nominal sensing distance and maximum sensing distance in a diffuse photoelectric sensor ? in...
Replies
1
Views
1,127
Back
Top Bottom