PID algorithm for constant temperature controller.

  • Thread starter gputowski
  • Start date
  • #1
3
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.

Best regards,
Greg.
 

Attachments

  • DSC_0027.JPG
    DSC_0027.JPG
    34.3 KB · Views: 419

Answers and Replies

  • #3
jim hardy
Science Advisor
Gold Member
Dearly Missed
9,847
4,891
Just what do you mean by
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
 
  • #4
Svein
Science Advisor
Insights Author
2,215
749
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.
 
  • #5
jim hardy
Science Advisor
Gold Member
Dearly Missed
9,847
4,891
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..
 
  • #6
3
0
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.

Best regards,
Greg
 

Attachments

  • DSC_0029.JPG
    DSC_0029.JPG
    32.8 KB · Views: 402
  • #7
jim hardy
Science Advisor
Gold Member
Dearly Missed
9,847
4,891
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.
 

Related Threads on PID algorithm for constant temperature controller.

  • Last Post
Replies
9
Views
160
  • Last Post
Replies
5
Views
2K
  • Last Post
Replies
4
Views
2K
Replies
3
Views
362
  • Last Post
Replies
13
Views
3K
Replies
39
Views
17K
  • Last Post
Replies
4
Views
2K
Replies
2
Views
4K
  • Last Post
Replies
6
Views
1K
  • Last Post
Replies
8
Views
944
Top