hello ,
I am trying to improve my transient performance of the closed loop control system using an ultra sonic sensor as feedback and a water pump as a Actuator . after modeling and some control signal math i came to the result of a PI compensator :
Gc = 20*(Z-0.9803)/(Z-1)
but the question is how do i write the code for this one ??
i know that there is PID library for this , but how to do it exactly ??
Z means the complex variable in the Z-plane ,which describes the " Discrete signal " . For " continuous signal " we use S that refers to the Laplace plane .