Programming S-curve motion profiles

... that rule about the initial jerk always being in the direction of the move ...

That's just calculus: the second derivative is always in the same direction.
It's the same with distance and acceleration, if you want to move a positive distance you need to start with a positive acceleration.

So if you have a positive velocity you need an initial positive jerk.

It gets more complicated if you are already moving, e.g. if you are tracing a profile, where you might already have negative acceleration and negative velocity happening and the next segment is "more positive" then you will have a positive addition to the existing negative values of V and A , and J will be positive (having been zero prior to this) .
 
That's just calculus:
I don't have a problem with that cf. here.

the second derivative is always in the same direction.
Apart from semantic ambiguity (second derivative of what?), assume d^2Postion/dt^2 is meant: what if the initial and final (target) acceleration have opposite sign?

...So if you have a positive velocity you need an initial positive jerk.


Arrgh, more ambiguity: positive initial velocity? final? change?


... It gets more complicated if you are already moving, e.g. if you are tracing a profile ...


Ah, so are you are saying the "rule" only applies to "simple" cases then? Because I interpreted it's original context as universal, i.e. from any initial PVA to any final PVA.


Sigh. Communication, humankind's second biggest problem.
 
What rules are you guys talking about?
There is one rule that rules them all. The Lyapunov function.
Lyapunov's rule for stability can be used to determine whether the sign of the errors in position, velocity and acceleration are correct and if not then how the next higher up derivative needs to change so the lower derivatives will converge with 0 error.

Unfortunately the explanations for the Lyapunov function are clear as mud. The wolfram example is bad. I could do a better job of explaining.
It is a simple trick we use here and there.

That will keep you scratching your head.

So a PLC can generate a 7 segment motion profile. The problem is that NO ONE on this forum has figured out how. After 3 weeks it is easier/cheaper to buy the motion controller.
 
The problem is that NO ONE on this forum has figured out how.

Not everyone has tried yet.

I already gave a solution for the simple problem where Vmax and Amax are reached.

I am only trying to understand the terms at this point.


After 3 weeks it is easier/cheaper to buy the motion controller


But not nearly as interesting.
 
Last edited:
There are many cases.

...I think you need to get better at generalizing.

Hey Peter! NO ONE on this forum has proven they can add integers! I haven’t seen it! Only me and one other person has ever solved adding integers!!!! Sure, you can do the easy case to add 1, but what if the number was 3?! Or if it was negative?! There are aleph naught cases!!!!! CaN U or SoLVe aLL OF tHeM?!!!!
 
But is your .png ALL of the cases?!!! What if I have a 7?!!! Does your .png handle that case????
Yes, can't you see there is a file called seg1234567
That handles the simple case where all 7 segments are used.
There is also a seg123567 where the commanded velocity is not reached so there is no constant velocity segment.
How do you calculate the peak velocity reached?



It also takes into account responding to moves on-the-fly and where the command position is behind the current target position so the target must slow down and go start the whole motion sequence again in the reverse direction.


...let’s see how long it takes you to figure out where I’m going with this.
You stepped in it.



Read this
http://www.plctalk.net/qanda/showthread.php?t=119883
It gives away the simple solution.
 
Yes, can't you see there is a file called seg1234567
That handles the simple case where all 7 segments are used.
There is also a seg123567 where the commanded velocity is not reached so there is no constant velocity segment.
How do you calculate the peak velocity reached?

Wow, you completely missed the question. I didn’t ask about 7 segments. I asked about the number 7 as an input parameter.

I’m not sure you’ll be able to follow along any further, so I’ll just spell it out for you.

I don’t see separate cases for things like whether or not a segment has a time span of zero anymore than I see different cases for someone passing in a 7 instead of an 8. It’s all calculated.

Did you know it’s technically possible to write a single abstraction that can calculate all of the targets for any input?

That’s where I was going with this. And why I said you need to get better at generalizing. And why I made fun of all of your “cases”.
 
Wow, you completely missed the question. I didn’t ask about 7 segments. I asked about the number 7 as an input parameter.
For what? Position, velocity, acceleration. How can I read a mind that is intentionally left blank?





I’m not sure you’ll be able to follow along any further, so I’ll just spell it out for you.
First you must understand the problem.



I don’t see separate cases for things like whether or not a segment has a time span of zero anymore than I see different cases for someone passing in a 7 instead of an 8. It’s all calculated.
7 or 8 what?
What is all calculated?



Did you know it’s technically possible to write a single abstraction that can calculate all of the targets for any input?
What is an abstraction? Show us!










That’s where I was going with this. And why I said you need to get better at generalizing. And why I made fun of all of your “cases”.[/QUOTE]
 
Yeah, that’s what I originally thought also, but it would be nice to get better details on exactly what the OP is trying to do.
You seem incredibly knowladgable in this topic, so i have a question for you. i am currently trying to work out s curve motion profiles for a very fast camera slider (completes a 4-meter slide in less than 1 second) I'm building. Currently, there is a pan and tilt head with stepper motors to move the axis, and controlled by some arduinos. the time, acceleration and distance are all pre defined before the move starts. with this in mind is it possible to achieve s curve motion profiles?
 
justforfun

Abs(a) - const
Symmetrical
slidetime = 1 s

x_0.5 = 4 / 2
t_0.5 = 1 / 2
a = 2*x_0.5 / t_0.5 ^2 = 2 * (4/2) / (½)^0.5 = 4 / 0.25 = 16
V_0.5 = a * t_0.5 = 16 * 0.5 = 8
x_0.5 = x / 2 = 4 / 2 = 2

t< 0.5
x = 8 * t^2

t> 0.5
x = 2 + 8*(t-0.5) – 8 * (t-0.5)^2

yes, I know that this solution is unsatisfactory, but it cannot be satisfactory without satisfactory "input data"
 
justforfun

Abs(a) - const
Symmetrical
slidetime = 1 s

x_0.5 = 4 / 2
t_0.5 = 1 / 2
a = 2*x_0.5 / t_0.5 ^2 = 2 * (4/2) / (½)^0.5 = 4 / 0.25 = 16
V_0.5 = a * t_0.5 = 16 * 0.5 = 8
x_0.5 = x / 2 = 4 / 2 = 2

t< 0.5
x = 8 * t^2

t> 0.5
x = 2 + 8*(t-0.5) – 8 * (t-0.5)^2

yes, I know that this solution is unsatisfactory, but it cannot be satisfactory without satisfactory "input data"
Not unsatisfactory at all, it is very helpful thank you. However from what i can understand this has a constant acceleration is that correct? How would i add smoothing to the acceleration curve as well?

Thank you for your help!!
 

Similar Topics

Hey everyone, I have a sensor that gives a 4 - 20 mA signal that is not perfectly linear. There is a bit of a curve in it. I would like to hook...
Replies
27
Views
4,722
Does anyone can explain me how to do s-curve (for increasing and decreasing speed of the process ) programming in siemens simatic S7. If...
Replies
1
Views
1,874
Dear all, I have fx2n plc on my hand but I don't have the programming cable sc-09 and it would not be easy for me to get one. I need the cable...
Replies
3
Views
74
Hi all, i am the new controls guy at the plant and i have inherited a pc from the previous controls guy with Siemens tia portal version 16 and 17...
Replies
20
Views
755
I need to pull the program off of an old 90-30 so I can convert it to Allen Bradley. This is my first time messing with GE and I don't have the...
Replies
2
Views
83
Back
Top Bottom