Expand description
The pi_d module provides a PID controller where the derivative action is based on the process variable (PV).
PiD is a structure that implements the PidController trait, which provides methods for creating a new controller and updating the controller.
§Examples
use advanced_pid::{prelude::*, PiD, PidConfig};
let config = PidConfig::new(1.0, 0.3, 0.1).with_limits(-1.0, 1.0);
let mut pid = PiD::new(config);
let target = 1.0;
let actual = 0.0;
let dt = 1.0;
println!("{}", pid.update(target, actual, dt));Structs§
- PiD
PiDis a structure that implements thePidControllertrait.