LinuxCNC S-Curve Accelerations

More
24 Feb 2023 11:57 #265223 by Grotius
In grotius' approach, the jerk is specified as a "dv" value which decides the change in velocity during which the jerk limitation is applied. It does not specify the jerk value directly.

Using "dv" delta velocity = ve-vo.

I had to decide how to specity the curve. In the past i also used a 0-100% curve power value.

Dv represents the curve's velocity steepness,
or determines how much of t2 linear period is
represented in the curve acc period t1,t2,t3. aka dcc period t5,t6,t7
Dv is the delta velocity for a motion from 0 acc to max acc (2*a), back to 0 acc.

The "jm" is then a constant value for all movements of the joint.
This results in a more predictable machine movement.

Where "ct" is curve time.

ct=(ve-vo)/a;
ct=dv/a;

as=2*a;
jm=(2*as)/ct;
I suggest that the topic synchronisation, look ahead, blending belongs to the path planner?

We need a good approach for look ahead and blending etc. And it's almost time to get started
with this.
The following user(s) said Thank You: Darium

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

More
24 Feb 2023 11:58 #265224 by rmu
Replied by rmu on topic LinuxCNC S-Curve Accelerations
automata, for me, the whole topic is ill-defined and arbitrarily complex depending on what you include (>3 joints, kinematics, blending, ...).

Maybe limiting jerk in tangential direction is a worthy improvement. I even did some experiments in linuxcnc.

rodw, AFAIK that is exactly what current TP does, it even optimizes blending arcs and feedrate to stay within G64 and machine acceleration limits.

I have no workable ideas regarding path blending nor do I know anything about 5-axis machining.

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

More
24 Feb 2023 12:13 #265227 by rmu
Replied by rmu on topic LinuxCNC S-Curve Accelerations

For paths that are continuously changing direction like circles or nurbs OR any machine with non-trivial kinematics, the only viable method to limit the jerk on joints would be to sample the path at some small length and check for velocity acceleration and jerk constraints at those points.
-automata

Checking the path is trivial, but that doesn't really help IMO.

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

More
25 Feb 2023 12:04 #265316 by andypugh
I watched a fascinating Youtube video about the continuity of splines  
At one point she shows how to achieve G3 continuity by solving a matrix for the desired boundary conditions. 

It set me to thinking if the same approach (and, in fact, the same equation) would work expanded to 9 dimensions and with the boundary conditions being limited jerk. 

1) Solve the matrix for the machine limits (probably needs to be re-solved every time feed-override changes!) 
2) Use the equation to calculate the path between G-code waypoints
4) Profit. 

I haven't even got as far as testing that the equation works in 3D yet, though. 

But, in any case, the video is excellent, I watched all of it without noticing the length until the end. 
 
The following user(s) said Thank You: tommylight, Grotius, Darium

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

More
25 Feb 2023 20:08 #265340 by Grotius
Hi Andy,

I have seen this video a few month's ago. It's interesting. Ultimate she want's to design her own spline algo.

Where you able to write some code in c or c++ for the spline example's in the video?
I have a github 3d spline repo containing a cubic spline with vel, acc profile. Maybe this is usable for background info.
This spline works excellent in opencascade, however i have no clue how to use the vel and acc of this spline output?

Today i made a github repository for the current scurve code. github scurve

Currently trying to code a 10 joint planner. 1 joint for interpolating the path, 9 joints for each motor xyzabcuvw.
If this works a bit. I will take a look at mr. Garret's comments for integrating.




 

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

More
26 Feb 2023 01:31 #265376 by Grotius
Hi,

I got the planner running.  It has 2 buttons on the right side of the picture. The left side is unused in this example.
The path has 3 xyz waypoints, using acs (acc at start) ace (dcc at end), vo, ve.

Warning: Spoiler!


The waypoints are at the blue vertical lines.
Hmm interesting. It's interpolating over xyz now.

Next i will add scurve xyz joints to try to follow the interpolated path. Then we try to trigger a following error by
setting on of the joint's vm a little lower.

The following user(s) said Thank You: rodw

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

More
27 Feb 2023 21:59 - 27 Feb 2023 22:00 #265521 by Grotius
Hi,

A little update.

Last post:
Next i will add scurve xyz joints to try to follow the interpolated path.

This is not happened yet. I have been thinking a while about this.
In the past i used a stepgen for this, this worked fine for my steppers.
But the stepgen is based on a linear vel system. I was thinking maybe
make a :

- scurve stepgen
- scurve pid

In the mean time, the planner is able to interpolate 3d lines and 3d arcs.

Warning: Spoiler!


To hook op lcnc, The connection to gcode input can be made now.
A converter from G2,G3 IJK to arc a waypoint is needed for the scurve planner.
This is needed because the planner uses 3d arcs, and lcnc uses planes.

Next thing on the list is try to code motion reverse, negative and positive adaptive feed.
And mdi input like goto zero etc.

The code is updated, but excedentally i deleted the readme... updated code
Last edit: 27 Feb 2023 22:00 by Grotius. Reason: removed empty spaces.
The following user(s) said Thank You: Darium

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

More
06 Mar 2023 15:01 #265955 by automata
Hi,
Any update on the topic? I am eagerly watching this topic and can help with development and testing if needed.
-automata
The following user(s) said Thank You: tommylight, Grotius, Darium

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

More
06 Mar 2023 20:48 #265976 by Grotius
Hi Automata,

Last day's i reviewed the  engine code. Fixed a few tiny typo's.
An sich i am quite happy with the engine code so far, i have to finish the function : process_curve(..)
This function processes the scurve scenario's.

I made the project structure a little different. It's now divided in dir's with their purpose.

Now working on a planner to look if
  • pause
  • resume
  • vm interupt
  • waypoints
  • motion reverse
will work. This code is dirty, raw and not finished,
but you can play with it already.

Yesterday i thought how to get rid of the vm sampling, to get a better interupt performance.
I made a line-line intersection of 2 scurves to get a new vm value.
Hmm, this was not going to work. This works only for full curves. Otherwise this would be perfect.

To get rid of the vm sampling, we could try to draw a spline to a few scurve points, to get a new vm value.
But then you have to find the spline y limit. This also is time consuming. If this should take 0.01 ms it's ok.

What you could check is mr. Garrets notes in this thread. Test if his notes setup works.
Check if you can do improvements or anything to the code. Maybe make a test dir in the sc_project.
You could make a hal interface, then scurvelib can be used stand alone. We need a nice readme file for github etc.

You could check this cubic spline lib. It has mutiple files. And is a 3d spline with acc and vel profile.
I don't know how to use the acc and vel results. However, the spline works perfect with opencascade.
Maybe this spline is usable for building scurve's.






 
The following user(s) said Thank You: Darium

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

More
08 Mar 2023 00:31 #266085 by Grotius
Hi,

A little update.

Currently finalizing the planner code. A few pause, pause-resume things to solve. Most of it is working now.

I think we get this working soon.



 
The following user(s) said Thank You: wellingtoncsouza, Darium

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

Time to create page: 0.161 seconds
Powered by Kunena Forum