Quote:
Originally Posted by davidthefat
P= Error*Pconstant
I=((Previous Error*change in time + Error*change in time)/2)* Iconstant
D=((Error-PreviousError)/change in time)* Dconstant
output = P+I+D + 127
60 < Pconstant < 95
5 < Iconstant < 25
0 < Dconstant < 5
The time can be obtained from the FPGA
|
Not sure what point you were trying to make with the above.
But I did notice you left out how you plan to calculate "error".