PID Tuning - HELP!

Homebrew Talk - Beer, Wine, Mead, & Cider Brewing Discussion Forum

Help Support Homebrew Talk - Beer, Wine, Mead, & Cider Brewing Discussion Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.

onelegout

Well-Known Member
Joined
Feb 17, 2009
Messages
248
Reaction score
6
Heya everyone,
Today I tested my HERMS PID system. I brought the temps of the HLT and BK up to around 60 degrees and turned off the BK elements. I then pretended the BK was the MT and recirculated it through the heat exchange coil in the HLT. The sensor is a Type J thermocouple in a home-built thermowell inside the Heat exchanger output.

Every 5 mins I measured the temperatures of the BK and HLT, and took the PID's reading and logged them.

The target (set) temp was 66 degrees.

The problem I found is that the PID stalled when it got to 67 degrees, and stayed there, while the HLT and BK temps dropped.

I had set the PID to 'autotune', which as I understands bypasses the P, I, and D settings.

There's one setting that I don't know what it is, it says '+5c' on the PID but seems to be some sort of temp correction. The temp always reads wrong unless I adjust it to the right temp via the '+5c' setting.

Any tips on whats wrong?

Cheers,
H

Here's the log
http://i48.tinypic.com/2r2qiyc.png
 
AutoTune does not "bypass" the P,I, and D parameters. It attempts to figure out what the best values are to use for P,I, and D.

I'm not following exactly what you did, but when I autotune my PID, it takes it a while to finish. the light next to the "AT" blinks to let me know that the PID is learning, but after going through the AT process a few times and paying attention to what was happening, I believe this is how it works (at least for my PID):

When you enter AT, the heater element shuts off. Immediately. No matter what the temp actually is.

The PID waits a while and lets the temp drop so that it can understand the rate at which your system loses heat.

Then it hits the heat for a short period and stops again. It is learning how much lag there is between a boost of heat and the temp on the probe actually changing.

After a while, it hits the heat again, for a longer time. I believe it is determining how much temp rise you get from a boost of heat, as well as how long it takes for the temp to STOP rising after the heating element is shut off.

After all of this (which can take 10 to 15 minutes and your temps will be very low), it exits AT mode with some "learned" P,I, and D values and then the system starts to behave properly.

You shouldn't have to AT it every time you use it, but you have to suffer through a low temp mash on that first batch where you tune it.
 
In the log you attached, what exactly are the three numbers representing?

PID is what?
PID M is what?
HLT is what?
 
Aah ok that's interesting, so I'll try that tomorrow. The problem I have is that it's an italian PID and the documentation they sent me is for a slightly different model!
I'd really like to find out what that '+5c' setting is, anyone know?

BTW walker, would you mind sharing your PID settings with me? That way I've got something to work from.

Cheers,
H
 
When I get home from work, I will check to see what the P,I, and D settings are on my PID. They were set by the AT feature, so I don't know what they are off hand.

Quick question: does your PID have two displays on it like this:

23621web.jpg


Or just one display, like this:

aa_1_b.JPG
 
If its Auber, they have a downloadable Manual that was VERY Helpful for me when I was starting out using mine.
 
Oh... and the "+5" setting is probably a temp correction value.

My temp probe reads a little off... a couple of degrees... so I also have to set the correction factor on my PID to compensate for that error.

If I put a +5 setting in mine, that would mean "take whatever temp the probe is reading and add 5 degrees to it to get a proper temp reading"
 
Actually, Bowtie.... I would like to know how your Auber PID behaves during auto tune so I can compare to my PID (which is a TET612).

Does yours behave like I described above?
- immediately shuts off for a long time
- small boost of heat then shuts off for another long time
- large boost of heat and then shuts off for another long time
- exits AT mode and starts heating everything back up
 
Thanks for your help!

It's got 2 displays, top one shows the measured temp, bottom one shows set temp.

I did think that the +5c setting was temp correction, and it does seem to work as a temp correction setting.

Sorry, I should have said earlier:
PID is the PID's measured temp at HEX out
PID M is my measurement of the hex out using a proven thermometer
HLT is my measurement of the HLT using a proven thermometer


Edit: By the way, with those PID settings it wont even turn on the output if it's less than 10*c lower than the set temp. I have to set it to AT for it to output at all! Tomorrow I'm going to brew a batch and settle for the dodgy autotune temps so that I can try and get P, I, D settings right for my system, but I would love to try one first in the morning using your settings so if you could find them out for me that would be awesome! Better still, if a couple of people could share their settings that would really help in understanding it.

Cheers,
H
 
Thanks for your help!

It's got 2 displays, top one shows the measured temp, bottom one shows set temp.

I did think that the +5c setting was temp correction, and it does seem to work as a temp correction setting.

Sorry, I should have said earlier:
PID is the PID's measured temp at HEX out
PID M is my measurement of the hex out using a proven thermometer
HLT is my measurement of the HLT using a proven thermometer

Ok.

Where I was going with all of those questions is that, perhaps, a single display PID might show you the set temp during the AT process instead of the measured temp.

I guess it MIGHT be possible that even the dual display might stop updating when in AT mode on your PID. Mine does not do that, but I have no experience with any PID other than the one I currently own.

Out of curiosity....

in your log, when did you enter the auto tune process? Is all of that data captured AFTER auto tune was started? Or did you start collecting data before entering auto tune?

Before you answer, I wanted to take a guess... :D

Did you start the auto tune at approximately 14:12?
 
Actually, Bowtie.... I would like to know how your Auber PID behaves during auto tune so I can compare to my PID (which is a TET612).

Does yours behave like I described above?
- immediately shuts off for a long time
- small boost of heat then shuts off for another long time
- large boost of heat and then shuts off for another long time
- exits AT mode and starts heating everything back up


Mine shuts off... i don't know about a long time, because I get impatient and unplug and restart...

Repeats with a small boost of heat and continues until I take out of AT

I got really impatient and just unplugged and quickly reset and took out of AT.

I am pretty applicational and bare bones when it comes to using mine. (mind you im just in the testing phase... my HERMS setup is not finished yet)
 
Mine shuts off... i don't know about a long time, because I get impatient and unplug and restart...

Repeats with a small boost of heat and continues until I take out of AT

I got really impatient and just unplugged and quickly reset and took out of AT.

I am pretty applicational and bare bones when it comes to using mine. (mind you im just in the testing phase... my HERMS setup is not finished yet)


Ok. You will want to let it finish the AT process before you really start using it. You need to give it a chance to learn about the system and fully complete an AT run.
 
Oh... and the "+5" setting is probably a temp correction value.

My temp probe reads a little off... a couple of degrees... so I also have to set the correction factor on my PID to compensate for that error.

If I put a +5 setting in mine, that would mean "take whatever temp the probe is reading and add 5 degrees to it to get a proper temp reading"

Ok.

Where I was going with all of those questions is that, perhaps, a single display PID might show you the set temp during the AT process instead of the measured temp.

I guess it MIGHT be possible that even the dual display might stop updating when in AT mode on your PID. Mine does not do that, but I have no experience with any PID other than the one I currently own.

Out of curiosity....

in your log, when did you enter the auto tune process? Is all of that data captured AFTER auto tune was started? Or did you start collecting data before entering auto tune?

Before you answer, I wanted to take a guess... :D

Did you start the auto tune at approximately 14:12?
:) Actually it had been on autotune for at least 20 mins before I started logging (There's no manual 'ON' setting for the elements in my system (apart from one extra 'boost' element in the BK which is manually switched) so I have to set the set temp high (I just set it to 200*c) and make the PID switch it on. I have to do this because I don't have sensors inside the keggles, just one on the output of the hex, and I don't want to have to recirc while getting up to temp 'cause it seems like a waste of energy.
 
hmmm....

when did you switch the pump on for recirculation?

The reason I am asking is because the time of 14:12 seems to have some event associated with it.

That's the time that all of these things happened:
- HLT temp began to fall.
- BK (faking as MT) temp started to fall.
- PID temp reading became static.

Did the PID ever EXIT auto tune for you? You said it was on for 20 minutes before you started logging data, and your log covers a full hour of time. I would be shocked if the PID was auto tuning for that whole hour!
 
hmmm....

when did you switch the pump on for recirculation?

The reason I am asking is because the time of 14:12 seems to have some event associated with it.

That's the time that all of these things happened:
- HLT temp began to fall.
- BK (faking as MT) temp started to fall.
- PID temp reading became static.

Did the PID ever EXIT auto tune for you? You said it was on for 20 minutes before you started logging data, and your log covers a full hour of time. I would be shocked if the PID was auto tuning for that whole hour!
Yeah it's really odd! The pump was recirculating as soon as I started logging the temps. The only thing I can see different about 14:12 was that it hit the set temp. I really can't remember whether the autotune was still on or not at the end of the test. I would have kept logging it but I had a tiny leak which had been dripping on the control box and I had to shut everything down to fix it.
 
Yeah it's really odd! The pump was recirculating as soon as I started logging the temps.


Ok... I think this might be an issue. When you enter auto tune, the PID needs to have an accurate temp measurement available so that it can learn about the system.

You entered AT mode 20 minutes before you started pumping. Since your probe only gets to measure the water that is moving through your pump, you had the PID backed into a corner here. The PID was not getting a chance to see the heat gain and loss of the system as it tried to learn about the system.


Now... that doesn't explain why the PID temp reading gets stuck at 67 when your proven thermometer is measureing temps lower than this in both of the vessels directly, but I think you'll have better luck with the PID programming if you make sure that the pump is running the whole time that the PID is in auto tune mode.
 
Ok... I think this might be an issue. When you enter auto tune, the PID needs to have an accurate temp measurement available so that it can learn about the system.

You entered AT mode 20 minutes before you started pumping. Since your probe only gets to measure the water that is moving through your pump, you had the PID backed into a corner here. The PID was not getting a chance to see the heat gain and loss of the system as it tried to learn about the system
Aaaah! That's the problem! Good thinking! :D So the autotune may have failed due to the control output not affecting the measured temp, it's so obvious suddenly :)

Tomorrow I'll get the HLT up to 66*c, and mash in with water from the BK, then start recirculating the Mash and start autotune. My keggle is insulated so it shouldn't lose much temperature with a tun full of grain.

Would still be great to see what yours and others' settings are though for P, I and D.

Cheers,
H
 
Aaaah! That's the problem! Good thinking! :D So the autotune may have failed due to the control output not affecting the measured temp, it's so obvious suddenly :)

Tomorrow I'll get the HLT up to 66*c, and mash in with water from the BK, then start recirculating the Mash and start autotune. My keggle is insulated so it shouldn't lose much temperature with a tun full of grain.

Would still be great to see what yours and others' settings are though for P, I and D.

Cheers,
H

I would still try an autotune with just water first and let that finish the process and get yor water to the right temp.

Once that is all done, then mash in and see how well it works.

I'll put my P,I,D in this thread in about 2 or 3 hours when I get home.
 
Cool thanks! Now got to walk to my mums house where my brewery is (no space to brew at my flat) - I'm going to try autotuning with water again, but will remember to only start it once it's been recirculating for a few minutes. If it works well, I'll go ahead and brew a simple pale ale. If I can't get it working properly, I'll compare my autotune settings to yours and see what the difference is.

Cheers,
H


Edit: I'm now at my mums house, and I've gone and got a leak in my HEX by accident, so now I've got to wait for my friend to get up so I can use his soldering stuff to fix it!

Edit: Ok Finally the leak's fixed, i've redesigned my hex coil and it looks much neater. Heat is on and it's all heating up. Once it's at about 60*c I'm going to start it recirculating and turn on the autotune :)

Edit: half an hour into the log, all appears normal but haven't hit set temp yet. Autotune is still running, I just checked the manual (which is for a slightly different model PID) and it lists the reasons why the Autotune might fail. One of the reasons is 'if it lasts for more than 9 hours'.... This could take a while!
 
I'm in England so it's still only 2pm here : ) and yes it's 50 minutes in and still autotuning.
I'm going to let it run for a few hours and see how it goes. I've emailed the company who make the PID again to see if they can advise how long it should take to autotune, but I have a feeling that this was designed more for industrial sized plant operations and needs a very long autotune time.

Just hit 66*C so let's see what happens!

Edit: Here's a pic for ya! Brewed this on it a month or so ago, but missed temps and had a stuck mash. Big problems! but it turned out OK :)
2i1f600.jpg
 
strange.

But, like I said, the only PID I have *any* experience with is the one I own, so my whole essay on the autotune behavior was based on very limited data. :D

good luck! I'll be watching this thread.
 
Cheers :)

Return of the mysterious 67*C anomaly!

As soon as it hit the set temp it turned off the output. The HLT and BK(MT) temps dropped but the sensor is still reading 67/68 (it flicks between the two as if it's reading 67.5) The Autotune is still running though, so I'll use it for another half hour before I give up :D
 
You're more patient than me. I'd be sick of it at this point.

If you decide to cancel auto-tune, are you just going to plug in my PID numbers and see what happens?

The sticking PID read out even when the temps in the other vessels is visibly falling is a mystery to me. It makes me wonder if your PID is working right.
 
Yeah I canceled autotune, I'm really starting to wonder about my sensors and PID.
I've got another one which seems to do the same thing though! I'll try swapping them next week.
I've put in your PID values, and the temp seems to be read much more often now, but the output light seems to flash as if it's switching on and off every second or less - before it was either on or off, I hope this doesn't fry my SSRs!

I've reset the temp correction to the correct value to try and see if that makes a difference.

It's just going to be a case of waiting and trying different things I think!
 
I've put in your PID values, and the temp seems to be read much more often now, but the output light seems to flash as if it's switching on and off every second or less - before it was either on or off, I hope this doesn't fry my SSRs!

Son't worry about those SSRs. Rapid on/off switching is the whole reason we use SSRs. They are just large chunks of silicon and won't wear out due to the switching.
 
Ok I've decided to make a decision here and buy new PIDs and sensors. It's very hard to find good PT100 sensors here in the UK, do you have any reccomendations on which to use? I'd really like to make a PT100 switch box as well, so I could switch between inputs for different functions (sensor in HLT for heating HLT water, switchable with sensor in Heat exchanger output for herms use.) but I don't know much about that kind of thing. I know that thermocouples require special wire and that you can't just wire them up to a switch, but is the same true for RTDs?

P.S. which PID should I get? The auber one?
 
I did not buy the Auber PID. I only used the image as a reference.

I bought my PID off ebay. It's a "TET612" and shipped from China.

Are you sure the PID and sensors are bad, though?



As for the RTD's. They use more than 2 wires with the point of that being that the PID can compensate for resistance added by things like long wires or connectors or switches.

You should be able to use a selector on RTDs with out any issues, but this is me just repeating what I have read. I have not actually done this myself.
 
I did not buy the Auber PID. I only used the image as a reference.

I bought my PID off ebay. It's a "TET612" and shipped from China.

Are you sure the PID and sensors are bad, though?



As for the RTD's. They use more than 2 wires with the point of that being that the PID can compensate for resistance added by things like long wires or connectors or switches.

You should be able to use a selector on RTDs with out any issues, but this is me just repeating what I have read. I have not actually done this myself.

I'm pretty sure that its a bad sensor or some other problem - I'm going to try and get some good PT100 probes anyway, and if that doesn't help things at least I'll have some better quality sensors :)
 
Ok, today I took the control box indoors and did some tests. I had diagnosed the problem as a faulty sensor, or faulty PID. I decided to test the sensors' accuracy with an ice bath, tepid water bath, and boiling water.

I had three types of sensor, pt100 sensors from virtual village, K type thermocouples from virtual village, and J type thermocouples from ebay.

The PT100 sensors did not work at all, giving me an error in every configuration.

The J type thermocouple I had been using in my tests at the beginning of this thread would only read up to 67*c.

The K type thermocouple would only read up to 45*c

I had 3 J type thermocouples, so tried one of the others that I had not used, and hey presto it works perfectly! Senses the temperature accurately and correctly all the way up to boiling point. I'm now going to fix a couple of leaks on the brewery and run another autotune test with the new sensor.
 
my first probe was a pt100 from virtual village. The probe worked fine for me, but the cable connected to the thing wasn't very sturdy and developed a loose connection after a while.

When you had your pt100's connected, did you change the setting on the PID to tell it that you were connecting a pt100?
 
My PIDs are supposed to be able to determine what type of sensor it is automatically, but I'm sure they don't do it correctly.
I'm going to run the autotune test now, but I'm doing it from cold without bringing the temps up to around 60*c first. Is this the right thing to do or should I get it to temp first?
H
 
My PIDs are supposed to be able to determine what type of sensor it is automatically, but I'm sure they don't do it correctly.

Oh, wow. I've never seen that before.

I'm going to run the autotune test now, but I'm doing it from cold without bringing the temps up to around 60*c first. Is this the right thing to do or should I get it to temp first?
H

What I saw suggested (and what I did myself) was turn the PID on and let it start heating the water up by itself. Once it got near the set temp, then flip it into auto-tune mode and wait.
 
ok cool well what I'm going to do is test it autotuning from cold, and see how it goes, then if it doesn't work as I'd have liked I can give it another go tomorrow. I fixed a few leaks too today, so even if this doesn't work at least I've done something productive!

25 mins into the autotune so far, and it seems to be going about right. The only anomaly I've seen is that my current reading of the BK(MT) is a degree higher than the output of the hex, which is odd!
 
Back
Top