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

Add a PID mode #8

Closed
jmcollin78 opened this issue Jan 11, 2023 · 4 comments
Closed

Add a PID mode #8

jmcollin78 opened this issue Jan 11, 2023 · 4 comments
Labels
enhancement New feature or request question Further information is requested wontfix This will not be worked on

Comments

@jmcollin78
Copy link
Owner

As discussed here a PID mode should be interesting to study: https://forum.hacf.fr/t/smart-thermostat-le-chauffage-controle-par-pid/7633/2

@jmcollin78 jmcollin78 added enhancement New feature or request question Further information is requested labels Jan 11, 2023
@kadaan
Copy link

kadaan commented Jan 31, 2023

This would be awesome. I wonder if it would be possible to refactor the PID control from https://github.com/ScratMan/HASmartThermostat into it's own component that could be used by both projects?

@jmcollin78
Copy link
Owner Author

The important part is here:

PID output value is the weighted sum of the control terms:
error = set_point - current_temperature
di = temperature change between last two samples
dt = time elapsed between last two samples
P = Kp * error
I = last_I + (Ki * error * dt)
D = -(Kd * di) / dt
output = P + I + D
Output is then limited to 0% to 100% range to control the PWM.

@jmcollin78
Copy link
Owner Author

@kadaan I will try to contact the author and see if it is possible to set something in commons.
But I have many work to do before this and TPI works pretty well.

@jmcollin78 jmcollin78 added the wontfix This will not be worked on label Oct 7, 2023
@jmcollin78
Copy link
Owner Author

jmcollin78 commented Oct 7, 2023

This is not needed. The TPI works well.

EDIT: and full PID are difficult to tune. Then we need an auto-tune.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants