LinuxCNC S-Curve Accelerations

More
5 years 4 months ago #212112 by arvidb
Replied by arvidb on topic LinuxCNC S-Curve Accelerations

Grotius wrote: Hi Arvidb,

Do you have an idea how the lecture dealing with this "kink" in the curve, you would expect researchers have dealed with this
before?

I haven't been able to find an existing, published solution for this problem, no. As I've said before, jerk-limited planning with inital velocity and acceleration state is a surprisingly difficult problem to solve!

Grotius wrote: It's quite hard to imagine when the velocity curve looks ok and the acceleration curve looks ok.

Since you calculate the displacement incorrectly, your nice velocity and acceleration curves don't match the true velocity and acceleration of the displacement curve. You are getting fooled by your own diagrams!

Grotius wrote: There could be a kink in the displacement curve in some "exotic" cases.

No. Since a kink in the displacement curve means infinite acceleration, a jerk- (or acceleration-)limited planner will never have any such kinks, no matter how "exotic" the case is. By definition.

Grotius wrote: [edit] After some experimenting it occur's when intitial and or end velocity is not zero.

And that this "kink" is in fact a infinite acceleration stage. When using a 20Kw servo it could result in a machine shock. :pinch:

Indeed. I'm glad you see the problem now.

Grotius wrote: Is it a idea to avoid this "kink" with a algoritme?

Well, that's the whole idea, right? To create a jerk-limited planner?

Grotius wrote: Are you able to implement your example in the qt code?

What example are you talking about? But no, I have my hands full with trying to get my own code working. :)

Please Log in or Create an account to join the conversation.

More
5 years 4 months ago - 5 years 4 months ago #212116 by Grotius
Replied by Grotius on topic LinuxCNC S-Curve Accelerations
Hi Arvidb,

As a result of our conversation i will plan a date to review my code.

You are getting fooled by your own diagrams!
After the review i will report my conclusion.

In the mean time my current scurve implemenation works nice with my robot program development.
On top of the scurve, the program has a stepgen backend.
This stepgen backend is the insurance there will be no machine shock.
If there is a "kink" in the curve, the displacement shock will be absorbed by the stepgen component.
Maybe that's the reason i never mentioned this.

So far so good. I wish you a happy coding !
Last edit: 5 years 4 months ago by Grotius.

Please Log in or Create an account to join the conversation.

More
5 years 4 months ago #212287 by TheRoslyak
Replied by TheRoslyak on topic LinuxCNC S-Curve Accelerations
Hi everyone
If you have a question: Which algorithm to choose?
I can search in source codes of the Balt-System of this function.
At the bottom, I have attached a description of this function for a regular user. (but only in Russian) If it will speed up the development, I can look for implementations in the source codes.
All the mathematics, formulas and methods have already been tested over the years)
Attachments:

Please Log in or Create an account to join the conversation.

More
5 years 4 months ago #212304 by arvidb
Replied by arvidb on topic LinuxCNC S-Curve Accelerations
Unfortunately I cannot read russian, but looking at the diagrams in the pdf they only display "symmetric" curves, i.e. point-to-point moves with zero initial velocity and acceleration. Such moves aren't very difficult to handle, it's the nonzero initial conditions of jogging that makes things so difficult.

Also, LinuxCNC is GPL licensed so unless Balt-System's source code is open source we cannot use it. Of course, if you can read the code and learn from their algorithms and explain them here, without posting any code, then that would be interesting.

Please Log in or Create an account to join the conversation.

More
5 years 4 months ago #212316 by TheRoslyak
Replied by TheRoslyak on topic LinuxCNC S-Curve Accelerations
Of course I wasn't going to give all the source code. Only needed part.

Please Log in or Create an account to join the conversation.

More
5 years 4 months ago - 5 years 4 months ago #212355 by Grotius
Replied by Grotius on topic LinuxCNC S-Curve Accelerations
Hi,

Today i made new, fresh code based again on this paper : github.com/grotius-cnc/S-curve-motion-pl...ng/blob/main/Ch5.pdf
The result now looks promising.

The displacement curve (purple) has no "kinks" when using initial and or end velocity commands.



And a video : user-images.githubusercontent.com/448801...3e4-92524c2a02c2.mp4
Qt project in development stage, but functional : github.com/grotius-cnc/S-curve-motion-pl...g/releases/tag/1.0.2
Attachments:
Last edit: 5 years 4 months ago by Grotius.
The following user(s) said Thank You: tommylight, robins, Shu, roland

Please Log in or Create an account to join the conversation.

Time to create page: 1.268 seconds
Powered by Kunena Forum