Ss Brewing Technologies Giveaway!

Home Brew Forums > Home Brewing Beer > DIY Projects > How do PIDs work?
Reply
 
LinkBack Thread Tools
Old 08-12-2009, 07:00 PM   #1
rocketman768
HBT_LIFETIMESUPPORTER.png
Feedback Score: 0 reviews
 
rocketman768's Avatar
Recipes 
 
Join Date: Feb 2008
Location: Evanston, IL
Posts: 1,086
Liked 22 Times on 19 Posts

Default How do PIDs work?

So, I am very familiar with PID control since I've taken a graduate course in control theory, but the outputs of the theoretical systems we play with are always analog values (continuously variable voltage or whatever else you want to imagine the units are). On the PID controllers I see, it seems the output is a relay of some sort, which tells me it's either full on or full off. Is this right? If I bought a PID controller, would I just rig it up with a relay to turn my mini fridge on and off?

rocketman768 is offline
 
Reply With Quote Quick reply to this message
Old 08-12-2009, 09:05 PM   #2
kerklein2
HBT_SUPPORTER.png
Feedback Score: 0 reviews
Recipes 
 
Join Date: Dec 2008
Location: Austin
Posts: 400
Liked 19 Times on 14 Posts
Likes Given: 3

Default

I believe these controllers just turn on and off to control. I guess in that sense the proportional part of the controller is just on or off, but its been a few years since I did anything with a PID. I think a lot of consumer type products work like this because the circuitry to do true proportional control is a little more involved, i.e. a PWM output to vary motor speed on the compressor. And plus, I think most fridges are set up to run at their maximum efficiency and just cycle on and off anyway.

__________________
kerklein2 is offline
 
Reply With Quote Quick reply to this message
Old 08-12-2009, 11:58 PM   #3
Funkenjaeger
Feedback Score: 0 reviews
 
Funkenjaeger's Avatar
Recipes 
 
Join Date: May 2007
Location: Nashua, NH
Posts: 1,637
Liked 8 Times on 7 Posts

Default

Yes, it is quite simply PWM output. Since things like refrigerators and heaters have very long time constants, the time scale of the output cycling is on the order of seconds (fine for a heater) to minutes (better for a fridge compressor)

__________________
Funkenjaeger is offline
 
Reply With Quote Quick reply to this message
Old 08-13-2009, 12:32 AM   #4
suprdlux
Feedback Score: 0 reviews
Recipes 
 
Join Date: Jun 2008
Location: Colchester, VT
Posts: 10
Default

Without knowing the specifics of your application or the specific controller you are looking at, I can only speak in general terms. PID controllers are analog devices which produce analog outputs (like you learned in class). To build an actual control system for an industrial application you would need to process the output in some way to run the output device typically an amp or a relay. If you were to build your own control system (i.e. purchasing the appropriate IC's and what not) then you could do whatever you wanted with the output. If you are buying something off the shelf the output will be processed in some way depending on the intended application of the device.

If you want to do temperature control on a fridge, PID control seems like a poor choice to me for a few reasons.

1. The compressor on a fridge should be run at 100% capacity or 0% capacity. This is a digital (binary) output. To do this you need to convert your analog output from the PID into a binary output which seems silly since there are other control systems which produce binary output as a default. You could do PWM, but this would be less efficient than running at 100%.

2. PID controllers can become unstable or oscillate if they are not tuned well. Repeatedly cycling a compressor can shorten the lifespan of the device. To effectively run the fridge you would need to really tune the control system well and I think you would still have problems (that is just my opinion based on building lots of control systems)

3. There are better, cheap, digital systems available to accomplish the desired task. For this type of temperature control, I personally would use an embedded microcontroller (there are many different systems available). Most systems have a built in ADC to convert your analog temperature input. You can easily customize you control system software to give better temperature control with minimal compressor cycling. Third your output is already binary (on/off), so you should only need a minimal amount of output signal processing to run you device. While I have never used the Arduino controller, but it looks like lots of people on this board are using it. I think there is even a thread were someone implemented a fridge temperature controller with it.

I noticed on your profile you have a Ph.D. in electrical engineering so I assume you realize there are many ways to implement a control system. I personally consider PIDs solely analog devices because that is how we treat them theoretically and that is how they were originally implemented. On the other hand, PID is also a control theory, where errors are corrected based on the current error, the sum of past errors, and the rate of change of error. The theory can be implemented easily on a digital device, but in my opinion this is not a true PID controller.

In any case I would love to hear more about you systems and if I can be of any help let me know.

Jake

__________________
suprdlux is offline
 
Reply With Quote Quick reply to this message
Old 08-13-2009, 01:18 PM   #5
rocketman768
HBT_LIFETIMESUPPORTER.png
Feedback Score: 0 reviews
 
rocketman768's Avatar
Recipes 
 
Join Date: Feb 2008
Location: Evanston, IL
Posts: 1,086
Liked 22 Times on 19 Posts

Default

Quote:
Originally Posted by suprdlux View Post
Without knowing the specifics of your application or the specific controller you are looking at...
Thanks man. I agree that PID control is wrong for the fridge since I now know for certain that the compressor should be full on or full off. I should have opened up the thermostat on my fridge sooner, cuz now I can see it's just a relay that switches the compressor on or off...there is no in-between. I also know about stability issues and how to tune via root locus and bode plots. Thanks for offering help with a microprocessor too, but the reason I was looking at a PID controller is because I've found some on ebay for like $38 which also do on/off control (which is what I was confused about in my first post). I have made a temperature probe with display with an Atmega16 for maybe $15, and from there it is a short step to make any kind of controller you want, but the extra $20 it would cost to get the professional controller is worth all the soldering and packaging work I would have to do for my custom version to look nice and have a nice interface.

Now I just have to figure out how to rip my mini fridge apart to make it larger...dremel?
rocketman768 is offline
 
Reply With Quote Quick reply to this message
Old 08-13-2009, 10:50 PM   #6
suprdlux
Feedback Score: 0 reviews
Recipes 
 
Join Date: Jun 2008
Location: Colchester, VT
Posts: 10
Default

I have a strong hunch that most of the PID controllers which are advertised are actually not PID controllers. They are probably all microprocessor based given how they function and the fact that the cost of microprocessor based controls are probably less than actual analog PID controllers. The one downside to buying the control on Ebay is that you may spend more time and money getting it working in your system than it would cost to extend you existing device. I personally build almost all of my stuff from scratch, but I am very type A and I want (and need) control over every aspect of what we build. That and I have access to a very nice prototyping lab to cut my circuit boards.

Good luck with your project.

Jake

__________________
suprdlux is offline
 
Reply With Quote Quick reply to this message
Old 08-14-2009, 02:34 PM   #7
rocketman768
HBT_LIFETIMESUPPORTER.png
Feedback Score: 0 reviews
 
rocketman768's Avatar
Recipes 
 
Join Date: Feb 2008
Location: Evanston, IL
Posts: 1,086
Liked 22 Times on 19 Posts

Default

First, even analog PID controllers are only approximations to PID control, so microprocessor-based "PID" control doesn't really bother me. But secondly, you have a prototyping lab? If I sent you the PCB design, you could print the board?

__________________
Brewtarget: Free Brewing Software
Brewtarget source code
Donate
rocketman768 is offline
 
Reply With Quote Quick reply to this message
Reply



Quick Reply
Message:
Options
Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Switching power between elements/PIDs possible? Rhino17 DIY Projects 47 05-14-2009 01:10 PM
How do PIDs/SSRs work? illin8 Equipment/Sanitation 11 05-08-2009 10:22 PM
Do PIDS need to be temperature calibrated? JVD_X Equipment/Sanitation 4 02-19-2009 02:52 PM
Understanding my PIDs Squeeky DIY Projects 7 06-14-2008 04:58 AM
HERMS with two PIDs Squeeky Equipment/Sanitation 0 05-26-2008 11:06 PM