Module i_pd

Module i_pd 

Source
Expand description

The i_pd module provides a PID controller where the proportional action is based on the process variable (PV).

Ipd is a structure that implements the PidController trait, which provides methods for creating a new controller and updating the controller.

§Examples

use advanced_pid::{i_pd::Ipd, PidConfig, PidController};

let config = PidConfig::new(1.0, 0.3, 0.1).with_limits(-1.0, 1.0);
let mut pid = Ipd::new(config);

let target = 1.0;
let actual = 0.0;
let dt = 1.0;

println!("{}", pid.update(target, actual, dt));

Structs§

Ipd
Ipd is a structure that implements the PidController trait.