-
Notifications
You must be signed in to change notification settings - Fork 43
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 #19
Comments
Each loop is 1 second long. When the avgpid is >100 then that means the heating element should be on for 100% of the next second. When it's between 0-100 the heating element should be on for that fraction of the next second, e.g. 70 means the heating element should be on for 7/10 of the next second. |
Thanks for the response! What’s the significance of 100? |
That's how a PID algorithm works, you give it a goal, some inputs, and then it calculates an output that we use to drive the heating element. It's a versatile algorithm used in other applications besides temperature control, for example the amount of power delivered to a motor to achieve a given RPM goal. This link helped me the most when researching this project: http://m.eet.com/media/1112634/f-wescot.pdf |
@brycesub Thanks for the link! It is helpful! What I don't understand is exactly how it's used here. I don't see any clamping on the output of the PID or what the significance of 100 is in this context. Is it some arbitrary threshold of the PID output that you tested? I'm confused as to why the range of 1-99 is when the temperature is "stable". I've assumed this is the source for the I've been playing with this and porting it to work with a Netduino but there are some differences I am experiencing. I noticed that if the temperature is above my set point, and hit this > 0 < 100 code, the sleep times are not sufficient to let the temperature cool down to the set point. Instead, it continues to heat slowly. Before I tweaked that, I wanted to understand it. Thanks for your help! |
I think I've figured it out now. It's clearer now how to correctly time-proportion the PID output to something that can be used to determine the on/off signals to the SSR. I don't see where that's done here but I did manage to solve my issue. I'd still be curious if you could explain exactly how your PID output is normalized between 0-100. Thanks! |
Would you be able to explain this logic?
https://github.com/brycesub/silvia-pi/blob/master/silvia-pi.py#L30-L44
What's unclear:
100
foravgpid
?sleep
times for cycling heat on/off whenavgpid > 0 and < 100
Thank you!
The text was updated successfully, but these errors were encountered: