LinuxCNC S-Curve Accelerations
- rodw
-
- Away
- Platinum Member
-
- Posts: 11646
- Thank you received: 3919
grandixximo and his team get on with his coding. Too much navel gazing. where are the machines? where are the beautiful surface finishes? where are the accurate parts and their measurements? That's what most of us want to see.
Please Log in or Create an account to join the conversation.
- ihavenofish
- Offline
- Platinum Member
-
- Posts: 963
- Thank you received: 248
I really think this conversation is going around in circles. Lets ust step back and let
grandixximo and his team get on with his coding. Too much navel gazing. where are the machines? where are the beautiful surface finishes? where are the accurate parts and their measurements? That's what most of us want to see.
I'll agree with that. Proof is in the... proof.
Side diversion, "I" just vibe coded a (very) basic control simulation with jerk limited motion including g64. That's the first actual success I have had with it - prior attempts gave me nonsense trajectories.
How this can be applied to linuxcnc... not sure yet. But it's neat.
Attachments:
Please Log in or Create an account to join the conversation.
- Aciera
-
- Offline
- Administrator
-
- Posts: 4637
- Thank you received: 2058
- Velocity planner with jerk limitation for G61 (exact stop)
- Velocity planner without jerk limitation for G64 but with bezier path blending
Although I'm not clear on how much easier bezier path blending becomes without the jerk limited velocity planning.
At the end of the day it is clearly up to the people donating their time to decide what they want to achieve.
Please Log in or Create an account to join the conversation.
- endian
-
- Away
- Elite Member
-
- Posts: 288
- Thank you received: 95
I think that user should take in mind and just select active motion strategy by type of job ... tapping and threading is great to hase at rigid solid trapeziodal thingy ... but probing from my point of view has to be done outside of servo-thread at hardware layer of servo FPGA to get exact position .. no time or cycle lagging present@ihavenofish I think there's some confusion here worth clearing up, you're right that filtering (like Tormach does) gives you unpredictable deviation, the path ends up wherever the filters spits out, that's not what we're after.
But I think you're mixing up two different things, how the machine speeds up and slows down is jerk control, whether we cut corners is G61 vs G64, these are separate knobs, if you want perfect path following, use G61, the machine will stop at every corner, follow the exact line, no deviation, with proper S-curve planning it'll do that smoothly instead of jerking around, you get accuracy, you give up speed, fair trade.
G64 P is for when you say "I'm okay with cutting corners by up to this much, just keep moving." That's already how LinuxCNC works today, S-curve doesn't change that, it just makes the motion smoother while respecting whatever tolerance you set.
Why Beziers instead of arcs for blending?
Arcs are a 2D thing. Works fine for XYZ, but what's an "arc" when you've got 9 axes moving at once? It doesn't really make sense.
Beziers are just smooth curves that work in any number of dimensions.Also arcs have constant curvature, so when you enter and exit a blend there's a sudden curvature change, the TP deals with this by speeding up and slowing down, which is why you see velocity bobbing up and down through corners, Beziers can match curvature at the transitions, so you get steadier speed through the blend, And on top of that, arcs need sin/cos every servo cycle while Beziers are just a handful of multiplies and adds, In a tight loop running 1kHz+, that matters. Same tolerance as before, just a better curve to fill it with.
This isn't like the clothoid thing, we're not trying to get fancy with exotic geometry, just trying to get smooth motion that respects whatever path constraints you set, does that make more sense?
Just to be clear, the only reason I'm talking about deviation is because S-curve has to work in all modes, including G64 P where the user has asked for corner blending, s-curve isn't only for G61 exact stop, and there will always be a fallback to trapezoidal via HAL pins, some operations like threading, tapping, and probing need the tighter timing that trapezoidal gives you. You can hook planner_type to an M-code and switch modes in your G-code when needed.
change in CCS can affect mainly finishing turning paths and there it should be correct by postprocesor itself or user ... during slow finish use trapeziodal or 2. option (solved by hal layer)
filltering as simulations of jerk limiting at servo layer is highway to hell ... during the finishing paths mainly at turning there you will need to increase regulator parameters from the controller to servo driver rather you can forgot at product tolerances
thing must be solved step by step .. phase 1. is really big deal for everybody .. roughing with high speed and low jerk with more laggy tolerance during high mass movement is better ... some jerk during finishing with clear smooth finish at low speed is acceptable for all ... we have regulators for that
I think re-editing the stuff which was coded in oposite of common avaible tp is not a right way ... there we are facing of problem a shiny new stp.c
Please Log in or Create an account to join the conversation.
- Aciera
-
- Offline
- Administrator
-
- Posts: 4637
- Thank you received: 2058
Too much navel gazing. where are the machines? where are the beautiful surface finishes? where are the accurate parts and their measurements? That's what most of us want to see.
Maybe the community and the people so eager to have these features could donate some of their time to test and provide feedback? 3000$ is nice but it is not going to be much compensation (even if it were in cash) for donating all the work required here.
Please Log in or Create an account to join the conversation.
- ihavenofish
- Offline
- Platinum Member
-
- Posts: 963
- Thank you received: 248
Too much navel gazing. where are the machines? where are the beautiful surface finishes? where are the accurate parts and their measurements? That's what most of us want to see.
Maybe the community and the people so eager to have these features could donate some of their time to test and provide feedback? 3000$ is nice but it is not going to be much compensation (even if it were in cash) for donating all the work required here.
This is tricky. A dev should have hardware on hand which I know is hard, but there's also no way I'm installing anything on my machine to test that I don't know already works 100%. A crash at full speed can cause thousands of dollars in damage (ask me how I know).
Double edged catch 22. I appreciate the dilemma.
(side diversion I added g64 beziers to my vibe coded planner. First approximated ones which caused accel violations, and then real ones which seem to work right. I will make a new thread for it to not clog this one up. The source might be helpful to the people coding the "real" one, not sure)
Please Log in or Create an account to join the conversation.
- Aciera
-
- Offline
- Administrator
-
- Posts: 4637
- Thank you received: 2058
@grandixximo
If Rob Ellenberg is offering advice/cooperation I would not hesitate to accept it. Having written the current planner you'll likely get more sound information (and even opinion) )there in one email than on 40 pages of forum thread. Grotius flatly refused which was a great mistake but I think our clothoid approach was likely doomed to fail anyway.
Please Log in or Create an account to join the conversation.
- grandixximo
-
Topic Author
- Online
- Premium Member
-
- Posts: 113
- Thank you received: 134
Yes, I think Robert and YangYang will have much to discuss. I will probably mostly be on the sidelines, help YangYang with the English mostly, I think he'll do better than he thinks.
@ihavenofish
spikes you see on the scope are ddt of ddt of ddt, planner_type 1 has been running on real machines, it is not as expetimental as you might think, far from perfect I can agree, I can understand that you don't want to put your hardware on the line.
Not to worry about, I have hardware, you can see at www.aitalmac.com
Anyhow thank you for your inputs, have give me lots to think about!
Please Log in or Create an account to join the conversation.
- automata
- Offline
- Premium Member
-
- Posts: 94
- Thank you received: 70
On the topic of path modification v/s jerk limitation, you cannot think about one as separate from the other.
Imagine a path that has lines and tangent arcs i.e., a straight line in Y axis followed by an arc in the XY plane. Right before the transition point, the velocity and acceleration in the X Axis are 0. At the transition point, you can assume the velocity on the X axis will start increasing in a sinusoidal fashion from 0 whereas the acceleration will start at a high value. So even if the velocity is continuous, the acceleration can not be made continuous which will lead to a high jerk due to the acceleration discontinuity.
To remedy the acceleration discontinuity, one method is to come to a full stop at the transition. Another method is to add a transition i.e., modify the path between the two segments which is C2 continuous (second derivative continuous) at both the ends where it intersects the segments. Examples are clothoids, beziers, splines etc. as proposed by multiple research articles on this topic.
The grotius clothoid solution is one step in the right direction. IT will require to add a new geometry to the the motion queue called clothoid in addition to addline and addarc functions that are already being used. Clothoids and some splines are parameterizable by their path length and so can be used much easier in trajectory planning.
In essence, the tanjential jerk (to the path) can be managed by changing the trajectory execution timing parameter whereas the normal jerk can be reduced by changing the path (including a small deviation).
-automata
Please Log in or Create an account to join the conversation.
- Aciera
-
- Offline
- Administrator
-
- Posts: 4637
- Thank you received: 2058
Not to worry about, I have hardware,
Oo, no kidding. Not much use for a giveaway CNC mill there.
Please Log in or Create an account to join the conversation.