THC accel/decel

If you have a question about the software please ask it here.

THC accel/decel

Postby stirling » Tue Jan 15, 2019 2:05 pm

Is there a way to turn off accel/decel on Z when under THC control? (Using V1.2047 and UC300ETH_5LPT)
UC300ETH_5LPT
Razordance DTHC
http://www.razordance.co.uk/THC.htm
stirling
 
Posts: 32
Joined: Mon Jul 23, 2018 12:54 pm

Re: THC accel/decel

Postby beefy » Tue Jan 15, 2019 10:21 pm

Ha ha, unbelievable timing on this question.

I've been knee deep in calculations regarding this matter, and the one thing I've realised is that Art (Mach3) may have had good reason for not applying accel/decel to THC moves.

At my set acceleration, my Z axis simply moves too far, even from a modest Z speed of 1500 mm/min and a THC update rate of 100 times/sec.

Take for example cutting of stainless with a Powermax 1250. The Finecut nozzles have a torch height of 0.25mm so you need very small adjustments of Z axis height. If the torch is currently moving down and the THC says STOP, the deceleration of the motor simply allows it to move way too far downwards.

I've just had info from a stepper drive manufacturer that any decent stepper motor could reach a speed of up to 2 revolutions per second without any acceleration. So if I set the accel to infinity in UCCNC that would mean I'd only be able to get a rapid speed of about 600 mm/min on my Z axis, which is way too slow for rapid moves.

Balazs would it be possible to add a feature to UCCNC to disable acceleration on THC moves only, so we could keep accel for normal Z moves but not have it applied on THC moves. Perhaps even better would be to have a separate accel setting for THC moves. That way the accel could be set faster, or could be set to "infinity" to effectively disable accel. Or even a separate accel setting plus a tickbox to completely disable accel.

On a sidenote these calculations have also made me realise that even if you have a completely independent external THC that controls the Z directly, it cannot make a stepper motor go faster / react faster than what it is mechanically capable of. At the end of the day a stepper still has accel/speed limitations for THC application.

Keith.
beefy
 
Posts: 449
Joined: Mon Sep 05, 2016 10:34 am

Re: THC accel/decel

Postby shad » Wed Jan 16, 2019 7:48 am

beefy wrote:On a sidenote these calculations have also made me realise that even if you have a completely independent external THC that controls the Z directly, it cannot make a stepper motor go faster / react faster than what it is mechanically capable of. At the end of the day a stepper still has accel/speed limitations for THC application.
Keith.

Yes, you right!
The performance of the any THC is tightly coupled to the lifter and motor characteristics.
The lifter screw pitch affects the lifter linear speed and the control loop gain when operating with arc voltage. The lifter friction and maximum torch weight affect the point at which the lifter will require a brake to maintain position. For these reasons, the motor and lifter characteristics are critical and must be tightly controlled.
In any case THC must control motor using Acceleration/Deceleration. Great, if you have a two acceleration values - for automatic moves and for arc control mode.
But main thing - Z axis speed must depend from arc voltage error between set point and real value. This provide PID controller with shortest cycle time as hardware allowed. For example Neuron sample arc voltage every 214 uSec and has a 1 mSec PID control main loop time.
-- Andrew
UC400ETH
UC300ETH-5LPT
NEURON Lite THC
http://neuroncnc.com/
shad
 
Posts: 332
Joined: Thu Sep 15, 2016 5:23 pm

Re: THC accel/decel

Postby stirling » Wed Jan 16, 2019 10:09 am

Art et al did indeed have good reason for not applying accel. It's the correct way to do it. ;)

Like you, I whack my Z accel up to something silly so that in effect it's instant. Of course (as you say) you then have to limit your rapid speeds to max THC speed which in turn is the max speed your Z motor can achieve without a ramp. At least THC then works properly though. It would be much better though if accel/decel was removed from Z when in THC. Then you could setup your Z properly for out of THC.
UC300ETH_5LPT
Razordance DTHC
http://www.razordance.co.uk/THC.htm
stirling
 
Posts: 32
Joined: Mon Jul 23, 2018 12:54 pm

Re: THC accel/decel

Postby Robertspark » Wed Jan 16, 2019 4:01 pm

stirling wrote:Art et al did indeed have good reason for not applying accel. It's the correct way to do it. ;)


Sorry I don't agree that not appling acceleration + deceleration is the correct way to do it.

I agree with Andrew.

shad wrote:In any case THC must control motor using Acceleration/Deceleration.


You need some acceleration and deceleration

The problem is people think of acceleration / deceleration as linear, where as in reality what we are talking about is varying the start and end of pulsetrane.

The "varying the start and end of pulsetrane" can had a beneficial effect because it WILL lead to higher attainable velocity.
That is the whole point of acceleration and deceleration (in the words of cncdrive "...its physics..." )

This varying the start and end of a pulse trane only needs to be by a very small amount (IMO) and it will benfit the THC. The distance traveled by the THC is also very small (but fast)

Say you have a Z axis feedrate of 3m/min
Your Z axis has 10mm / turn, and your stepper motors are set for 10micro steps.

The step size is 0.005mm (200 steps per unit)

The pulse trane for a feedrate of 3m/min (50mm/sec) will be 10khz
so the time per step will be 100uSec.

So you are telling the stepper drive to accelerate the stepper motor and all its connected load from standstill to 50mm/sec in 100uSec which will be an acceleration of 500,000 mm/sec/sec (~51g) (it will NEVER be infinite with a stepper motor as every step has a time per step).

Jolt / Jerk will therefore be 5,000,000,000 mm/s/s/s given the stepper motor HAS to accelerate from ZERO to 50mm/sec in 100uSec and the rate of accelerateion is 500,000mm/sec/sec in 100uSec.

If you now apply a small degree of acceleration profile....
So say we have a pulse trane of 100uSec and after the first step we ignore the second step but continue with the 100uSec pulsetrane from the 3rd step we will end up with the following:

Accel from standstill to 50mm/sec in 200uSec acceleration will now be half at 250,000mm/s/s (~25.5g) and jolt / jerk will be 1/4 (1,250,000,000mm/s/s/s)

So, lets say for arguments sake that at 3000mm/min your stepper did not stall with no acceleration profile {good luck on that one!!!}.
If you applied a "simple" "basic" and most rough acceleration profile of skipping the 2nd pulse in the pulsetrane, you could actually increase your feedrate 100%..... given it did not stall at ~50g you would still be running with an acceleration profile with 50g by missing that first pulse.

This is where your sample rate comes into play too..... saying that " not applying accel. It's the correct way to do it." is not valid if your sample rate is greater than your step pulse rate.....

Each to their own..... that that is why the market is flooded with THC's all apparently doing the same thing better than all the rivals.... only a few are really good in my opinion and sample rate + ADC is key in my opinion.....

I'm happy with the Neuron {thanks Andrew} and even happier that the English screenset has been updated

Improvements become exponentially more costly to implement at some point, and of infinatly less benefit proportionally...
https://betterexplained.com/articles/un ... 8020-rule/
The 80% achievement with 20% of input or law or diminishing returns or diminishing marginal benefit.


______________________________________________________________________________________________________________

What I believe a lot of people think of THC as a digital process.
(i.e voltage too high, issue THCDN ..... OR ....... voltage too low, issue THCUP)
What people forget (or may not have considered) is rate of change......

Rate of change is proportional to XY blended feedrate to some / a large degree.

And this allows you to control the Z-axis at a varying feedrate.....


Mach3 + UCCNC only have two options...... THC up and THC down.... so a digital control is all that is possible for the error, and the z axis feedrate will need to be matched to the XY blended feedrate.

Standalone THC offers a whole other advantage ....
- it can sample the voltage (same as all other THC's)
- it can determine the rate of change (same is possible with all other THC's)
- it can {could} sample the X/Y blended feedrate directly (sample the X+Y axis step signals directly)
- it can {could} adjust the Z axis feedrate relative to the error detected (rate of change) applying a correction (or window) for the XY blended feedrate.

This may bring about improvements in the cut..... but if your cut is acceptable ... why improve it 80/20 rule applies....
Robertspark
 
Posts: 1892
Joined: Sat Sep 03, 2016 4:27 pm

Re: THC accel/decel

Postby Robertspark » Wed Jan 16, 2019 4:11 pm

Robertspark wrote:
So you are telling the stepper drive to accelerate the stepper motor and all its connected load from standstill to 50mm/sec in 100uSec which will be an acceleration of 500,000 mm/sec/sec (~51g) (it will NEVER be infinite with a stepper motor as every step has a time per step).


One easy way to lessen the g-force is to simply make the step size larger..... say instead of 0.005mm/step in the previous example.... make it 0.05mm
so this time the pulse trane for 50mm/sec will be 1khz, and 1milisecond..... acceleration will now be ~5g (still high..... but 10x less than using a 10mm pitch leadscrew).

The problem with this one now becomes because the step size is so course it almost matches your sample rate probably.....
Robertspark
 
Posts: 1892
Joined: Sat Sep 03, 2016 4:27 pm

Re: THC accel/decel

Postby cncdrive » Wed Jan 16, 2019 9:47 pm

Guys, interesting discussion, but one simple question from me:

What would be the benefit of having infinate acceleration for THC only?
I mean if the axis (motor, drive etc.) can handle infinate acceleration when it is doing THC then it can do the same when no THC,
so this makes this function useless in my opinion, because if you can set the acceleration high for THC then you can also set it the same high when the axis is running in normal positioning mode.
cncdrive
Site Admin
 
Posts: 4887
Joined: Tue Aug 12, 2014 11:17 pm

Re: THC accel/decel

Postby beefy » Wed Jan 16, 2019 10:55 pm

Hi Balazs,

these questions have actually already been answered in this thread but maybe not so clearly.

Firstly, whenever I say "accel", I mean acceleration AND deceleration. And when I say "zero accel" I really mean instant moves or infinity accel.

When you have zero accel ("instant" change of velocity), the stepper motor can only reach a limited top speed. As mentioned earlier the stepper drive manufacturer I contacted said any decent stepper motor should be able to reach a max. velocity of only 120 rpm (2 revs per second) with no accel applied.

The reason basic THC UP/DOWN control requires instant velocity change (which is also instant stop) is to increase the resolution of the moves, i.e. give much better precision to the commanded UP/DOWN signals. With accel applied the stepper motor takes a certain amount of time to accel to the THC SPEED or decel to a STOP. Because it takes time, that means extra distance covered, which is bad for keeping tight control of Z position.

Stainless is the worst because with Finecut nozzles (Powermax 1250 as example) the cut gap is only 0.25mm so you need very tight control of THC moves so the torch does not overshoot the required position.

With zero accel applied the Z motor responds "instantly" to the THC UP/DOWN signals, and you get much better response of actual torch position.

So you WANT accel applied for normal Z moves so that you can attain fast rapid speed.
But for basic up/down type THC control you want zero accel applied.

THC speed is worthless without tight control, i.e. how far the torch will travel between each THC UP/DOWN signal. Not having accel allows that tight control at the expense of max speed.

Even a fast THC UP/DOWN update rate is not the answer, because the bottleneck is how far the Z travels from stopped to THC SPEED, or visa versa, from THC SPEED to stopped. That is where accel is the problem.

Hope all that made sense :)

Of course the ultimate would be a servo motor with PID control, because as Andrey (Shad) said earlier, that controls THC speed in relation to the error, and the Neuron does PID, but we are only talking about basic THC UP/DOWN type control with UCCNC.

Keith
beefy
 
Posts: 449
Joined: Mon Sep 05, 2016 10:34 am

Re: THC accel/decel

Postby cncdrive » Wed Jan 16, 2019 11:20 pm

OK, I see now. The thread was so long that I have to admit that I read some parts really quick. :)
Your stepper manufacturer is right that stepper motors can do 1(t) unit steps which means that they can respond to theoritical infinate acceleration commands without loosing steps,
but they can only do that only under the so called "start/stop frequency" which is a parameter of every stepper motor.
So, it would then make sense to control the THC with infinate acceleration (or with higher acceleration than for normal positioning), but only if there would another velocity parameter too which would limit the velocity to a separate value, to below the start/stop frequency of the motor when in THC control.

With servos if there is enough step buffer size then you could use high acceleration and the servo ofcourse will not loose steps and will not fault if the step buffer size is high enough.
E.g. in our DG4S drives it is setable upto 20000 steps.
So, the PID will work out the error and the motor will accelerate and deccelerate and reach target positions based on the position error, so as soon as the error goes high enough the PID loop push the throttle accelerating the motor to it's limits.
cncdrive
Site Admin
 
Posts: 4887
Joined: Tue Aug 12, 2014 11:17 pm

Re: THC accel/decel

Postby Robertspark » Wed Jan 16, 2019 11:53 pm

"start/stop frequency" >> Maximum starting frequency (fS)

https://www.orientalmotor.com/stepper-m ... rview.html

its not infinate .... and it is inertial load dependant (indicative graph included.... not sure how uniform this may be across a range of stepper motors )

Image

interesting.....
Robertspark
 
Posts: 1892
Joined: Sat Sep 03, 2016 4:27 pm

Next

Return to Ask a question from support here

Who is online

Users browsing this forum: No registered users and 25 guests