Ill start this with saying that if anyone has info on this please come forward as their seems to be very few resources and they are all cryptic. Anyway i have found all the trinamic whitepapers to be very helpful and over the past year hae tested and experimented to the point where i feel i have a decent grasp on how this works.
This is a basic guide on making a PA (Pressure Advance) gcode file. I plan on forking the code and changing it to natively generate the gcode for RRF and Klipper, but it’s easy, so I am not making that a priority. Just use the above-linked tools.
Generate the gcode for marlin inputting your settings for the filament and nozzle you are using. You want .005 steps ranging from 0 to .1 for most nozzles and filaments. If your filament is very soft or your nozzle is small, then .2 may be better as a maximum value.
Add a G32 after the G28 in the side panel.
Add a T2000 after the P500 on the acceleration line.
Download and open in notepad, or some other simple editor that does not format text.
Use find and replace to find M900 K and replace it with the respective values:
Klipper is SET_PRESSURE_ADVANCE ADVANCE=
RRF is M572 D0 S
Save the file, making sure the extension is .gcode.
Upload to the printer and print.
Find the line that stays most uniform at the speed changes marked by the top two vertical lines.
Enter the corresponding value in your slicer’s filament gcode override. If slicer does not have that, then enter it into your start code and name that profile for the filament you calibrated.
I found some cool diagrams that show the improvements with Klipper pressure advance compared to regular Linear Advance (LA) and PA with the smooth pressure advance algorithm. With direct drive, it does not matter as much, but with Bowden and high values, Marlin and RRF have a hard time keeping up and end up slowing the print a lot to maintain the max acceleration for the extruder in firmware. So, a stock 300 really needs 1.9 and that doubles print times on RRF. With Klipper, it is not a problem and it does not reduce the acceleration as the extruder hits its ceiling. Instead, it smooths out the max values and extends them slightly to the same end result. You can configure the smoothing time if you really are pushing things, but the stock value is adequate. We do not want to reach the point where we start reducing the effectiveness of the pressure advance. This all is not important if running direct drive since we rarely need more than .1 seconds of Pressure Advance with the Orbiter or most other high-end solutions. I just figured it would be interesting to give some background on what is happening under the hood.