Pressure Advance Custom Start and Factor

Basic Information:

Printer Model: Anycubic Kobra Go
MCU / Printerboard: Trigorilla
klippy.log
klippy (1).zip (727.6 KB)

Fill out above information and in all cases attach your klippy.log file (use zip to compress it, if too big). Pasting your printer.cfg is not needed
Be sure to check our “Knowledge Base” Category first. Most relevant items, e.g. error messages, are covered there

Describe your issue:

In the Pressure Advance section it reads as such
"The pressure_advance value can then be calculated as pressure_advance = <start> + <measured_height> * <factor>. (For example, 0 + 12.90 * .020 would be .258.)

It is possible to choose custom settings for START and FACTOR if that helps identify the best pressure advance setting. When doing this, be sure to issue the TUNING_TOWER command at the start of each test print."

After my first cube I found the sweet spot around 23mm. I would like to run another cube but dial in the spot a little more. Since I only wanted about 1/3 of the cube resolution to be expanded, I took the .020 factor and settled on .006
The instructions read that the previous start should be added to your measured sweet spot, so the value must be the same otherwise the math wouldn’t work. I set that to 20, a little below what I measured.

The extruder goes nuts with this new setting, retraction on or off in the slicer, same thing. As soon as the print starts, it starts making some pretty loud noises. Not skipping, but high pitched like a DJ scratching a record but amplified. Now isn’t the best time to invoke it deliberately to get a recording though, so I won’t be putting out any club bangers tonight sorry.

Here is the modified line that I have in the start of my print along with the others from the guide.

TUNING_TOWER COMMAND=SET_PRESSURE_ADVANCE PARAMETER=ADVANCE START=20 FACTOR=.006

Thank You

With this command, you are setting the Pressure Advance value to 20 as a starting value.
From your 20mm measured you will need to calculate the PA value and use this for the new tuning command.

Yes, I’ve done that, but I wanted to dial it in further by chosen a broader range than my calculated PA, and follow the instructions which aren’t very clear beyond “you can do this with these” and no explanation of “these”, which are START and FACTOR.

Also, if what you said is correct, then this math is broken
pressure_advance = <start> + <measured_height> * <factor>. (For example, 0 + 12.90 * .020 would be .258.)

I kind of was thinking that might be the case, so really the start would be less than 1, so .2 I’m guessing with an increase of .006nper layer. That actually makes more sense.

But that would mean (using my example)
TUNING_TOWER COMMAND=SET_PRESSURE_ADVANCE PARAMETER=ADVANCE START=.20 FACTOR=.006

Then let’s say I measure 5mm up

.2 + 5 * .006 = which is incorrect

The equation should read
((start * 100) + measured height mm )* factor = 'Pressure Advance Value ’

Could we also get some kind of definition added to the docs for Start and Factor, something like

START: Start will be zero for new test. If further dialing in a previous result you may take your measured height, multiply by .9 then divide by 100. Or start with your previously calculated PA by subtracting roughly 10% of the value, the remainder will be your new start value. Value should be less than 1.

Factor: The incremental size in mm in which the test print will raise the Pressure Advance per layer. Defaults are .020 and .005 for Bowden and Direct Drive respectively. If running a second smaller test these values should be adjusted to reflect the desired new test range. i.e. If you wish to home in on the middle 1/3 of the test cube you would take your previous Factor and multiply by .3, this value will be your new Factor if you choose to further testing (Not Required).

The math behind the tuning tower is correct and the function is well documented here: G-Codes - Klipper documentation

This makes absolutely no sense

Ok now we are going in circles.
Quote from document link

START ; in this case, the z_height used in the formulas below is actually max(z - skip, 0) .”

Ok, I want to start at 20mm with no skip.

So my start = 20?
That’s what I had originally and you said it was incorrect. Unless the Max(z- skip,0) is a math equation but that’s not proper formatting if it is so I can’t solve it. Best it reads is multiply Max by a set of coordinates.

Edit: I can’t even find what max is. Max of what?

((start * 100) + measured height mm )* factor = 'Pressure Advance Value ’
Is if the start is what PA you want to start at as you said.

How else would you get the proper value?
You would measure the height as usual but if it started 20mm up then you still need to add that 20mm back in.

Again this is only for running the test a second time with increased resolution within a range closest to your “sweet spot” from the first test.

The docs specifically mention this is possible and vaguely mention the values required to do it. Because in the end, you need to get the total and whatever amount was left out to increase resolution because starting at the real halfway point should still somehow equal .5 right? Which is what 20mm but we start at 20 and I measure 3mm from the bottom, my PA is not .020 + 3 * Factor. I didn’t see any restrictions on the factor value beyond common sense, and can’t see why there would be, because it’s basic math.

OK, so the Start (when running a second time) is not where we are starting on the object in reference, but where we are starting from the output value of the last test. Which is confusing because the Gcode is in reference to the 3D object.
Anyway, so I set a start of .4604 (my PA value) and factor of .006
I measure 3mm up and find a new spot (hypothetically) , My new numbers to work with are
Start .4604
Measurement 3
Factor .006

<start> + <measured_height> * <factor> . (For example, 0 + 12.90 * .020 would be .258 .)

so
.4604 + 3 * .006 = .020 (rounded)

A new PA of .020 or did I miss something about adding this PA to the old PA ? Does that math work?

How can the result be below the start value? There are no negative numbers.
You should read more and not only spam the forum with massive posts.

1 Like

I’m not going to read all of this and try to understand what you’re saying. I just want clarify that the START value is the starting PA value, and has absolutely nothing to do with height. A starting PA value of 20 will not work and you’ll just end up with a failed print.

2 Likes

Then I will circle back to my first post, actually here can you do this math for me, its from the docs, here are my values.
Start .4604
Measurement 3
Factor .006

<start> + <measured_height> * <factor> . (For example, 0 + 12.90 * .020 would be .258 .)

First, it’s multiplying by a decimal point and its Jr. High math. i.e. (9 x .9) is lower than 9.

Second, I wasn’t trying to insult anyone or give any attitude, I ran into an issue where the docs aren’t clear, I asked for help but the answer, while most likely true, goes against the math equation in the docs to get the PA value, therefore I’d be able to run the test but not do anything with the collected data.

I’ve asked several times for anyone to just do the math equation because at least if I am missing something, I would have a working example. It’s only 3 sets of numbers.

You’ve apparently forgotten one key detail from junior high math called order of operations. The correct answer to this equation is 0.4784.

4 Likes

I guess the point is that you come across exactly like that by stating stuff like “the math is wrong”, “the docs are wrong” etc.
Such bold statements are quite the opposite of asking questions, especially when knowledgeable people quickly turn around and prove you that not the math is wrong but your understanding already on a very basic level.

So as a very last attempt:

  • The TT function as used in the PA tuning uses:
    • The argument COMMAND=SET_PRESSURE_ADVANCE to specify which command to execute while advancing in z height
    • The argument PARAMETER=ADVANCE to specify which parameter within the above command to actually increment while advancing in z height
    • The FACTOR argument mathematically has the unit of “unit of the parameter to advance per millimeter
  • The TT function allows you to measure a z-height in mm and deduce the PA value Klipper had been using at this height

For the following math, let’s assume the unit for Pressure Advance is [PA]:

pressure_advance = <start> + <measured_height> * <factor>

comes down to:

pressure_advance = [PA] + [mm] * [PA/mm] = [PA] + [mm] * [PA/mm] = [PA]

Let’s say you want to take two measurements:

  • First one with a coarse approach
  • Second one with a finer approach

First one:

TUNING_TOWER COMMAND=SET_PRESSURE_ADVANCE PARAMETER=ADVANCE START=0 FACTOR=.02

Assume you measure 20mm as the sweet spot:

pressure_advance = 0 PA + 20 mm x 0.02 PA/mm = 0 PA + 0.4 PA = 0.4 PA

Ok, we now know that the sweet spot is somewhere around 0.4 so

Second one:

TUNING_TOWER COMMAND=SET_PRESSURE_ADVANCE PARAMETER=ADVANCE START=0.35 FACTOR=.005

We start with a PA value of 0.35 since we better not use 0.4 directly as it is only the coarse first shot.

Assume you measure now 15mm as the sweet spot:

pressure_advance = 0.35 PA + 15 mm x 0.005 PA/mm = 0.35 PA + 0.075 PA = 0.425 PA

(and I’m not sure, why I sacrifice my time to explain Jr. High math and logic, but this rather is my personal issue)

3 Likes

Is it because NO WHERE is it stated to add the two together in the second step maybe??? (*0.35 PA + 0.075 PA)
Pressure advance - Klipper documentation (klipper3d.org)

pressure_advance = 0.35 PA + 15 mm x 0.005 PA/mm = 0.35 PA + 0.075 PA = 0.425 PA

I wouldn’t have asked the question if it just said that, somewhere on the page. I’ve had several others read it over; the responses were similar to my own.

The reason I said the math was wrong is that math is not someone’s opinion, so I didn’t feel as if I was stepping on anyone’s toes. It can only be correct or incorrect. There is no point of view to take into consideration, at least not without a philosophical debate. If I said the documentation sucked or put down whomever wrote the equation, then I’d be agreeance and an a.hole. That wasn’t my intention, but I’ve learned my lesson.
Only ask the question once, move on if it’s not answered with relevance to desired goal and don’t suggest anything is possibly wrong with anything,

Thank you for taking the time to explain how the math should work. I now have the formula I was looking for. My statement of the math is wrong was incorrect, the math equation was incomplete.

You’re entitled to your own opinions, but you’re not entitled to your own facts. The math equation is correct and complete.

2 Likes

You linked to the following:

The pressure_advance value can then be calculated as pressure_advance = <start> + <measured_height> * <factor>. (For example, 0 + 12.90 * .020 would be .258.)

It gives the whole formula and even a simple example.
What else do you think is needed?

Don’t search mistakes in the wrong places.

I apologize for coming off like an asshole, that was not my intent. I thought it I didn’t re-ask the question it would be considered resolved and me personally or the task I was trying to accomplish wasn’t. I was unable to complete the second test and needed further assistance / guidance.

Again, apologies for coming off like something I truly try not to be in this community. I needed some time to reflect.i appreciate all of the help, especially from Sineos whom I believe has helped me through every issue I’ve had thus far.

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.