[Solved] Pid don’t do anything?
First, let me thank you for you work, mycodo seems great!
i’m working on a modified fridge as meat curing chamber, but i can’t get the pid function to work???
My outputs (8 relays board) is working great on manual activations, but my tries of getting my pid function to work didn’t.
here are some screenshots of my setting.
Can you see where i did a mistake?
The default tuning when a PID is added is Kp=1.0, Ki=0, and Kd=0, which is what your settings are currently. This effectively makes only a P-controller, because it is only responding proportionally to the error. Since your setpoint is only 2.3 degrees from the actual temperature, and your Kp=1, the output is 2.3 seconds, which is less than the minimum of 20 seconds you have set for the output set to lower the temperature. I also noticed you have the band set, which complicates things some, but the general principle still applies.
I would recommend reading the PID portion of the manual to get familiar with the options and go through the tuning section to understand how the Kp, Ki, and Kd gains operate.
If you need your lower output to have a minimum of 20 seconds to turn it on, I would recommend increasing your period from 30 seconds to something like 120. I would also increase your Ki from 0 to something very small to start, like 0.1 or even 0.01, and see how the system responds. Bringing in the Kd gain can come later if you find after tuning the Kp and Ki gains well you still have oscillations.
Give those suggestions a shot and let me know if you have any further questions. If you have specific questions about tuning, sending the graph and PID parameters as you've done is just what I need to be able to make recommendations. You might want to also include the PID setpoint (and bands if using the band option) on the graph for better readability.
thank you for the quick answer.
I have also find this answer you gave to another user
As it is a fridge, you recommend to use 300s as period and 30s minimum duration.
I tried theses settings with a Ki of 0.5 (I also tried 0.05 & 0.1) but still not enough.
Can I increase Kp?
The difference is much lower, but not enough to start the fridge.
Could you propose me some settings to begin my tests ?
Also, what is "starter offset" for? i don't need it, do i?
thanks for your help
I didn't get that i had to wait for the time to 'play' on the ki! :)
i do longer test with this configuration, the fridge should start soon
Start Offset is merely how long to wait after the daemon starts before the PID starts running. Because the PID needs measurements to be able to operate, you need to give the Inputs some time to acquire measurements for the PID to use. If there are no measurements, the PID will throw an error until measurements are available.