Hello,
I have some question and I would like to ask to who has idea about PID_V1 library.These lines are from this PID.
Code:
double input = *myInput;
double error = *mySetpoint - input;
double dInput = (input - lastInput);
outputSum+= (ki * error);
/Add Proportional on Measurement, if P_ON_M is specified/
if(!pOnE) outputSum-= kp * dInput;
if(outputSum > outMax) outputSum= outMax;
else if(outputSum < outMin) outputSum= outMin;
/*Add Proportional on Error, if P_ON_E is specified*/
double output;
if(pOnE) output = kp * error;
else output = 0;
/*Compute Rest of PID Output*/
output += outputSum - kd * dInput;
I could not understand the kd part. Why is not the Kd parameter error difference. As you can see, dInput is not error difference. Thanks for helping