Compare commits
No commits in common. "b176fc2788963cd33227da3989ab222b868bdc85" and "980d27ebfc80d6e3543871bead6f91cc0085a2d0" have entirely different histories.
b176fc2788
...
980d27ebfc
11
src/pid.rs
11
src/pid.rs
|
@ -6,19 +6,12 @@ use uom::si::{
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
pub struct Parameters {
|
pub struct Parameters {
|
||||||
/// Gain coefficient for proportional term
|
|
||||||
pub kp: f32,
|
pub kp: f32,
|
||||||
/// Gain coefficient for integral term
|
|
||||||
pub ki: f32,
|
pub ki: f32,
|
||||||
/// Gain coefficient for derivative term
|
|
||||||
pub kd: f32,
|
pub kd: f32,
|
||||||
/// Output limit minimum
|
|
||||||
pub output_min: f32,
|
pub output_min: f32,
|
||||||
/// Output limit maximum
|
|
||||||
pub output_max: f32,
|
pub output_max: f32,
|
||||||
/// Integral clipping minimum
|
|
||||||
pub integral_min: f32,
|
pub integral_min: f32,
|
||||||
/// Integral clipping maximum
|
|
||||||
pub integral_max: f32
|
pub integral_max: f32
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,8 +19,8 @@ impl Default for Parameters {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
Parameters {
|
Parameters {
|
||||||
kp: 1.5,
|
kp: 1.5,
|
||||||
ki: 1.0,
|
ki: 0.1,
|
||||||
kd: 1.5,
|
kd: 150.0,
|
||||||
output_min: 0.0,
|
output_min: 0.0,
|
||||||
output_max: 2.0,
|
output_max: 2.0,
|
||||||
integral_min: -10.0,
|
integral_min: -10.0,
|
||||||
|
|
Loading…
Reference in New Issue