Open mrx23dot opened 2 years ago
Other solutions are that you could filter the noise out of your sensor, tune your parameters to be less sensitive to noise, or you could even apply this procedure in user space before your compute step:
if (Math.Abs(SetPoint - Input) <= DEADBAND){
Input = Setpoint;
}
myPID.Compute();
... and then it wouldn't add the compute costs into the calculations for others.
I do think this filter would interfere with the ability of the integral term being able to adjust the process to within DEADBAND of the Setpoint.
Create a dual-sided deadband around the desired setpoint to prevent noisy feedback from producing control jitters This is disabled by setting deadband to zero, something like:
could be inserted somewhere here