Compensate for heating the filament via a function: additional power ~ extrusion feed speed

edited February 2016 in Feature Requests
Hey!

I would like to know your opinion on the following, Repetier:

You probably know that in Marlin there is the option to add a so-called "Kc" value to the PID routine, which adds a extrusion rate - dependant value to the PID value like this:
PID_value = (Standard PID routine with Kp, Kd, Ki) + (Extrusion feed rate) * Kc

Now, I dont want to ask you to copy Marlin, but I find the basic idea intriguing: When Kc is chosen well, both with PID temperature control and Dead time control, temperature fluctuation caused by (fast) extrusion is basically nullified. Would you be interested in implementing such option into Repetier?

The main requirement for this to be possible though, is a stable possibility to ask for the actual extruder position or speed during the PID evaluation. Only if this is available, a "Kc-like" feature would make sense. Is this possible in Repetier?

And just btw: For 1.75 mm filament (ABS and PLA) it is ~1W for 1 mm/s feed rate (~3W for 3.0 mm filament). At, lets say, 4 mm/s feed rate (10 mm³/s @ 1.75 mm filament) this is 4W - 10% of a 40W heater max, 15% of a 28W heater max. The Kc value is easily calculated if one knows filament width and max. hot end wattage.

Comments

  • Interesting idea. Main problem is in deed current extrusion feed rate. But we have speedE which even has a sign and dimension mm/s so starting a new move could set a global value to it, so that global value is then the currently active signed extruder speed.

    So that would make it quite easy. Just adding some byte ram usage which only hurts delta printers with avr chip. Setting watt per extruder might be a good idea to normalize the Kc value which is otherwise hard to find out. Would be the one with least temp. deviation I guess.
  • edited February 2016
    Cool! Glad to see you like the idea! :)

    Implementing Kc into the PID loop should then be pretty straight forward, as there are no if/then's to set. If one does not want to use Kc, just set Kc to 0 and it will be plain old PID/Dead time control again.

    Calculating Kc would be muuuuch easier when knowing the max hot end wattage, yes. It then boils down to:

    filament_power_permms = 0.33 * filament_diameter^2;
    Kc(hex) = int(256 *  filament_power_permms / max_wattage)

    (assuming speedE is in mm/s)

    The "0.33" should probably be set as a EEPROM variable. I can give details on how to evaluate that value exactly. Its basically just the energy to get to melting temperature + the melting enthalpy. 

    If I can be of any help, let me know. :D


    /edit: I just ran across a minor (?) issue: There would probably  have to be an additional if in the PID loop: If there is a long and fast negative retraction (filament change for instance), that would probably have to be ignored. Not sure though. :/
  • Retraction is not the problem as speed would be negative. More problematic is undo retraction. But I guess we could make a max. speed for if, e.g. if speedE <10 && speedE > 0.
  • Yeah. I dont think anybody will run more than 10 mm/s filament (~ 24 mm3/s... even with a E3D Volcano that is hard to do), you are right. :) And even if: Then the PID kicks in again and should deal with the rest.
Sign In or Register to comment.