PI, PID, Proportional, and outdoor reset control algorithm questions

  • Active since 1995, Hearth.com is THE place on the internet for free information and advice about wood stoves, pellet stoves and other energy saving equipment.

    We strive to provide opinions, articles, discussions and history related to Hearth Products and in a more general sense, energy issues.

    We promote the EFFICIENT, RESPONSIBLE, CLEAN and SAFE use of all fuels, whether renewable or fossil.
  • Super Cedar firestarters 30% discount Use code Hearth2024 Click here
Status
Not open for further replies.

Nofossil

Moderator Emeritus
Hearth Supporter
Sorry if this post is cryptic. My brain is fried, and I've been staring at numbers for too long. I've added variable speed circulator control to the NoFossil Control System, and I've buried myself deep in the world of control algorithms. Last time I did this was ABS systems for airplanes - wood heat is a little different. I have a couple of questions if there's anyone else out there who has injured brain cells on this stuff:

After a few simulations, I'm thoroughly convinced that using the derivative term is a waste of time. The signal noise is too high, and the response time is so slow that there's no point. Is anyone using the derivative portion of a PID control for space heating applications? Does it actually help?

I think I could dispense with the integral term as well if I adaptively set the control bias using the reset ratio, giving me a proportional-only controller that should be able to maintain temperature with virtually no offset. It would be nice to not have to deal with the whole integral windup problem.

Has anyone done this? I find lots of references to outdoor reset controllers and to proportional controllers, but it seems logical to combine the two.
 
I always thought differential was for fast moving systems where preventing overshoot was a necessity. That said, the heater controller I used to tune (semiconductor heaters) was PI only.

I've often thought (and continue thinking...) about building a controller for my wood stove with a simple proportional response within a fairly narrow band. It's certainly worth asking the question: how tightly do you really need to control, anyway? Best thing to do is just to try it. If you do end up adding an I term, you can add rules to drop the summation on setpoint change, or only calculate within a certain threshold of your setpoint, both of which help a lot in quelling the windup.
 
buck1200 said:
I always thought differential was for fast moving systems where preventing overshoot was a necessity. That said, the heater controller I used to tune (semiconductor heaters) was PI only.

I've often thought (and continue thinking...) about building a controller for my wood stove with a simple proportional response within a fairly narrow band. It's certainly worth asking the question: how tightly do you really need to control, anyway? Best thing to do is just to try it. If you do end up adding an I term, you can add rules to drop the summation on setpoint change, or only calculate within a certain threshold of your setpoint, both of which help a lot in quelling the windup.

You have to drop the summation on setpoint change (or any parameter) unless you like odd behavior. The other problem is that tuning integral gain is hard to explain. My real question is whether it's necessary at all. Integral gain is only needed to deal with offset error.

I think the big problem with proportional-only controllers is that you have to make the proportional band REALLY small if you want to avoid offset over a wide range of outside temperatures, and too narrow gives you unstable operation. Offset is a function of the difference between the current outdoor temp and the temp at which the proportional controller is 'tuned' - where the control bias exactly matches the necessary control input to give you the setpoint temp.

If you used an outdoor reset ratio to choose a different control bias for the current outdoor temp, then you'd be 'tuned' all the time, plus or minus only factors such as insolation and wind. That should give you almost no offset error in most cases. I'm pretty sure I'm right, but it seems obvious enough that I feel like people would be doing it already.

Hypothesis #1: Everyone is doing it already, and I'm just late to the party.

Hypothesis #2: There's some fatal flaw in my reasoning, and control gurus the world over are laughing at me already.

Hypothesis #3: I'm actually on to something that would be a big improvement in heating system controls.

I'd like to narrow down the range of possibilities here ;-)
 
Are you trying to vary the speed of your distribution circulator based on actual heat loss? If so, I think a simple two point control (fixed differential) around the reset ratio would do the trick, though I must admit I'm no hydronics expert and might not know what you're shooting for here. But if that is what you're doing, then an indoor temp sensor is what you need to offset the reset ratio to account for non-boiler heat sources. What's one more analog input at this point, right?

But again, I'm not completely clear on what you're up to here...
 
nofossil said:
If you used an outdoor reset ratio to choose a different control bias for the current outdoor temp, then you'd be 'tuned' all the time, plus or minus only factors such as insolation and wind. That should give you almost no offset error in most cases. I'm pretty sure I'm right, but it seems obvious enough that I feel like people would be doing it already.

Hypothesis #1: Everyone is doing it already, and I'm just late to the party.

Hypothesis #2: There's some fatal flaw in my reasoning, and control gurus the world over are laughing at me already.

Hypothesis #3: I'm actually on to something that would be a big improvement in heating system controls.

I'd like to narrow down the range of possibilities here ;-)

I won't pretend for a minute to fully understand what you are talking about. With that said, I think your assumption above is correct assuming that you have good insulation and therfore the wind is not such a large factor. Otherwise I assume you would need to account for wind as well. Taking outdoor temp into consideration is something that has been done in heating controls (even some surprisingly old devices) but I have not heard of it being integrated into the controls I have looked at recently. Certainly using it to control a variable speed pump is something I have not seen. Good luck. You are way beyond my understanding with all this, and we already lost an hour today (so to speak).
 
buck1200 said:
Are you trying to vary the speed of your distribution circulator based on actual heat loss? If so, I think a simple two point control (fixed differential) around the reset ratio would do the trick, though I must admit I'm no hydronics expert and might not know what you're shooting for here. But if that is what you're doing, then an indoor temp sensor is what you need to offset the reset ratio to account for non-boiler heat sources. What's one more analog input at this point, right?

But again, I'm not completely clear on what you're up to here...

What I'm up to here is trying to put together the best control algorithm the world has ever seen. Or at least understand what the alternatives are.

Offsetting the reset ratio is fine if you're maintaining a constant temperature and don't have sudden changes in heat load. However, it doesn't deal well with step changes (like coming off setback, or an open garage door).

Here's my understanding:

With an outdoor temp of 10 degrees and a setpoint of 72, assume the reset ratio dictates 50% of capacity. The actual indoor temp is 62. The offset algorithm in effect pretends that the outdoor temp is 10 degrees colder, but that only results in an output of 60% of capacity. It will take a very long time to get up to temp.

In this example I'd need an indoor temp of about 20 to get 100% output from my heating system using offset reset ratio control. A pure proportional control will give me 100% at around 70 degrees, depending on the proportional band. However, a proportional controller with a 4 degree band will only give me 70 degrees if it's -20 outside.

I want the full output brought to bear quickly when the temperature gets more than a degree below the setpoint, but I don't want to live with offset.
 
nofossil said:
What I'm up to here is trying to put together the best control algorithm the world has ever seen. Or at least understand what the alternatives are.

NoFo- it's excellent that you are so interested in continuing to explore, improve, and share, and not content to simply say "my system runs."
 
This whole PID thing is greek to me. But, never at a loss for words no matter how out of my depth I happen to be, let me ask: Is there a Fuzzy Logician in the house? Would it be possible to identify the variables, and construct some peusodo-code that might help us understand the problem? Also, is there an affordable (prefereably free) fuzzy logic development environment that would work with Excel and VBA?
 
Smee said:
This whole PID thing is greek to me. But, never at a loss for words no matter how out of my depth I happen to be, let me ask: Is there a Fuzzy Logician in the house? Would it be possible to identify the variables, and construct some peusodo-code that might help us understand the problem? Also, is there an affordable (prefereably free) fuzzy logic development environment that would work with Excel and VBA?

Been a while since I played with fuzzy logic (or neural networks, for that matter). Both techniques are really helpful when you don't know for sure the relationship between parameters.

In the case of home heating systems, we know the qualitative relationships really well. It's just the quantitative portion that's unknown. As far as I remember, fuzzy logic and neural networks would be overkill in this situation. In fact, even a simple PID controller is overkill. While PID is a very mature and well understood technique, it requires tuning that's way beyond what the typical installer or homeowner is going to be able to do. To tune a PID controller, you need to know parameters like the 'process gain' of your house - that is, the relationship between a change in heat input and the resulting change in steady-state room temperature. This quickly gets pretty esoteric, and it's impossible to get controlled conditions suitable to make the measurements needed.

Here's a simple example of a typical PID tuning test: at a constant control input, let the system reach steady state. Keeping all external conditions constant, increase the control input by 5%. Wait for the system to reach steady state again. Measure the new steady state value and the time required to reach 63% of the difference between the two values. For a house, this would take somewhere in the neighborhood of 10 to 20 hours, during which time the outdoor temperature, wind, and sunshine would have to remain constant. This kind of test is easy on a high-speed process, but not so much for a heating system.

I think where I'm headed is what's called 'adaptive controls', but at a fairly simple level. I think my controller can learn the approximate relationship between heat input (could be water temperature or zone duty cycle, depending on the system) and outdoor temp. It could then use that as the nominal operating point for a simple proportional control loop.

If we use radiant loop temperature as the 'heat input' that we're controlling, I think the system could pretty quickly learn that an outdoor temperature of 20 requires a radiant loop temperature of 100, and that the radiant temp has to increase by about a degree for every two degree drop in outdoor temp.

Knowing that, the controller could choose a nominal operating point (called 'control bias' by engineers) based on the outdoor temp. Then, it could increase or decrease heat input from that point based on how close the indoor temp is to the desired value using a normal proportional control algorithm. In general, proportional control algorithms are very aggressive, providing maximum control input if the temp strays more than a few degrees from the setpoint.
 
Can you put in your code that anything less than set point minus 5° equals full output? Maybe by starting the PID control function closer to set point, you will get out of the long tuning process.

Or

Put a 24hr delay on the PID control until the system gets up to temp. Use it like a T-stat then start the control?
 
I'm doing a simulation to compar eseveral control methods. I'll post a comparison of:

- Traditional thermostat (bang-bang)
- Proportional
- Outdoor reset
- Tuned outdoor reset with indoor feedback
- NFCS reset / proportional

And maybe even proportional-integral.

A picture is worth a good many words. I'm off the next couple of days, so I won't be obfuscating for a while.
 
Status
Not open for further replies.