You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello
I use the pid to filter a temperature and wich a the first iteration to start with initial value.
Is it possible to set the PID so that the first iteration is not zero but the initial value?
=> doesit have any sens?
Maybe by setting
it depends on which initial values you want to set: you can set the gains to initial values before beginning time-step iterations, or if you want to set an initial value for the control signal you are sending to some device or process plant then you can use BasicPid in iterative mode (instead of integrative mode) and handle the time-step integrations manually in a loop see some examples in RTD for BasicPid for more @ https://basic-pid.readthedocs.io/en/latest/examples.html
yep, you got it! just jump start the 1st iteration with initial PID evaluation (output) values. Did you then just run PID in integrate mode? I designed & coded BasicPID to be clean & logical so can be relatively easy to modify & customize. I was going to put in an interface function for setting initial values but left it for the first stable release. I will put it in for the next. thanks for asking about this. any feedback is welcome.
The only feedback is : wonderful job
The code is clear and it was easy to add a new input point.
Wonderful if you add this functionality in next release. I will pug on it when avalaible
Activity
mkner commentedon Jun 3, 2024
it depends on which initial values you want to set: you can set the gains to initial values before beginning time-step iterations, or if you want to set an initial value for the control signal you are sending to some device or process plant then you can use BasicPid in iterative mode (instead of integrative mode) and handle the time-step integrations manually in a loop see some examples in RTD for BasicPid for more @ https://basic-pid.readthedocs.io/en/latest/examples.html
ewok2 commentedon Jun 4, 2024
I just had to change the pid.py file to achieve my goal :-)
I just add the folowing function :
just befor the reset function, and it works
I just have to call "pid.setInit(initalvalue)" befor the loop
mkner commentedon Jun 6, 2024
yep, you got it! just jump start the 1st iteration with initial PID evaluation (output) values. Did you then just run PID in integrate mode? I designed & coded BasicPID to be clean & logical so can be relatively easy to modify & customize. I was going to put in an interface function for setting initial values but left it for the first stable release. I will put it in for the next. thanks for asking about this. any feedback is welcome.
ewok2 commentedon Jun 7, 2024
The only feedback is : wonderful job
The code is clear and it was easy to add a new input point.
Wonderful if you add this functionality in next release. I will pug on it when avalaible
Many Thanks