I asked this question at stack overflow but i did not receive any replies, i think it was the wrong place to ask, so i am re-posting it here.
Short question: How wise is it to change the PID formula/equation based on the needs of your project?
Is it really a technique a proffesional would use?
Longer question: I am making my first PID in embedded MCU (Atmega328p).
I have a hotplate and i want it to reach a certain temperature, and i made it, easy.
As a reference for my PID i followed electronoob's tutorial. what i dont understand from his tutorial, is the line 171 of his code:
pid_i = pid_i+(ki*error);
His integral is using the error instead of the dt (time lapse). I see in the video (and i understand why he does that)
He actually does this:
/*The integral part should only act if we are close to the
desired position but we want to fine tune the error. That's
why I've made a if operation for an error between -2 and 2 degree.
*/
if(-3 <error <3)
{
pid_i = pid_i+(ki*error);
}
So the question is how wise is it to change the default PID equations to match your project?
What would you consult me to do to my present/future projects regarding changing the basic PID formula?