|
PID Control 1.0
Discrete time implementation of P, PI, PD, PID. Including derivative filter, integral clamping, feed-forward, gain scheduling in standard and parallel form.
|
Utility functions for the Control System library. More...
Go to the source code of this file.
Functions | |
| template<typename T> | |
| constexpr T | saturate (T x, T x_min, T x_max) |
| Saturates a value within a specified range. | |
Utility functions for the Control System library.
This header provides generic utility functions used by the control system components.
Definition in file utility.h.
|
inlineconstexpr |
Saturates a value within a specified range.
If x is less than the minimum limit, the minimum limit is returned. If x is greater than the maximum limit, the maximum limit is returned. Otherwise, the input value is returned unchanged.
The function is implemented as a generic function and can be used with different numeric types.
| T | Numeric data type. |
| [in] | x | Input value to be saturated. |
| [in] | x_min | Minimum allowed value. |
| [in] | x_max | Maximum allowed value. |
x_min, x_max].x_min is less than or equal to x_max.