vitotai / BrewManiacEsp8266

BrewManiac on ESP8266. Only ESP8266 needed.
156 stars 71 forks source link

issue with PID parameter scaling #34

Open lekrom opened 5 years ago

lekrom commented 5 years ago

Hi Vito. Great work on the latest BM. I have upgraded my system from the old arduino BM to the latest BMex. There is however something i would like to recommend. I realise the temp control stuff came from open ardbir, but there is an issue in their original PID parameters. Firstly, negative PID coefficients are not allowed and makes no sense in my opinion. I realise that the actual paramers are scaled and shifted to account for this. The issue is that the way the parameters are displayd makes it not very intuitive to tune. Also, at least in my system, the kD parameter can not be set correctly. Analysing the amplitude an period when performing the autotune implies I need a kD of 5000-ish. Not possible with the current scaling, it overflows and the stored kD is incorrect. I have hacked the code on my arduino version to fix this. Without this hack my system tends to overshoot a bit. The kP and kI values are correctly obtained from the autune. Regard, Lekrom.

lekrom commented 5 years ago

Just to clarify, the analysis I spoke of was based on this article: http://brettbeauregard.com/blog/2012/01/arduino-pid-autotune-library/ this is a writeup from the author of the pid autotune library, I believe...