LinuxCNC S-Curve Accelerations

More
6 years 2 months ago #177708 by grijalvap
github.com/synthetos/TinyG/wiki/Jerk-Con...led-Motion-Explained

I'm curios about this project they have jerk controlled motion.
can we learn about it and implement in Linuxcnc?
The following user(s) said Thank You: Aciera

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

More
6 years 2 weeks ago #186389 by arvidb
Speaking of "cases and corners" in a jerk-limited jog planner, here's an interesting one:

t = 0.0 s: User presses right -> machine accelerates axis in positive direction (v_max reached at t = 0.30 s).
t = 0.35 s (first vertical line): User presses left instead -> machine accelerates axis in other direction to bring vel towards negative.
t = 0.58 s (second vertical line): User releases button -> machine stops axis.

At t = 0.58 s, vel is still > 0, but acc is maximally negative. There's not enough time to jerk acc to zero before vel has swung negative. So to stop the axis without violating the jerk limit, its velocity must swing negative before returning to zero; although the button was released while velocity was positive, you can see the position actually retarding a bit before the axis stops:


Fun stuff! O__o
The following user(s) said Thank You: Shu

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

More
6 years 2 weeks ago #186463 by arvidb
I used a recursive algorithm and data structure to generate the plot above:

The "level" in the node diagram then corresponds to a certain polynomial degree: s3 is linear with respect to position, s1 & s5 are quadratic, and s0, s2, s4 & s6 are cubic in the example above.

The number of segments grows as a power of 2: 2^N-1 where N is the degree of the polynomial. So acceleration-limited motion is 2^2-1 = 3 segments, jerk-limited is 2^3-1 = 7 segments, snap -limited is 2^4-1 = 15 segments, and so on.

Just for kicks, here's a pop-limited (6th-degree, 63-segment) move generated by the exact same code, just fed with a longer limit vector (jerk = 5 m/s³, snap = 100 m/s⁴, crackle = 4000 m/s⁵, pop = 320000 m/s⁶):


:)

Now this only works because the move starts with no initial motion, and the length of the move is carefully selected, as is the ratio between the limits, so don't get your hopes up too high for a generic pop-limited jog planner!

Now that I think about it though, auto-selection of any limits above acceleration (like jerk) might not be a bad idea? Not many users will want to dig into the maths and physics to learn how to choose sane limits... They/we just want nice motion, right? :)
The following user(s) said Thank You: Todd Zuercher, tommylight, Shu, Nico2017

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

More
6 years 2 weeks ago #186465 by Aciera

They/we just want nice motion, right?


RIGHT!

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

More
6 years 2 weeks ago #186466 by arvidb

Aciera wrote: RIGHT!

LOL :lol:

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

More
6 years 1 week ago #186725 by Todd Zuercher
So how many chickens do we have to sacrifice to get it?

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

Time to create page: 0.083 seconds
Powered by Kunena Forum