Author Topic: PID controller settings?  (Read 9616 times)

klschnepp

  • Guest
PID controller settings?
« on: August 30, 2012, 07:34:17 AM »
I am wondering if anyone would be willing to share their process settings for using a PID for heat?  I have my controller hooked to a bain marie/heating table and am getting a large overshoot (even with a two-step heating process) that simply tuning the factory settings has not helped.   No surprises there given what I have been reading on the topic.  I am by no means an engineer :o --I understand the basic concepts, but not much beyond that.  I have found this intel on settings (iratherfly, thank you):

Programming:
It seems that the following programming instructions would  give you the best results for bot sous vide and cheesemaking. It's as accurate as 0.2 of 1 degree Celsius! (Thanks for coming up with this one, Abe).  Here is the sequence:
 - Press set, enter 0036. Scroll so p is blinking
 - Press set, set the value to 000.2
 - Press set again, scroll to I
 - Press set,  use 1999
 - Press set again, scroll to d
 - Press set, change the value to 0000.
 - Press set, scroll to end.
 - Press set

 However, the units of measurement on my system do not seem to correlate (unless I am missing something, which is entirely possible). My unit has P= engineering units, I=seconds and D=seconds.   I am operating in C as well.

If anyone could help me narrow the test range on this, it would really be appreciated.   
« Last Edit: August 30, 2012, 10:10:50 AM by klschnepp »

Wolfy

  • Guest
Re: PID controller settings?
« Reply #1 on: August 30, 2012, 04:26:51 PM »
Assuming your PID has an 'auto tune' setting, have you tried running that?  From what I understand the machine will then tune itself to your 'system' and the 'system parameters' and you should not need to enter the values manually.

When mine was brand new new, it overshot the set-temperatures (usually by 1-2degC), but after running the auto-tune it hits (and stops at) the set temperature within 0.1-0.2degC every time.

(I use mine for a different but almost identical concept application).

klschnepp

  • Guest
Re: PID controller settings?
« Reply #2 on: August 30, 2012, 06:51:53 PM »
Wolfy, thanks for your reply.  I ran the auto tune and it has not had the desired result.  However, I am running it again as I type (after a day of experimentation).   Out of the box, mine was over running about 8 degrees C (eek).   It was not much better after tuning.   If you have a moment, it might be interesting to know what your P-I-D settings are??

mjr522

  • Guest
Re: PID controller settings?
« Reply #3 on: August 31, 2012, 03:25:46 AM »
Unfortunately, I have almost no practical experience with PIDs.  I've a decent understanding of how they work, and if I were about 10 years younger, I could probably analyze the system and suggest good P, I, and D values for you.  For a class project, I once designed a built a controller to cause water from a faucet to follow a certain temperature profile (80 degrees for 10 seconds, 72 for 8 seconds, 95 for 4 seconds, etc) by controlling the hot water valve.  If I recall correctly, though, even after doing all the system modelling and getting good numbers to run with, it was understood that you'd still need to tweak things.

When you do the autotune, does it output (or can you assertain) the values for P, I, and D?  Recall from what I wrote elsewhere, that P moves you towards your target relative to how far you are from it (faster for further away, really slow or non-existent motion when close), I keeps track of how long and far you are and adds up the product of those two to move you closer, and D watches how fast things are changing to try to reduce overshoot.

Depending on how you have the system set up, it seems to me that you would only need P to heat things.  There's no such thing as thermal inertia--you can't overshoot with temperature...I was about to go into a long explanation of this, but decided I'd better wait to see if anyone actually wants to hear about it.  Since you said you are overshooting, it means either the element you are using (are you using an element to heat?) has a good deal of excess energy once the desired temperature is reached, or the I value is high enough to cause continued energy contribution even after the temperature is reached.

I think I'd be inclined to play with the controller--set everything to 0, then turn P up a little and watch what happens.  Does it ever get to the desired temperature, or is it always a little cooler than it should be?  If it gets there, is it fast enough?  If it's not fast enough, turn up P.  If it never gets there, add some I.  If it gets there fast enough, but overshoots, turn down P and add some I (you could try D, but i'm not sure how it will work in a thermal system...).  Etc.

Wolfy

  • Guest
Re: PID controller settings?
« Reply #4 on: August 31, 2012, 07:22:04 PM »
I've never needed to view/set/change the P,I,D settings, the only changes I made were to adjust for the type of probe (I use a PT-100 rather than the k-thermocouple that was default) and then (after a few uses when I worked out how) run the auto-tune and it automatically determined the required settings.
(I guess you know that the auto-tune needs to be run while the system is in as realistic state as possible, likely while you are making a batch of cheese?)

It might depend on the brand/type of PID controller and the temperature probe used (since some are much more accurate in the temperature range used for cheese making), what brand/model is yours and how is it setup?

klschnepp

  • Guest
Re: PID controller settings?
« Reply #5 on: September 03, 2012, 01:19:36 PM »
Thanks to you both and Mike, your knowledge is much appreciated (and, can I just say "wow" --fantastic that you know this stuff!).  Okay, so I have run the auto tune twice and we are still off the mark, but getting closer.  I am really optimistic this is going to be a fantastic solution.  I am now, to use an extremely technical term, "fiddling" with the settings to see if I can get a bit closer to the desired state.  THANK YOU to all and I will post results once I have them.

Offline kdttocs

  • Medium Cheese
  • ***
  • Location: San Diego, CA
  • Posts: 38
  • Cheeses: 4
Re: PID controller settings?
« Reply #6 on: January 04, 2013, 09:32:36 PM »
Digging up older threat.

Have the PID settings / autotune been resolved? PID settings are almost never set manually in the DIY world. The settings are 100% dependent and impacted by the equipment and environment variables.

Couple things I may add. As already noted, an RTD prode (the PT-100 that was mentioned earlier) is better at handling temperature fluctuations providing a more consistent and buffered temp signal to the PID.

It hasn't been mentioned yet how the autotune was executed. In the beer world which is where I came from, the common method to autotune is to have the liquid at a lower temperature, ~10 degrees, when autotune is run. The goal is to have a good sample size so the PID can apply heat and monitor how the liquid reacts to it. As I said, the variables that detemin the PID settings are so varying that autotune is pretty much the only method to calibrate your setup.

Hope this helps.

klschnepp

  • Guest
Re: PID controller settings?
« Reply #7 on: January 22, 2013, 03:36:16 PM »
Thanks for posting and it has been mostly resolved.  Initial heat is fine, but I am not happy with ramp time for the scald, but been working around with a manual fiddle.   I did not auto tune at a lower temp than what my milk is at.  I might try that and report back!!   Thanks again!

wharris

  • Guest
Re: PID controller settings?
« Reply #8 on: February 04, 2013, 05:06:48 PM »
I am in the same boat with my new PID controller. I have it basically wired up, and can get to a desired temperature in with relatively little effort.
But using the controller to try and adhere to a temperature protocol seems to be a different matter all together.

(ie. Raising the vat temp 3deg/5min for 45 min.)

so, for now, I am still working that out. Will let you know what I find.


mjr522

  • Guest
Re: PID controller settings?
« Reply #9 on: February 04, 2013, 05:37:54 PM »
That's a cool looking setup you've got there, Wayne.  It's very similar to what I've been envisioning for my "utility sink vat" using contact heaters instead of a water bath idea.  If I were to proceed my biggest issue would be trying to justify to my wife why I need such a huge upgrade to our electrical panel...

What size vat are you going to be putting in that tub?

Getting the temperature to follow a particular path is something that requires more than just a PID--you essentially need something that feeds the PID new temperature targets at the right time.  I wouldn't be surprised if the control system you have will do this (which means it's more than a simple PID).  If it's just a PID, you'll need a "brain" of sorts to tell it what to do.  Good luck!

wharris

  • Guest
Re: PID controller settings?
« Reply #10 on: February 04, 2013, 05:41:30 PM »
24 gallon vat fits in there. You are probably right about the "brain".  Perhaps something by an Arduino.

stratocasterdave

  • Guest
Re: PID controller settings?
« Reply #11 on: February 04, 2013, 05:50:39 PM »
Wolfy, thanks for your reply.  I ran the auto tune and it has not had the desired result.  However, I am running it again as I type (after a day of experimentation).   Out of the box, mine was over running about 8 degrees C (eek).   It was not much better after tuning.   If you have a moment, it might be interesting to know what your P-I-D settings are??

Not too sure on your particular set up but the auto tune can take a very long time?  Did you let it run its coarse?  I know it took mine at least 3 hours!  However, my application may be quite different.

Your PID settings will be different than mine, or anyone elses with a differnt application.  Auto-tune will be best, in my opinion.  It should work very effectivly.

wharris

  • Guest
Re: PID controller settings?
« Reply #12 on: February 04, 2013, 05:54:51 PM »
I did not let mine finish.  I will run through a test this afternoon and let you know.

BobE102330

  • Guest
Re: PID controller settings?
« Reply #13 on: February 04, 2013, 06:01:24 PM »
A PID with "Ramp Soak" capability will heat along your temperature profile.  One example is http://www.amazon.com/gp/product/B004HHW2P8/ref=oh_details_o02_s00_i00  I haven't wired it up yet to report on how well it works.

I tried to auto tune my cave controller.  It just ran the temperature as cold as my mini fridge would go and stayed there for 10 hours.  Glad I didn't have any cheese in it, since it was a solid freeze. 

wharris

  • Guest
Re: PID controller settings?
« Reply #14 on: February 08, 2013, 01:45:13 PM »
Here is my setup as it is right now.  Testing my temp protocols.  I may in fact swap out this controller for one that support Ramp/Soak.
In this, you will see lots of safety violations,  i get that, but this is testing and not normal operations.  Just seeing if the guts work.
In fact, I am thinking about moving the temp probe from the water bath, to the cheese milk itself..  Again, just playing with ideas.




PID Settings:
SV=104
AL1=104.5
AH1=105
AL2=103.5
AH2=103

also, I did run a calibration on this a few days ago,  ran for like 7 hours, temp was up at 190ish.  I shut it down...
Have a feeling that something was amiss and it was not able to converge properly.