Kernel frequency setting?

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

Kernel frequency setting?

Postby rowka » Tue Oct 17, 2017 9:57 am

How do I determine what value to set?

What are the consequences of setting it too high?

What are the consequences of setting it too low?

Thank you.
rowka
 
Posts: 25
Joined: Thu Sep 28, 2017 3:05 pm

Re: Kernel frequency setting?

Postby Robertspark » Tue Oct 17, 2017 2:08 pm

the kernel frequency is the step loop frequency.

Too Low (without encoders)
so if you have steppers that require 100kHz because of your system setup (microsteps + gearing / pulley drive ratio + drive mechanism (screw pitch etc), and you set it on 50khz, you will never be able to achive the steps you require.

Too High (without encoders)
No potential consequences that I'm aware.... although with another motion controller (non UC) if you set the step frequency at 2 / 4mhz it had a consequence that it would narrow the step pulsewidth which meant that there was a potential that the stepper drive may miss steps because if you have a 100khz stepper drive the pulse width was I believe too narrow... the easy fix was just to set the kernel frequency slightly above what your drives required.


The correct way to work out what you require is say you have a 1605 ball screw (5mm pitch), direct drive (200steps / rev), with 10uStep resoluton on the drives
200 / 5 * 10 = 400 steps / mm

Say your expected / target maximum velocity is 100 mm /sec (6m/min feedrate) , therefore you require a minimum kernal frequency of 40 khz (400 steps / mm * 100)

set it on 50khz.


With encoders.....
axis encoders
Depends what you are using the encoders for.... I don't believe that UCCNC can run closed loop, so adding encoders to an axis will just show the distance traveled and you may be able to show the error between the actual distance traveled and the distance the machine should have traveled. (it is NOT possible to correct for this on the fly [really your settings are wrong if this happens and or your steppers are undersized for what you are trying to do).

spindle encoder
If you are using the encoder for threading and an spindle that is another matter... because you want to spindle to correct for any error and operate in sync with the encoder. Now you need to look at the spindle speed (say 24000 rpm...), and look at the encoder resolution (ppr [pulse per revolution]) (say 1000ppr), now you require a 400,000 khz kernel frequency to keep track of the ppr at 24,000 rpm

(24000 / 60 * 1000)



Note, I suspect that the motion controller that had the issues with high kernel settings may have been inverting the step signal via the breakout board

A screenshot extract of the Mach3 manual explaining this issue is attached (note this is NOT a UC or UCCNC issue, just something to be aware of if you have issues and have set the kernel frequency too high as it may be a cause).
Attachments
2017-10-17 15_06_42-Mach3MillInstallConfig.book.png
Robertspark
 
Posts: 1892
Joined: Sat Sep 03, 2016 4:27 pm

Re: Kernel frequency setting?

Postby dezsoe » Tue Oct 17, 2017 2:15 pm

Normally you don't have to change it.

- If you have axes that have high steps/unit and hight velocity and you cannot set it (it reverts to a smaller value) then you need to set higher kernel frequency.
- On the other side, some drivers need longer pulses on their input, so you cannot go too high. (The higher frequency the shorter pulse.)
dezsoe
 
Posts: 2093
Joined: Sun Mar 12, 2017 4:41 pm
Location: Csörög, Hungary

Re: Kernel frequency setting?

Postby ger21 » Tue Oct 17, 2017 3:42 pm

dezsoe wrote:- On the other side, some drivers need longer pulses on their input, so you cannot go too high. (The higher frequency the shorter pulse.)


Yes, a lot of stepper drives have a max of 200Khz, some even less than that.
Gerry
UCCNC 2022 Screenset - http://www.thecncwoodworker.com/2022.html
ger21
 
Posts: 2714
Joined: Sat Sep 03, 2016 2:17 am

Re: Kernel frequency setting?

Postby rowka » Tue Oct 17, 2017 4:53 pm

Mach3 values (using the machine OEM supplied xml file)

5833 steps/in
160 in/min max velocity (2.667 in/sec)
therefore ~15.5kHZ

The OEM xml file sets it at 35kHz

I have installed UC300ETH-5LPT, and UCCNC.

Should I continue with 35kHz?
rowka
 
Posts: 25
Joined: Thu Sep 28, 2017 3:05 pm

Re: Kernel frequency setting?

Postby Robertspark » Tue Oct 17, 2017 5:16 pm

35 khz is not an option.

I would set it at 50khz and it will be fine (I've never seen a drive rated at below 50khz)

the options for the UC300 ETH are
25khz
50khz
100khz
200khz
400khz
Attachments
2017-10-17 18_13_25-Program Manager.png
Robertspark
 
Posts: 1892
Joined: Sat Sep 03, 2016 4:27 pm

Re: Kernel frequency setting?

Postby A_Camera » Wed Oct 18, 2017 8:09 am

rowka wrote:Mach3 values (using the machine OEM supplied xml file)

5833 steps/in
160 in/min max velocity (2.667 in/sec)
therefore ~15.5kHZ

The OEM xml file sets it at 35kHz

I have installed UC300ETH-5LPT, and UCCNC.

Should I continue with 35kHz?

What is your acceleration? The 25kHz setting is enough for your speed, no benefits of having higher kernel frequency unless your acceleration demands it. So, for example if your acceleration is 16 in/s2 then you will need to set it to 100kHz. With 35kHz (if it would be possible) you would only get 6 in/s2 acceleration. If you set the kernel frequency too low then you will stall your steppers during acceleration even if the frequency is enough for the speed.
A_Camera
 
Posts: 639
Joined: Tue Sep 20, 2016 11:37 am

Re: Kernel frequency setting?

Postby Robertspark » Wed Oct 18, 2017 11:23 am

How is acceleration affected by kernel speed / loop?

i don't think you are correct with that one, as acceleration is a function of time, i.e. the pulse width (time between pulses) is greater at the start of the acceleration curve, and the pulse width gets less as the machine gets up to maximum velocity (minimum pulse width)
Robertspark
 
Posts: 1892
Joined: Sat Sep 03, 2016 4:27 pm

Re: Kernel frequency setting?

Postby A_Camera » Thu Oct 19, 2017 11:56 am

Robertspark wrote:How is acceleration affected by kernel speed / loop?

i don't think you are correct with that one, as acceleration is a function of time, i.e. the pulse width (time between pulses) is greater at the start of the acceleration curve, and the pulse width gets less as the machine gets up to maximum velocity (minimum pulse width)

I think acceleration is important and is limited by the kernel frequency because during the acceleration phase the actual frequency can be higher that the frequency needed for the top speed.

An example:

A machine with maximum speed of 8000mm/min = 133mm/s (Vmax)
Microstepping set to 10x => 2000 steps/rev
Lead screw pitch: 5mm/rev => 400 steps/mm

Frequency = 400 * 133 = 53.2kHz

Acceleration: 700mm/s2

This means that Vmax is reached after 12.64mm travel distance and 0.19s time. During the 0.19s the stepper must receive 5056 pulses, which is a frequency of 280kHz otherwise you will not have that acceleration.

Is this wrong?

Acceleration is a function of time AND an increasing speed, but the time is limited by the maximum speed.
A_Camera
 
Posts: 639
Joined: Tue Sep 20, 2016 11:37 am

Re: Kernel frequency setting?

Postby Robertspark » Thu Oct 19, 2017 12:57 pm

This means that Vmax is reached after 12.64mm travel distance and 0.19s time. During the 0.19s the stepper must receive 5056 pulses,


The above bit is correct, the 280kHz is not correct.

if the stepper steps 5056 steps in 0.19 seconds, then in 1 second, it will step 5056/0.19 = 26,610 steps / sec (or pulses / sec .... i.e. equivalent to 26,610 hz or ~ 26.6kHz)

not sure how you got 280 khz mathematically.

_______________________________________________
Given we know that the whole acceleration cycle takes 0.19 seconds from zero to 8000mm/min = 133mm/s (Vmax)

Or to put it another way to go from zero to 53.2kHz

The time between the first & 2nd pulse will be 2.672mSec (equivalent to a 374 hz pulse trane time).
The velocity at the end of the first pulse will be 1.87mm/sec,

then the 3rd step comes in and the pulse time will be shorter as the equivelent pulse trane time increases all the way up to an equivalent 53.2khz.
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: Bing [Bot] and 38 guests