Online calculator for jerk-limited time-optimal trajectories

Hi, Peter,

I had never heard of PLC Open before this, I would love to not have to re-invent the wheel with jerk motion. However, it looks like not every PLC has the PLC Open Motion libraries? Unless there is a way I can "download" the libraries? Basically I am not sure how to access the PLC Open libraries for my controller?

For acceleration & velocity & position reaching 0 together, what are some tricks? I am having a hard time thinking of some.
 
Hi, Peter,
I had never heard of PLC Open before this, I would love to not have to re-invent the wheel with jerk motion. However, it looks like not every PLC has the PLC Open Motion libraries? Unless there is a way I can "download" the libraries? Basically I am not sure how to access the PLC Open libraries for my controller?

For acceleration & velocity & position reaching 0 together, what are some tricks? I am having a hard time thinking of some.
Did you look at this?
https://deltamotion.com/peter/wxMaxima/Seg1234567.html
Notice the round off error for t07 at %t111. You must use 64 bit math for starters. The RMC75, RMC150 and RMC200 can do 64 bit, LREAL, floating point math. This is a must even if the PLC can only use REALs.
Even then the rounding errors will lead to a loss of precision because all the different segments errors will add up unless you do what I did in the link. Notice I calculate the beginning and end of the segments using the formals. This helps keep the errors from accumulating if you keep adding one segment to the other.

This is not only hard. It is very hard. You need to learn to do symbolic processing as shown in the link. Iterating calculations and adding one millisecond's calculations to the next millisecond's calculations will NOT work.

Lean to use a CAS ( computer algebra system ). My example was done using wxMaxima. Others are Mathematica, Maple and Mathcad. I did most of my work in Mathcad. The link above shows how it can solve 17 variables using 17 equations.

Basically, I think you are nuts trying to figure this out. I have no idea why cheeco did it. I have no idea how optimal cheeco's solution is. I think cheeco wanted to sell the solution. I did it because my company sells motion controllers so I could justify the time in order to be perfect. It is easier to buy the motion controllers. Obviously were are NOT going to give the solution away.

BTW, I haven't seen any other controllers that can find the perfect or optimal solutions.

I repeat. Solving the problem in thread is not only difficult. It is extremely difficult to get perfect solution. It took me years before I got a solution I though was fast enough and I liked. Cheeco admitted to me that he too got frustrated and had to put the problem down of a year.

Years ago I posted this problem on sci.math.symbolic, an old news group. People could solve this problem using wxMaxima, Mathematica or Fermat. Robert Lewis of Fordham university used the problem at a lecture or seminar to show how good his program, Fermat, is. Even so NONE of them could provide a solution simple enough to use in a motion controller. The solutions were too complicated and would take too much time.
The complications led to rounding errors.

I finally took the time to simplify and optimize the solutions by hand. Yes, by hand. A big part of the problem is that there was a need to calculate the forth root of a polynomial. The computer can find the answer to all four roots but I realized I only needed one. This reduced the problem by a factor of 4 and yes, I have a method of finding the fourth roots using a formula. After a while you learn there are patterns to roots.

Learn to put polynomials in Horner form. A 3rd order polynomial is

s(t)=A+B*t+C*t^2+D*t^3
but write it like this
s(t)=(((D*t+C)*t+B)*t+A This is Horner form.
Notice there are no t^3 in the expression. If t is small then t^3 is so small that it is lost due to not having enough bits in the mantissa.

Again, so far only cheeco and I have solve the special case in this thread. There are about 50 of them. Notice I call my example seg1234567. This is a basic move. There is also seg123457. This trajectory doesn't have the middle constant velocity segment #4. My link shows one of the simplest cases.

Notice also, no one has challenged my claim after so many years. Anybody interested in this topic would have found this thread by searching the internet. There aren't many threads on this topic so this one would be easy to find.

BTW, just think of what the great mathematicians could do like Euler, Laplace, Fourier, Ramanujan, Gauss, Lebnitz, Newton, Riemann etc if they had the symbolic software and computing power we have today? The could do wonders if they didn't use the computers to waste time playing video games.

Time for a game of Starcraft.
 
Originally posted by Peter Nachtwey:

BTW, just think of what the great mathematicians could do like Euler, Laplace, Fourier, Ramanujan, Gauss, Lebnitz, Newton, Riemann etc if they had the symbolic software and computing power we have today? The could do wonders if they didn't use the computers to waste time playing video games.

Time for a game of Starcraft.

Now THAT'S funny!!

What Ramanujan really needed was another 30 years. That dude got cut short.

Keith
 
I think I broke it

I used one of my 35 test cases. The Ojet target generator gave me an out of bounds error.

View attachment 50568
Since this is an fairly old but interesting thread i might be a bit late in this conversation :)
This solution isn't time optimal i think. In the first deceleration part the acceleration is decreased to zero and increased again in the acceleration part for the same direction. Why ?
 

Attachments

  • test.jpg
    test.jpg
    72.6 KB · Views: 19
Last edited:
@WilliButz, I can figure out what the bottom 3 graphs are but not the green line one.
It would really help to know the command given and what the limits are.
If looks like the position overshot 0, which I am assuming is command position, and then the motion back tracks to 0.
This is not a jerk limited move.

Sometimes the motion controller is told to move to a position that it has just passed or is about to pass so it must slow to a stop and move back.
 
@WilliButz, I can figure out what the bottom 3 graphs are but not the green line one.
It would really help to know the command given and what the limits are.
If looks like the position overshot 0, which I am assuming is command position, and then the motion back tracks to 0.
This is not a jerk limited move.

Sometimes the motion controller is told to move to a position that it has just passed or is about to pass so it must slow to a stop and move back.
The commands and constrains are taken from your example in #6.
The graphs are (from top to bottom) : position, velocity, acceleration and jerk.
The only difference to your solution is that at the reversing the acceleration is not zero.
The below graph should be similar than the one you used in #6.
 

Attachments

  • test2.jpg
    test2.jpg
    71.4 KB · Views: 11
Last edited:
Now I see. This is one of my test examples where a command is given on-the-fly. The position is moving too fast to slow down in -0.5 given the lower deceleration rate so it over shoots by decelerating at the decelerate of 100 pu/s^2 until stopped then accelerates back towards 0.

This problem wasn't meant to test the time optimal feature. It was meant to test giving commands where the position must over shoot and then come back. It tests the state machine. A time optimal solution would not come to a complete stop when turning around.
Is this your target generator? If so you are doing better than most.
 
Last edited:
Now I see. This is one of my test examples where a command is given on-the-fly. The position is moving too fast to slow down in -0.5 given the lower deceleration rate so it over shoots by decelerating at the decelerate of 100 pu/s^2 until stopped then accelerates back towards 0.

This problem wasn't meant to test the time optimal feature. It was meant to test giving commands where the position must over shoot and then come back. It tests the state machine. A time optimal solution would not come to a complete stop when turning around.
Is this your target generator? If so you are doing better than most.
Yeah, its mine or better the company i worked for. It was developed to change the motion constrains on the fly, but the moves always ended w/ zero velocity and acceleration.
It worked perfekt for our needs, but i never did trillions tests on it :cool:.

My approach to solve the problems was different than yours. If needed, predeceleration phase(s) were added and the 7(6) segment trajectory was solved by approximation. 60 axes in a millisecond cycle time were achieved w/o any problems.

Since i am retired i work for fun on a solution nonzero velocity and acceleration endpoints.
Second problem i work on is time syncronisation on multiple axis, some more problems poped up :)
 
@WilliButz, there is another thread where cheeco and I discuss the motion profile from hell. Basically one specifies a jerk and then makes a short move from any position, velocity and acceleration to any position velocity and acceleration. The solution took both of us years to solve. Mostly due to frustration. One can use Mathematica and get a solution but it isn't useable on a motion controller that must do these calculations quickly.
I will see if I can dig it up. The move must be short so the commanded acceleration and velocity are never reached. Basically, there are 3 3rd order segments. checco works for ESA, European Space Agency. I am retired too. I used to own half of Delta Motion formerly Delta Computer Systems.
Now I need to find the "problem from hell"
 

Similar Topics

Hey guys I'm looking for a online calculator/chart generator that will allow me to insert high and low values for variable "A" and high and low...
Replies
2
Views
5,411
I'm trying to verify a project with a PLC. The Transfer Setup menu item is grayed out and every time I click Verify with PLC, I get an error...
Replies
1
Views
21
Hi. I’m trying to upload program from existing PLC S7-1200. Create new project in TIA v15.1 then upload. After upload successfully, go online but...
Replies
5
Views
218
Does anyone know of a way to detect if someone is online with the controller in ControlLogix (from logic) I'm thinking that maybe there is a CIP...
Replies
7
Views
377
Got a VIPA 315-2AG23 that i try to go online with but can't seem to make it work through a network. I can go online if i'm plugged directly in the...
Replies
4
Views
268
Back
Top Bottom