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^4So 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)