NonLinear Extrusion

Any guides for setting this up? Can we force it to be applied for extrusion only for testing? When extruder steps are set for an accurate 50mm @ a feed rate of 82mm/min (30mm/s @0.2mm layer, 0.55 track width, and 1.75mm filament) if I request 100mm @F440 (160mm/sec) I get a 12.5mm shortfall. Retracts and advances are typically F3000 so expect these effectively loose position on each action, hence the need for the additional (sometimes negative) unretract?

There's an error in my maths! Changed the wrong bit of my formular which would have exagerated the problem if it didn't invent it! I'll be doing three runs at the equivilant of 30, 50, 70, 90, 110, 130, 150, and 170mm/s and plotting the results.I'm still interested in a guide but ignore my numbers for the minute!Edit: No error as it happens... My formula for getting the feed rate was:
(0.2 * 0.55 * 80 * 60)/(pi * ((1.75/2) ** 2)) which is:
([layer] * [extrusion width] * [print speed mm/sec] * [seconds/min]) /
(pi * [filament radius] * [filament radius]) which in basic form is:[Target volume / min] / [cross sectional area of filament]
I'd started typing in my speed in place of the seconds/min, but I did it when the last calculation was 60mm/sec end result exactly the same...

I'm seeing the 'shark skin' surface effect when extruding fast and nice and shiney when extruding slow...

A graph as neat as this one is indeed a rare thing! The tested points where based on reaching the print speeds of 30, 50, 70, 90, 110, 130, 150, and 170mm/sec. I'll add a photo another time to show the shark skin effect, but in a nutshell the shiny on the extruded filament disappears at between 50 and 70mm/sec. As the extruder feed rate increases as does die swell  the extruded bead is thicker.
Edit: Given the first two data points I really should have had three decimal places on the labels, but you get the jist. My concern is will this graph still hold true when extruding real parts as there is extra resistance to the polymer coming out of the nozzle, particually if you are slightly over extruding. This would add back pressure which is the explanation for this effect on the gcode reference for nonlinear extrusion correction....
Edit2: Dahm I'm buggy today. New graph coming with feed rate corrected and a few other tweaks...

I used the following to calibrate my extruder (I think @dc42 was the originator):
G28 G1 X0 Y0 Z100 F5000 M83 G1 E5 F600 M400 M291 S3 R"Extrusion test" P"Press OK to start test" ;G1 X50 F5000 G1 X50 E50 F60 M400 M291 S3 R"Measure extrusion" P"Measure filament taken at 1mm/sec extrusion, then press OK" G1 X0 E50 F120 M400 M291 S3 R"Measure extrusion" P"Measure filament taken at 2mm/sec extrusion, then press OK" G1 X50 E50 F180 M400 M291 S3 R"Measure extrusion" P"Measure filament taken at 3mm/sec extrusion, then press OK" G1 X0 E50 F240 M400 M291 S3 R"Measure extrusion" P"Measure filament taken at 4mm/sec extrusion, then press OK" G1 X50 E50 F300 M400 M291 S3 R"Measure extrusion" P"Measure filament taken at 5mm/sec extrusion, then press OK" G1 X0 E50 F360 M400 M291 S3 R"Measure extrusion" P"Measure filament taken at 6mm/sec extrusion, then press OK" G28
One one machine with a flex3drive extruder and an e3d v6 0.4 nozzle, testing PLA at 200deg, I ended up with M592 D0 A0.05 B0.003

Ok...
Changes:
 Looks like the non linear correction gcode wants the A and B values to give the result interms of required correction  1. Adjusted graph to suit.
 The gcode explanation is based on the filament speed in mm/sec. My axis title was right on the last graph, but not the plotted data which was just the F component of the G1 command.
 Added more decimals to the number.
 Got lazy and asked excel to add a second order polynomial trend line and give me the result.
Considering a polynomial in the form Bx^2 + Ax + C the ability to put the +c into the equation is missing from the gcode feature. I can only assume this is because I calibrated my extruder for a feedrate of around 2.5mm/sec extruder speed ish. Now onto the trial...
A & B for PETG 220C Titan, V6, 0.4 nozzle: A = 0.0068, B = 0.0038

@burtoogle Intersting to see the B value close to mine. Think the A value is may vary strongly depending on what speed you calculate your steps /mm for the extruder.

Just printed solid, 35 * 35 * 4mm, hatch only (45 degrees) test samples with print speeds running from 80 through to 180mm/sec. Typical weight around 5.82g with a min to max range that covered 0.06g! I make that about 0.25mm difference in input filament  assuming the filament was perfect! I've got varying quoted densities for the PETG. ON the supplier page it quotes 1.1 but I'm sure that's not accurate as that would make these samples over 100% dense, and they look under extruded. If the density is more like 1.2 then it's only a couple of percent under extruded which is a great result. Will aim to get the pressure advance dialled in tomorrow to sort out the densification towards the edges of the coupon  which could also be a thermal issue.

Mathematically inept person here. I get the principle behind M592 but, despite spending the last 2hrs reviewing vague GCode documentation and a slew of forum posts, I still don't understand where these A and B values are coming from/how they are being calculated from the measurements you're taking. Can you help me, please?

There have been some longer posts in the past discussing this feature and how it came about. In a nutshell people had noticed that they needed a significant extrusion multiplier in order to achieve a specific density depsite having very carefully calculated and tested their extrusion steps per mm. What proved more challenging was that this correction changed depending on print speed. Essentially to continue to print accurately without non linear correction you'd have to calibrate your system to a specific volumetric output from the extruder and increase extrusion width if you wanted to print slower.
The graph that I plotted is the correction needed as the rate of volumetric output from the extruder increases. Extrusion speed is directly proportional to this rate because our nozzle diameter is constant  ignoring insignificant changes due to thermal expansion or wear.
In my case the output correction graph displays a quadratic, or second order polynomial equation. The A and B values are from the equation that best fits the graph and is fed back into the machine in order for it to correct for this predictable error in extrusion.
The standard quadratic is:
Ax^2 + Bx + C = yBecause this correction was initially implemented in the firmware to correct for a linear error the B and A have swapped around. There currently isn't a provision for the C value.
This is complicated by these values changing with extrusion temp and even more so with material change.
Edit: I'll try to find a good explanation for the maths side later.

A linear relationship is like speed and distance. If you go twice as fast you cover twice the distance in the same time. The equation would look like:
Speed * time = distance
If you plotted the distance travelled for a constant speed then the line would be straight  linear.
An example of a non linear relationship is the power a car needs to hold a certain speed. Roughly speaking due to air resistance when you double the speed the power require goes up by four. Four times the speed and the required power is sixteen times what it was at the lower speed. If you plotted that it would be a curve  non linear. The equation would get more complicated and be something like:
Fudge * Speed * Speed + other fudge * speed = power
...where fudge being something that accounts for how aerodynamic your car is and the other fudge allows for things that are directly related to speed such as rolling resistance of tyres.
That last equation is like what we have for the correction. In english it says that when you need twice the amount of polymer out of your extruder in the same amount of time you need to turn the extruder more than twice the distance, and the faster you extrude the larger the needed correction.