PID Loops

My trailer's using a single temperature sensor and controlling a pair of fans. It helps with the heat- the side that's unfinished (the front) faces the sun, so it's a losing battle. (No insulation) But it works great. Yet I can't help but wonder and theorize how *early* I could turn on the fans when the sun comes up, or other alternatives.

But I once had a job in process control, and kinda fell in love with the PID loop, and was told to respect the highly-statistical internals, just to use it as it sits.....and now it'd be cool to USE one.

Does anyone have any ideas on this? Google has nothing; either hardware loops, or software I could get for several hundreds of dollars....and dollars aren't even in the budget. ;)

(For those that don't know, it's a module that tracks the change of a process in three different ways: Proportional, Integral, and Derivative.)
 
My trailer's using a single temperature sensor and controlling a pair of fans. It helps with the heat- the side that's unfinished (the front) faces the sun, so it's a losing battle. (No insulation) But it works great. Yet I can't help but wonder and theorize how *early* I could turn on the fans when the sun comes up, or other alternatives.

But I once had a job in process control, and kinda fell in love with the PID loop, and was told to respect the highly-statistical internals, just to use it as it sits.....and now it'd be cool to USE one.

Does anyone have any ideas on this? Google has nothing; either hardware loops, or software I could get for several hundreds of dollars....and dollars aren't even in the budget. ;)

(For those that don't know, it's a module that tracks the change of a process in three different ways: Proportional, Integral, and Derivative.)

If you are not worried about overshoot, it's unclear what PID would accomplish for you. Do you have any sort of MCU or PC that you can program? Or does this need to be standalone ?

In any case, there are typically several standalone PI or PID temperature controllers available on eBay at any give time. I have a boxful that I can put up for sale on at my personal Internet Home Automation and Electronic Porch Sale at www.ECOntrol.org/porch_sale.htm

... Marc
 
If you are tring to do this with your Home Automation computer and sensors then you will find the Derivative value to be hard to determine because of the relatively low sampling rate and low resolution of the temperature sensor relative to the temperture you are trying to control. I did post a how-to project on cocoontech http://www.cocoontech.com/index.php?showtopic=6864 where I did this to control an electric space heater. The project describes the engineering rationale and gave the source code. The integral component is used to null-out steady state errors and is usually a small contributor to the overall control effectiveness for something like what you are trying to do. The PD control is essentially what is used to close the control loop and provide anticipation to not overshoot.

In your case you are trying to account for the effect of sunlight as part of the control. I suspect once the sun has heated the area then the fan will be on 100% so there really is no feedback control loop. If you had a light/sunlight sensor that could detect when the sun was shining on the trailer then you could start your fan based upon it. This would at least keep it cooler longer. This is likley no more than time-based from sunrise and open loop control.

My trailer's using a single temperature sensor and controlling a pair of fans. It helps with the heat- the side that's unfinished (the front) faces the sun, so it's a losing battle. (No insulation) But it works great. Yet I can't help but wonder and theorize how *early* I could turn on the fans when the sun comes up, or other alternatives.

But I once had a job in process control, and kinda fell in love with the PID loop, and was told to respect the highly-statistical internals, just to use it as it sits.....and now it'd be cool to USE one.

Does anyone have any ideas on this? Google has nothing; either hardware loops, or software I could get for several hundreds of dollars....and dollars aren't even in the budget. ;)

(For those that don't know, it's a module that tracks the change of a process in three different ways: Proportional, Integral, and Derivative.)

If you are not worried about overshoot, it's unclear what PID would accomplish for you. Do you have any sort of MCU or PC that you can program? Or does this need to be standalone ?

In any case, there are typically several standalone PI or PID temperature controllers available on eBay at any give time. I have a boxful that I can put up for sale on at my personal Internet Home Automation and Electronic Porch Sale at www.ECOntrol.org/porch_sale.htm

... Marc
 
My trailer's using a single temperature sensor and controlling a pair of fans. It helps with the heat- the side that's unfinished (the front) faces the sun, so it's a losing battle. (No insulation) But it works great. Yet I can't help but wonder and theorize how *early* I could turn on the fans when the sun comes up, or other alternatives.

But I once had a job in process control, and kinda fell in love with the PID loop, and was told to respect the highly-statistical internals, just to use it as it sits.....and now it'd be cool to USE one.

Does anyone have any ideas on this? Google has nothing; either hardware loops, or software I could get for several hundreds of dollars....and dollars aren't even in the budget. ;)

(For those that don't know, it's a module that tracks the change of a process in three different ways: Proportional, Integral, and Derivative.)
The code is not majic, not even a well kept secret. Look here to see how to implement it. In the pseudo code section the DT is the scan interval (in seconds) of the controller.

I have many years experience in process control and have used this countless times. The PID is not well suited for on-off control of fans. It is best implemented in an analog control loop. Now if you had variable speed fans.........

On-off control of fans is more suited to be implemented with a thermostat (on-off).

Not to say it cannot be done......I have implemented PID temperature control using on-off control of a heater. The heater was turned on/off in a 10 second cycle....on for 1 off for 9, on for 2 off for 8.....etc. I dont think this would work very well with a fan.
 
Back
Top