|
EasyNav Plugins
|
A simple PID (Proportional-Integral-Derivative) controller implementation. More...
#include <PIDController.hpp>
Public Member Functions | |
| double | get_output (double new_reference, double dt) |
| Computes the control output for the given reference input. | |
| PIDController (double min_ref, double max_ref, double min_output, double max_output) | |
| Constructor. | |
| void | reset () |
| Reset internal integrator and derivative state. | |
| void | set_pid (double n_KP, double n_KI, double n_KD) |
| Sets the PID gains. | |
A simple PID (Proportional-Integral-Derivative) controller implementation.
| PIDController | ( | double | min_ref, |
| double | max_ref, | ||
| double | min_output, | ||
| double | max_output ) |
Constructor.
Initializes the PID controller with output and reference range limits.
| min_ref | Minimum allowed input reference value. |
| max_ref | Maximum allowed input reference value. |
| min_output | Minimum output control value. |
| max_output | Maximum output control value. |
| double get_output | ( | double | new_reference, |
| double | dt ) |
Computes the control output for the given reference input.
Applies the PID formula and returns the control command within the specified output limits.
| new_reference | The current reference input value (e.g., error signal). |
| dt | Time elapsed since last call in seconds. |
| void reset | ( | ) |
Reset internal integrator and derivative state.
| void set_pid | ( | double | n_KP, |
| double | n_KI, | ||
| double | n_KD ) |
Sets the PID gains.
| n_KP | Proportional gain. |
| n_KI | Integral gain. |
| n_KD | Derivative gain. |