-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PID #28
Comments
yes, the resulting temp is very much constant but always a few degrees lower than the target temp. |
i have more powerfull PID settings in the code since monday. If I have enough time this evening, I will try this: |
Using the following values: I did do a short print (20mins) and it seemed to hold out quite well. Didn't notice the temps dropping by much when printing at 78mm/s & 50 mm/s (perimeters). I'll test again with a longer print tomorrow night. |
just for reference: the settings derived from a adjusting session in Eindhoven, with non-extrusion: The badly adjusted settings I use right now: I would prefer to have meaningful PID values derived in the firmware: kp=0.6_CriticalPID_P; |
jc's 1440<>55.3636<>9900 corresponds to a swing period of 52 sec, and a critical gain of 2400. |
with j-c's values i get a swing of +-9° while printing at ~220 degree, thin walled with a speed of 80mm/sec and a layer height of 0.1mm |
I have a pink-silicon insulated hot end, maybe also worth mentioning |
How about using a 4th term in the PID+C. C=factor*Extruded material mm^3/second. |
I spend the last two hours PID-tuning, and have now some reasonables for P,I,D+the proposed C. It works with a +2°-3° variation on my machine, that features the pink silicone cap. |
now I get 10 degrees more than wanted. ... in the meantime .. it should be higher to get the desired value at the filament? |
bkubicek, the "C" factor is quite like the bias (CO bias) in http://mbed.org/cookbook/PID Btw, how are you measuring your swing time and delay values? I'm using a watch (seconds only) and watching the temp graph on the RepG (Printrun's temperate sample rate is too low). hurzl, reason why it's heating even past the set point is that in a system, there might be delays between the controller output and a measured change from the sensor. Also in some cases it prevents the temperature from just plummeting and ended with a high frequency occiliation. However, this is only in theory. It depends on your PID constants. Also, do you have any insulation and if so, what kind? And were those readings during printing or at rest? I know there are self-tuning PID routines, but a cursory search hasn't yielded any implementation details yet. |
hurzl: j-c:
Because I print usually with the fan turned on, I used the kp_critical of 3000.
|
Yeah, but the CO bias doesn't have to be a constant. It can quite quite As for increasing the Ki, the K-N method isn't perfect. You'll still need I'll also give your values a go when I get home and see how well that works On Thu, Nov 3, 2011 at 5:04 PM, Bernhard Kubicek <
|
from Peters mail:
He had a picture of a sine wave +-2° with approx 10 discrete plateaus: http://www.flickr.com/photos/bernhardkubicek/6308099445/in/photostream I suspect that the P-d value is too large, so that noise in the ad-conversion causes discrete additional values. Still not sure if d is actually useful, maybe PI would be sufficient? |
From what I've read, PI is usually good. D is only good if it's well tuned. On Thu, Nov 3, 2011 at 5:45 PM, Bernhard Kubicek <
|
I have a different heater (I built a kind of "Uitistrap"). It has a smaller aluminum block, the thermistor is a bit nearer, and the heater a bit farer from the nozzle I think. Nozzle is also smaller, just a thread whith hole. Smaller thermal capacity. |
Hey bkubicek, I tried your PID settings with a solid 20mm calibration cube. Also, using the Pessen Integral Rule, with your settings and a Kc of 9, I get a variance of -3.59 to +3.24 degrees. Probably your insulation is better than mine :) |
hurzl: currently I am working with a p=1360 i=1.2 d=0 and c=9, and its very +-1.5° stable on my insulated system while printing. |
indeed. hurzl, you probably should be looking at calibrating your own PID values since it sounds like it has different thermal characteristics than a stock one. The wikipedia link in this thread will give you some idea. Pretty much you need to figure out your critical gain (aka ultimate gain) and your swing time (aka occiliation time/period) via experimentation. Unfortunately there isn;t any procedure that I could find to explain how to find the ultimate gain. I just did it by trial and error till I got the output (compiled the firmware with PID_DEBUG and the heater output gets printed as B:xxx aka the bed temperature). Then after a few periods if the amplitude seems to be the same, I start timing 1 complete period to determine the swing time. After that you plug those numbers into the Zeigler Nichols method or the Pessen Integeral rule to get your base PID values.... Then follow the charts on the wikipedia article as a guide to hand tune the values after that. |
Ziegler-Nichols look doable, thanks BTW. how do I get bed temperature back when I'm finished? |
You can do it via: And if it works you'll either need to enter it into the firmware or Cheers, On 05/11/2011, at 1:07 AM, hurzl
|
please look a minute at the sourcode in the the git, i have already inpemented the formulas for the Ziegler-Nicholsm, PI, and PID, and in an earlier post i have exactly described how to do the tuneing procedure. |
can anyone tell me how to send commands via replicatorg? |
have not tried: but create a empty file test.gcode open it in repg. you can edit the content there, build it =send, and then have a look at the control window. hopefully. |
wow this is terrible. how do you test your PID parameters? |
with my fancy-pancy panel. Helps a lot for that. but still it took ~2h |
bkubicek, do you know why pTerm, iTerm and dTerm are all divided by 100? |
I am also using the default PiD values from 81202a8, and get about +15 deg... still prints OK (base was 215) |
I'm assuming your heater isn't insulated? Mine is insulated differently and I have to use different PID settings. I wonder if this is a case for implementing some kind of PID auto tune... On Tue, Nov 8, 2011 at 12:08 PM, jgeerds <
|
j-c: my heater is well insulated (8mm silicone foam), but I also have a different 50W heater than the 40W stock model heater. but the only difference should be the attack (heater power) and the dampening (insulation)... not the permanent landing temp (which stayed at +15 deg for 60 minutes printing). |
jc: but auto tune would be awesome, the PiD in my espresso machine has it, and I love it. |
There might be a case of the speed bias. If you look in configuration.h, If there's a systematic and reliable way to determine the ultimate gain, On Tue, Nov 8, 2011 at 1:39 PM, jgeerds <
|
I might be making some headway on this... Wrote up a function to gather test data for auto-tuning PID. When I sort that issue out I'll attempt to push it and submit a pull request. |
for those not using PID, could you change lines from 976 in Marlin.pde like this to get the bed temp display back:
#ifdef PIDTEMP |
I found this PiD simulator: http://forums.reprap.org/read.php?147,102633 would this be helpful in this context? joergen |
Success! Or sort of. The basic idea is fine, just can't seem to get the correct process time (which at the moment appears to require me to store a very long array and run out of memory). But after graphing out the data and getting the correct process time, the generated PID+A settings are fairly good at the steady state (around 0 - 4 degrees above the set-point). Also, I'm having minor issues trying to programtically find the required heater output (steady, not PID or bang-bang) to hit and maintain a certain temp. When finding the various tuning constants, I think it's recommended that you use the output level to hit your desired state. However, I aimed for 190, but got 240... results still seemed good. What's this "A" I speak of? It's the heater output filter. I still haven't quantified that it works better, but I get the impression that it does. Other changes that I had to do was add the temperature error (aka target_raw - current_raw) as the CObias in addition to your "C" extrusion speed bias. bkubicek, after I clean up the code, shall I submit a push to your repository (and after I figure out how to do that)... I'd like for other brave souls to test this out as well. |
the pid settings developed at madlab last week seem to have too little "umpf" for my machine. It never reaches the desired temperatures of M109 and waits forever.
The text was updated successfully, but these errors were encountered: