Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explanation for cold/warm switch in pid_loop #25

Open
elf02 opened this issue Jun 7, 2019 · 0 comments
Open

Explanation for cold/warm switch in pid_loop #25

elf02 opened this issue Jun 7, 2019 · 0 comments

Comments

@elf02
Copy link

elf02 commented Jun 7, 2019

Can you please explain the warm/cold logic:

silvia-pi/silvia-pi.py

Lines 152 to 168 in 54de212

if avgtemp < 100 :
lastcold = i
if avgtemp > 200 :
lastwarm = i
if iscold and (i-lastcold)*conf.sample_time > 60*15 :
pid = PID.PID(conf.Pw,conf.Iw,conf.Dw)
pid.SetPoint = state['settemp']
pid.setSampleTime(conf.sample_time*5)
iscold = False
if iswarm and (i-lastwarm)*conf.sample_time > 60*15 :
pid = PID.PID(conf.Pc,conf.Ic,conf.Dc)
pid.SetPoint = state['settemp']
pid.setSampleTime(conf.sample_time*5)
iscold = True

iswarm will always be false. Should the pid values for the warm state be set only once when avgtemp >= 100?

Thank you :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant