Crate pid_loop[−][src]
Expand description
A tiny no_std
PID controller library.
This crate implements the classic windowed PID loop over abstract data type.
Introduction
A proportional-integral-derivative controller is a control loop mechanism employing feedback that is widely used in industrial control systems and a variety of other applications requiring continuously modulated control.
Examples
use pid_loop::PID;
let target = 42.0;
let mut controller = PID::<f32, 1>::new(2.0, 0.7, 0.3, 0.0, 0.0);
loop {
let correction = controller.next(target, measure());
apply_correction(correction);
sleep();
}
fn sleep() { todo!() }
fn measure() -> f32 { todo!() }
fn apply_correction(_: f32) { todo!() }
Structs
PID controller