- Posts: 459
- Thank you received: 158
LinuxCNC S-Curve Accelerations
- arvidb
- Offline
- Platinum Member
-
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: 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?
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: It's quite hard to imagine when the velocity curve looks ok and the acceleration curve looks ok.
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: There could be a kink in the displacement curve in some "exotic" cases.
Indeed. I'm glad you see the problem now.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:
Well, that's the whole idea, right? To create a jerk-limited planner?Grotius wrote: Is it a idea to avoid this "kink" with a algoritme?
What example are you talking about? But no, I have my hands full with trying to get my own code working.Grotius wrote: Are you able to implement your example in the qt code?
Please Log in or Create an account to join the conversation.
- Grotius
- Offline
- Platinum Member
-
- Posts: 2419
- Thank you received: 2349
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 !
Please Log in or Create an account to join the conversation.
- TheRoslyak
- Offline
- Elite Member
-
- Posts: 238
- Thank you received: 37
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)
Please Log in or Create an account to join the conversation.
- arvidb
- Offline
- Platinum Member
-
- Posts: 459
- Thank you received: 158
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.
- TheRoslyak
- Offline
- Elite Member
-
- Posts: 238
- Thank you received: 37
Please Log in or Create an account to join the conversation.
- Grotius
- Offline
- Platinum Member
-
- Posts: 2419
- Thank you received: 2349
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
Please Log in or Create an account to join the conversation.