PID algorithm for constant temperature controller.

Click For Summary

Discussion Overview

The discussion revolves around developing a PID algorithm for a heating controller, specifically addressing the regulation of relay timing for heating cycles. Participants explore the nuances of PID control in the context of time lags and the relationship between ON and OFF states of the relay.

Discussion Character

  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • One participant seeks assistance in writing a correct PID algorithm for a heating controller and mentions a graph for reference.
  • Another participant questions the meaning of "correct PID algorithm" and provides the general formula for PID control.
  • A participant highlights the importance of considering time lag in the heating regulation process, noting that it can be significant.
  • Discussion includes the idea that the slope of the temperature curve during the initial heating cycle may indicate the process's thermal capacity and time lag.
  • The original poster expresses familiarity with the PID formula but questions whether a single formula can regulate both ON and OFF relay times or if separate formulas are needed.
  • Another participant points out a potential misunderstanding regarding ON and OFF times, suggesting that the relationship between them is not straightforward and introduces the concept of "Bang-Bang control." They also provide references for further reading.
  • There is a suggestion to keep ON-OFF intervals short relative to process time constants and to consider using PWM at the controller output.

Areas of Agreement / Disagreement

Participants do not appear to reach a consensus on the best approach to regulate the heating controller. There are multiple competing views regarding the handling of ON and OFF times and the application of PID versus Bang-Bang control.

Contextual Notes

Participants express uncertainty about the relationship between ON and OFF timing in the context of PID control and whether separate formulas are necessary. The discussion also reflects varying levels of understanding regarding control strategies and their implications.

gputowski
Messages
3
Reaction score
0
Hello.

I`m looking for help to write the coorect PID algorithm for heating controller.

For start in attachment I`m sending You the graph. If someone of You can help I could send some more informations.Greg.
 

Attachments

  • DSC_0027.JPG
    DSC_0027.JPG
    31.3 KB · Views: 542
Engineering news on Phys.org
Any idea?
 
Just what do you mean by
gputowski said:
coorect PID algorithm
?

One PID algorithm is
Controller output = proportional gain P X error + integral gain I X ∫(error) + derivative gain D X d(error)/dt
 
The one thing you need to remember when trying to regulate a heating controller is the time lag through whatever you are trying to regulate. This lag can easily run into hours.
 
Slope of temperature curve during that first on-cycle should give a clue about process thermal capacity, and maybe that time lag mentioned by svein..
 
Thank You for the answer.

I know the formula for PID. But If You have seen my first drawing You should see that We are regulating the time when the relay is ON. We all supposed to regulate the time when the relay is OFF. Is it possible to make it by one formula or I will have to make two formula with time: first when the relay is ON second when the relay is OFF and make a loop.Greg
 

Attachments

  • DSC_0029.JPG
    DSC_0029.JPG
    28.5 KB · Views: 526
gputowski said:
We are regulating the time when the relay is ON. We all supposed to regulate the time when the relay is OFF.
I'm not sure i understand that statement.
ONtime is (1-OFFtime).

You're mixing linear control with" on-off control" here, sometimes that's called "Bang-Bang control"
and the math of that is another world. I won't go there myself
From a quick search:
Here's a paper...
http://dimacs.rutgers.edu/Workshops/AIMS/slides/SLafrica4.pdf

and a couple references
http://en.wikipedia.org/wiki/Bang–bang_control
http://cds.linear.com/docs/en/datasheet/1041fa.pdf
http://liberzon.csl.illinois.edu/teaching/cvoc/node86.html

Your best bet is to keep your on-off intervals short compared to the process time constants and treat it as linear
or insert a PWM at your controller output.
 

Similar threads

  • · Replies 14 ·
Replies
14
Views
3K
  • · Replies 12 ·
Replies
12
Views
4K
Replies
9
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 10 ·
Replies
10
Views
4K
Replies
14
Views
5K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K