acceleration curves

Post anything you want to discuss with others about the software.

acceleration curves

Postby Robertspark » Sun Jul 30, 2017 5:15 pm

presume UCCNC + UC controllers use trapezoidal acceleration profiles.

Have you thought about looking at S-curve acceleration profiles to allow for higher peak acceleration, and lower jerk at changes in acceleration?
https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained
Robertspark
 
Posts: 1892
Joined: Sat Sep 03, 2016 4:27 pm

Re: acceleration curves

Postby ger21 » Sun Jul 30, 2017 7:59 pm

I've been waiting for S Curve acceleration for years. There's an old test version of Mach3, called Tempest, that does it. I've used it in the past, but it's features were limited.

S-Curve accel makes a big difference on large, fast machines.
Gerry
UCCNC 2022 Screenset - http://www.thecncwoodworker.com/2022.html
ger21
 
Posts: 2714
Joined: Sat Sep 03, 2016 2:17 am

Re: acceleration curves

Postby Robertspark » Sun Jul 30, 2017 8:17 pm

Probably help with plasma then (mine on 20mm 5htd steel wire belts)

How big are your machines / what is you machine like Gerry? (I'm thinking mechmate ish?)
Robertspark
 
Posts: 1892
Joined: Sat Sep 03, 2016 4:27 pm

Re: acceleration curves

Postby cncdrive » Sun Jul 30, 2017 9:18 pm

Rob and Gerry,

Yes, we thought about S-curve accelerations, it is basicly planned to be implemented sometime.
But it requires so much change in the trajectory planner that we will basicly have to recode it from the grounds up.
We estimated that it could be coded and tested in 2-3 months.
Our plan is that we will try to get to a point around at the end of the year where we can stop/finish other developments on the API and new hardwares which require API develpments and could then start making the change in the planner.
We also have other plans to further improve how the trajectory planner and path optimiser works, because we already see that we have reached the limits with the one currently implemented and that the only way to further improve it is to rewrite it based on the experiences we have and the new ideas.
So, we already have this planned, but it will take some time for us to get there.
cncdrive
Site Admin
 
Posts: 4887
Joined: Tue Aug 12, 2014 11:17 pm

Re: acceleration curves

Postby ger21 » Sun Jul 30, 2017 9:20 pm

The one I'm building is 4x8, but has 3000mm X rails, and 1700mm Y rails.
X and Y drive will be custom "servobelt", driven by 400w ac servos.
The design goal has always been as close to 1G accel as I can get, but without S Curve, I may have to greatly reduce it. should be able to do 15+m/min rapids. Hopefully I can start assembling it this winter. Have everything but the two X axis servos.
Gerry
UCCNC 2022 Screenset - http://www.thecncwoodworker.com/2022.html
ger21
 
Posts: 2714
Joined: Sat Sep 03, 2016 2:17 am

Re: acceleration curves

Postby ger21 » Sun Jul 30, 2017 9:21 pm

Awesome news.
Make sure to implement G41/G42 while your at it. ;)
Gerry
UCCNC 2022 Screenset - http://www.thecncwoodworker.com/2022.html
ger21
 
Posts: 2714
Joined: Sat Sep 03, 2016 2:17 am

Re: acceleration curves

Postby cncdrive » Sun Jul 30, 2017 9:26 pm

Gerry, OK, but the G41/G42 is on a higher level, it will be implemented on the UCCNC side not on the API,
it is on a higher level, so I'm just saying it is not an API level development, but a UCCNC level one.
So it will be added separately, independently of the API development.
cncdrive
Site Admin
 
Posts: 4887
Joined: Tue Aug 12, 2014 11:17 pm

Re: acceleration curves

Postby Robertspark » Mon Jul 31, 2017 5:58 am

That is great news, thanks for the insight into the future development plans
Robertspark
 
Posts: 1892
Joined: Sat Sep 03, 2016 4:27 pm

Re: acceleration curves

Postby Derek » Mon Jul 31, 2017 10:06 am

This makes me happy as well. I tried out the Tempest planner years ago and it was a huge improvement on my big router. Unfortunately it as abandoned.

Derek
Derek
 
Posts: 341
Joined: Mon Sep 05, 2016 9:57 am

Re: acceleration curves

Postby Robertspark » Sat Oct 07, 2017 12:46 pm

I was going to post a new thread, but thought about bringing this one back to life as the topic is related.
_____________________________________________________________________________________________________________

I've been thinking a little more about jerk ( also known as jolt apparently ), I was hoping that someone may be able to correct me with the math of have a think if my approach is correct, this may also lead to an easier to achieve programable acceleration curve profile (and it may have knockon effects with external THC { Neuron ?? } ).

The focus on "jerkless motion" is always on the ellusive and how it relates to the S-curve acceleration. Advocates and opponents of trapezoidal acceleration always like to say that trapezoidal ( constanct ) acceleration leads to an infinate amount of jerk.... but I was wondering if this really was the case? Especially when conidering stepper motors which are more common amoungst the the hobbist these days than more expensive servo motors (or closed loop steppers ).

for those that don't know:
velocity is considered to be a constant (distance / time ), where velocity changes this rate of change is acceleration ( velocity / time ) { distance / time ^2 }, where acceleration changes this rate of change is jerk {or jolt } (acceleration / time) { distance / time ^3}

When you start out with CNC {or at least my experiance} its like an evolution, and you can probably assess where you are by considering the following points
you start off chasing velocity .... "how fast can my machine go" .... "how fast does everyone elses machine go" ... " how do I get mine to go faster " etc..... this is the first order of motion velocity.
then you mature a little.... and you start chasing acceleration, realising its not all about how fast it goes, but how quick it gets there .... this is the second order of motion acceleration
then (where I am now) you think you're all grown up ... and you start to realise that your machine is swaying because of all that acceleration you put into it .... this is the third order of motion jolt

.... I've yet to progress to jounce and above ( aka snap crackle pop)

In my attempt at understanding this practically with regards to CNC + stepper motors.
velocity is a constant pulse trane of steps
acceleration is the rate of pulse width change in steps from one constant pulse trane to another
and in the case of the "common" constant acceleration (trapezoidal) acceleration / motion profile
jerk is the instant change from one pulse width to the next

I think you also need to consider what your motor setup is..... and I can only talk about my own limited experiance of a cnc plasma and small router table.

In my case, my X &Y+Y' on the plasma are set as follows:
step resolution: 20 steps / mm {0.05mm / step}
velocity: 10200 mm / min {170 mm / sec}
acceleration: 3000 mm/s^2

My X axis is not good for plasma and I'm in the process of designing + building something much faster with two optional drive systems (belt {same as x+y} OR 10mm pitch acme thread), but current setup is:
step resolution: 200 steps / mm {0.005mm / step}
maximum velocity: 2400 mm / min {40 mm/ sec}
acceleration: 600 mm / s ^2

The motion of jerk can be quite pronounced on my x and y axis, so it's a good way to start to quantify jerk.

My assessment with regards to cnc and steppers is you need to break the motion down into when does it actually start.

So, we have a stepper motor which goes in my case from 0 m/sec and accelerates at 3000mm / sec {3m/sec or ~0.3G} to any velocity I programme via the feedrate upto the maximum ~10 m/min.

breaking this down into steps, we go from 0 steps / sec to 3400 steps / sec
linear acceleration tells us that the time that it takes for this to happen is ~0.0566r Sec, and the distance this occurs in is 4.81mm (96 steps)

given the acceleration is linear (3m/s/s), the jolt (jerk) will occur at the time of the very first (and last) step where the linear acceleration kicks in.

To quantify this, we know that the acc is 3m/s/s and the step distance is 0.05mm, hence we can calculate the time that it takes between the first step pulses will be 5.773 mSec

So the Jolt is calculated as Change in Acceleration / Time => 3m/s/s / 5.773 mSec = 519.7 m/s^4

So the question is, is this good or bad??? Can we do something to improve this number and make it a smaller number??? What is an acceptable number ???
I've not been able to find what an acceptable number is, or what defines "smooth motion" with respect to a change in acceleration.
I found a small paragraph on wikipedia jerk page that indicates:
It is reportednthat most passengers rate a vertical jerk of 2.0 m/s3 in a lift ride as acceptable, 6.0 m/s3 as intolerable and for a hospital environment 0.7 m/s3 is suggested.


Then I began to wonder if my problem was too few steps / too course a pitch?
So say I took my 20 steps / mm and made it 200 steps per mm (same as my Z axis) and kept the acceleration the same (3 m/sec ~ 0.3G {which seems to be the acceptable target for commercial CNC plasma cutting machines, hence may not be an unrealistic target})

step distance is now 0.005mm, and the time for the first step at 3m/s/s acceleration is 1.826 mSec.
So the jolt this time is 3m/s/s / 1.826mSec = 1643 m/s^4..... a 3 fold increase in the size of the jolt being experianced...... hence in order to achieve the same size jolt if I increased my step resolution I would therefore need to reduce my acceleration by a factor of a little over 3 with the same linear interpolation profile to limit my amount of jerk to have the same effect.
____________________________________________________

This then got me wondering.... I know everyone thinks of the S-curve profile as a nice sinosodal S shapedcurve where the acceleration is low to start, high in the middle and tapers off in the end..... the optimum curve.....

Given we are dealing with the lower end of CNC, I was wondering if there was a way a factor could be added to control the amount of acceptable jerk, and to allow us to set high acceleration values but change the amound of acceleration at the start and the end of the profile to limit this jerk.

Whilst this sounds complicated think of it another way..... all we are dealing with is time ...... stepper pulse time ..... the time between pulses, so if we changed the first step pulse from say (as my first example above) from being 5.773mSec between pulses to double that, the distance between the step would remain the same (0.05 mm), and the acceleration for the first step would become 750 mm /s / s, and the jolt for the first step would become 64.9 m/s^4,
then if we have the second step time equal to the 3000mm/s/s acceleration time, the jolt magnatude would now only be ~390 m/s^4 (which is a 25% reduction in magnatude ...... just by simply doubling the time of the first step)

Hence if the original acceleration was acceptable (and it's associated jolt) it may now be possible to increase the acceleration back up to the original degree of jolt

Basically I was wondering to CNC drive, do you think such a change could be done within the planner?

What we are looking at here is allowing the first step to be double it's current pulse width in terms of time which appears to be a relativly "minor" change to bring about the possiblity of increasing the acceleration even higher with no increase in jerk or jolt?

I must admit I've not thought about the other end of the curve where the acceleration needs to drop to zero when the target velocity has been attained..... or how we can compensate for this extra "step" {which is actually just a longer pulse between steps).

Sorry for the long post, hopefully some of my thoughts above are right

(it would be nice to know what acceleration and step resolution others are running on mills, plasma, routers and lathes etc in order to try to quantify this jerk or jolt number)
Robertspark
 
Posts: 1892
Joined: Sat Sep 03, 2016 4:27 pm

Next

Return to General discussion about the UCCNC software

Who is online

Users browsing this forum: No registered users and 17 guests