-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(TrackingController): Introducing NaN prevention
With faulty inputs, an anti windup controller can accumulate values that reach beyond min/max of a float64, using the inf values in addition or subtraction then creates a NaN. To prevent the controller to give NaN as ControlSignal output we prevent the ControlError, ControlErrorIntegrand, ControlErrorIntegral and ControlErrorDerivative from reaching inf by clamping it to +/- MaxFloat64. This gives a more expected behavior and let the user have the possibility to handle the state as the user prefers.
- Loading branch information
1 parent
ac48a68
commit 6f73c65
Showing
2 changed files
with
61 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters