Happy HolidaySs Giveaway - Winners Re-Re-Re-Re-Drawn - 24 hours to Claim!

Get your HBT Growlers, Shirts and Membership before the Rush!


Home Brew Forums > Home Brewing Beer > Automated Brewing Forum > PID settings on arduino based hlt
Reply
 
LinkBack Thread Tools
Old 07-20-2012, 08:57 PM   #41
cwi
Registered User
Feedback Score: 0 reviews
Recipes 
 
Join Date: Jun 2010
Location: Austin
Posts: 845
Liked 32 Times on 28 Posts
Likes Given: 1

Default

Quote:
Originally Posted by carlisle_bob View Post
Hi

...and possibly consider how to improve (reduce) the lag and dead time before you spend a lot of effort on tuning things. In some systems it's easier to generate a known impulse (short duration power on) rather than a step. Either an impulse or a step can be used to get the basic lag and gain information you need.

Lag = how long before it got moving.
Gain = how much did you make it move with that input

Bob
Are you suggesting a software fix, which is the subject of this thread, to improve/reduce lag time?

As far as I know, most people already have their HLT heating element fully submersed, so physical changes like increasing the element size/number, or agitating to increase transfer are about all that is left to improve lag/gain.
__________________
cwi is offline
 
Reply With Quote Quick reply to this message
Old 07-21-2012, 01:17 AM   #42
carlisle_bob
Feedback Score: 0 reviews
Recipes 
 
Join Date: Apr 2012
Location: Carlisle, PA
Posts: 1,205
Liked 27 Times on 26 Posts

Default

Quote:
Originally Posted by cwi View Post
Are you suggesting a software fix, which is the subject of this thread, to improve/reduce lag time?

As far as I know, most people already have their HLT heating element fully submersed, so physical changes like increasing the element size/number, or agitating to increase transfer are about all that is left to improve lag/gain.
Hi

I'm suggesting that before you spend considerable time playing with step response plots that it's worth looking at your physical setup and seeing if it can be optimized. The optimization will indeed be constrained by the lag you have.

Bob
__________________
carlisle_bob is offline
 
Reply With Quote Quick reply to this message
Old 07-21-2012, 01:51 AM   #43
cwi
Registered User
Feedback Score: 0 reviews
Recipes 
 
Join Date: Jun 2010
Location: Austin
Posts: 845
Liked 32 Times on 28 Posts
Likes Given: 1

Default

Quote:
Originally Posted by carlisle_bob View Post
Hi

I'm suggesting that before you spend considerable time playing with step response plots that it's worth looking at your physical setup and seeing if it can be optimized. The optimization will indeed be constrained by the lag you have.

Bob
That is quite interesting, considering your approach to keezer temp control where you advocate the 'probe on cooling coil' method which requires considerably more tuning than the 'probe on keg' method which has been optimized physically.

RE: the issue at hand- besides increasing the number or size of heating elements (usually not an option) or adding agitation like I mentioned previously, do you have any specific ideas other than to 'make it physically perfect' before tuning the loop?
__________________
cwi is offline
 
Reply With Quote Quick reply to this message
Old 07-21-2012, 04:38 PM   #44
carlisle_bob
Feedback Score: 0 reviews
Recipes 
 
Join Date: Apr 2012
Location: Carlisle, PA
Posts: 1,205
Liked 27 Times on 26 Posts

Default

Quote:
Originally Posted by cwi View Post
That is quite interesting, considering your approach to keezer temp control where you advocate the 'probe on cooling coil' method which requires considerably more tuning than the 'probe on keg' method which has been optimized physically.

RE: the issue at hand- besides increasing the number or size of heating elements (usually not an option) or adding agitation like I mentioned previously, do you have any specific ideas other than to 'make it physically perfect' before tuning the loop?
Hi

Sticking to one thing at a time:

The closer the sensor is to the heat source the quicker it will respond. You can indeed move your sensor. In some systems the flow rate through the heat system will impact the lag. There are likely to be multiple limitations on flow rate, so you may not be able to fiddle it as much.

Bob
__________________
carlisle_bob is offline
 
Reply With Quote Quick reply to this message
Old 07-21-2012, 06:40 PM   #45
cwi
Registered User
Feedback Score: 0 reviews
Recipes 
 
Join Date: Jun 2010
Location: Austin
Posts: 845
Liked 32 Times on 28 Posts
Likes Given: 1

Default

Quote:
Originally Posted by carlisle_bob View Post
Hi

Sticking to one thing at a time:

The closer the sensor is to the heat source the quicker it will respond. You can indeed move your sensor. In some systems the flow rate through the heat system will impact the lag. There are likely to be multiple limitations on flow rate, so you may not be able to fiddle it as much.

Bob
That makes absolutely no sense. Moving the sensor closer to the corrective input only serves to increase cycling (for on/off systems) and lag (of the entire system for all types). Knowing how quickly the element is heating up doesn't do a lot of good. There is no reason to include the temp of the corrective input into the control loop of an HLT. Maybe for a RIMS tube or MLT where you don't want any localized overheating.

What flow rates are you talking about? I assume the HLT being talked about is using a submersed resistive heating element. General agitation/circulation is beneficial to improve transfer and therefore lag and gain.

This isn't that difficult. The issue is the PID library being discussed was not designed with such a slow responding system in mind. Some of the Auber PIDs come with different algorithms, logic, and parameter baselines specifically for brewing applications.

Personally, I think that on/off, or proportional if you want temps tighter than an on/off controller will provide, is more than sufficient for an HLT. Using gas, I do both, with a manual flame adjustment to get close, plus an on/off control. Adding some kind of circulation system is much more beneficial than trying to PID it. There is significant stratification in an HLT when heated either by direct fire or a submersed heating element. The heating time is also significantly reduced. A bubbler pump is the simplest solution, especially if you already have an aquarium pump for aeration, or from before you upgraded to pure O2.
__________________
cwi is offline
 
Reply With Quote Quick reply to this message
Old 07-23-2012, 01:58 AM   #46
FastTalker
Member
HBT_SUPPORTER.png
Feedback Score: 0 reviews
 
FastTalker's Avatar
Recipes 
 
Join Date: Sep 2011
Location: Nashville, TN
Posts: 130
Liked 4 Times on 4 Posts
Likes Given: 4

Default

Quote:
Originally Posted by SimBrew View Post
I got a arduino controlled hlt with 1500w element heating like 5 gal.

I overshoot my setpoint by about 10 F.

The integral is too slow to shut the element off once it get to the setpoint

My process class are far away and I don't have a lot of time with the kid to test differents settings.

What are your PID settings on setup like mine ?
The programming of the Ardunio PID library is very typical for a PID controller. It should work just fine for this application.

To get back to the OP, try adding derivative gain. This can help prevent overshoot as it attempts to slow down the rate of change of your temperature. Higher proportional gain can help to provide a similar result since it will decrease as you approach your setpoint. However, too high of a proportional gain can cause oscillation.

Tuning PIDs takes experience, especially for slow loops. And if you don't have a method for trending your temperature and controller output it can be hard to see which gains to adjust.
__________________
FastTalker is offline
 
Reply With Quote Quick reply to this message
Old 07-26-2012, 03:13 AM   #47
Adeering
Feedback Score: 0 reviews
Recipes 
 
Join Date: Jan 2012
Location: Sherwood, Arkansas
Posts: 685
Liked 46 Times on 38 Posts
Likes Given: 4

Default

Anybody who is using this library have some example code and how they are wiring this. Ive been working on this, but dont have the hardware to test what I have yet. Got some questions about how to use it:

1. Are you using the PWM digital outputs
2. If not are you using the code like in the RelayOutput example

Is there a way to simulate the code for testing?

__________________
Primary: None
Secondary: None
Bottle Conditioning/Carbonating: Apple Pie
Kegged: None :(
Bottled: None
Next Brews: Pumpkin Ale, Unknown
Adeering is offline
 
Reply With Quote Quick reply to this message
Old 08-10-2012, 03:28 AM   #48
jbrewkeggin
Feedback Score: 0 reviews
Recipes 
 
Join Date: Mar 2012
Location: Baltimore, MD
Posts: 29
Liked 1 Times on 1 Posts

Default

Quote:
Originally Posted by Adeering View Post
Anybody who is using this library have some example code and how they are wiring this. Ive been working on this, but dont have the hardware to test what I have yet. Got some questions about how to use it:

1. Are you using the PWM digital outputs
2. If not are you using the code like in the RelayOutput example

Is there a way to simulate the code for testing?
I wouldn't recommend using the PWM digital outputs if you are planning on using the PID library. I believe the point of using PWM is to manually adjust your water temperature by increasing/decreasing the duty cycle of the heating element. The PID library should do this for you if your PID constants are set correctly. I plan on setting these constants manually based on how one would tune a regular PID controller. From what I've read, people generally have problems with the Arduino PID Autotune library (at least for brewing applications). Check this thread for some sample code that Chuck dropped in, minus the autotune stuff. Also, I think Chuck posted a thread about a setup where you can switch between the Arduino and a PWM board he created.

I'm still brainstorming the simulation portion of this project.
__________________
jbrewkeggin is offline
 
Reply With Quote Quick reply to this message
Old 08-10-2012, 02:24 PM   #49
chuckjaxfl
Feedback Score: 1 reviews
Recipes 
 
Join Date: Feb 2010
Location: Jacksonville, FL
Posts: 327
Liked 19 Times on 12 Posts
Likes Given: 23

Default

The Arduino's analogWrite(ssrPin,XXX); for PWM is not useful for our purpose. Most of us are using zero-crossing SSR's, which only happens 120 times a second.

Yes, use the relay example from the Arduino site, it works great once you have acceptable values for P, I & D. That is the part that I think most of us find burdensome.

Regarding my PWM board, sure you could use it behind an Arduino, but I can't think of a good reason to do so. If you've got an Arduino, just use the Arduino. The "brain" on my PWM is just the $1.50, tiny version of the chip that's on the Arduino already. It's only useful as a stand alone PWM, or in conjunction w/ a "normal" PID (see Auber, eBay) that does not have a manual mode.

__________________
chuckjaxfl is offline
 
Reply With Quote Quick reply to this message
Old 08-10-2012, 03:42 PM   #50
chuckjaxfl
Feedback Score: 1 reviews
Recipes 
 
Join Date: Feb 2010
Location: Jacksonville, FL
Posts: 327
Liked 19 Times on 12 Posts
Likes Given: 23

Default

Oh, and for testing, I couldn't figure out a way to simulate, so I built a low-power model to play with.

I clamped a peltier junction between an ancient CPU waterblock and a chunk of aluminum heatsink, using the arduino to drive a MOSFET. It's crude, but worked to prove the code and everything before I moved up to the 115v crockpot.

image-2806068896.jpg  
__________________
chuckjaxfl is offline
 
Reply With Quote Quick reply to this message
Reply



Quick Reply
Message:
Options
Thread Tools




Newest Threads

LATEST SPONSOR DEALS