pub struct Pid<T: Float> {
pub order: Order,
pub gain: Gain<T>,
pub limit: Gain<T>,
pub setpoint: T,
pub min: T,
pub max: T,
}
Expand description
PID Controller parameters
Fields§
§order: Order
Feedback term order
gain: Gain<T>
Gain
- Sequence: [I², I, P, D, D²]
- Units: output/intput * second**order where Action::I2 has order=-2
- Gains outside the range
order..=order + 3
are ignored - P gain sign determines sign of all gains
limit: Gain<T>
Gain imit
- Sequence: [I², I, P, D, D²]
- Units: output/intput
- P gain limit is ignored
- Limits outside the range
order..order + 3
are ignored - P gain sign determines sign of all gain limits
setpoint: T
Setpoint
Units: input
min: T
Output lower limit
Units: output
max: T
Output upper limit
Units: output
Implementations§
Source§impl<T: Float> Pid<T>
impl<T: Float> Pid<T>
Sourcepub fn build<C, I>(&self, period: T, b_scale: T, y_scale: T) -> Biquad<C>where
C: Coefficient + AsPrimitive<C> + AsPrimitive<I>,
T: AsPrimitive<I> + AsPrimitive<C>,
I: Float + 'static + AsPrimitive<C>,
pub fn build<C, I>(&self, period: T, b_scale: T, y_scale: T) -> Biquad<C>where
C: Coefficient + AsPrimitive<C> + AsPrimitive<I>,
T: AsPrimitive<I> + AsPrimitive<C>,
I: Float + 'static + AsPrimitive<C>,
Return the Biquad
Builder intermediate type I
, coefficient type C
Trait Implementations§
Source§impl<T> TreeAny for Pid<T>
impl<T> TreeAny for Pid<T>
Source§fn ref_any_by_key(&self, keys: impl Keys) -> Result<&dyn Any, ValueError>
fn ref_any_by_key(&self, keys: impl Keys) -> Result<&dyn Any, ValueError>
Obtain a reference to a
dyn Any
trait object for a leaf node.Source§fn mut_any_by_key(
&mut self,
keys: impl Keys,
) -> Result<&mut dyn Any, ValueError>
fn mut_any_by_key( &mut self, keys: impl Keys, ) -> Result<&mut dyn Any, ValueError>
Obtain a mutable reference to a
dyn Any
trait object for a leaf node.§fn ref_by_key<T>(&self, keys: impl IntoKeys) -> Result<&T, ValueError>where
T: Any,
fn ref_by_key<T>(&self, keys: impl IntoKeys) -> Result<&T, ValueError>where
T: Any,
Obtain a reference to a leaf of known type by key.
§fn mut_by_key<T>(&mut self, keys: impl IntoKeys) -> Result<&mut T, ValueError>where
T: Any,
fn mut_by_key<T>(&mut self, keys: impl IntoKeys) -> Result<&mut T, ValueError>where
T: Any,
Obtain a mutable reference to a leaf of known type by key.
Source§impl<'de, T> TreeDeserialize<'de> for Pid<T>
impl<'de, T> TreeDeserialize<'de> for Pid<T>
Source§fn deserialize_by_key<D: Deserializer<'de>>(
&mut self,
keys: impl Keys,
de: D,
) -> Result<(), SerdeError<D::Error>>
fn deserialize_by_key<D: Deserializer<'de>>( &mut self, keys: impl Keys, de: D, ) -> Result<(), SerdeError<D::Error>>
Deserialize a leaf node by its keys. Read more
Source§fn probe_by_key<D: Deserializer<'de>>(
keys: impl Keys,
de: D,
) -> Result<(), SerdeError<D::Error>>
fn probe_by_key<D: Deserializer<'de>>( keys: impl Keys, de: D, ) -> Result<(), SerdeError<D::Error>>
Blind deserialize a leaf node by its keys. Read more
Auto Trait Implementations§
impl<T> Freeze for Pid<T>where
T: Freeze,
impl<T> RefUnwindSafe for Pid<T>where
T: RefUnwindSafe,
impl<T> Send for Pid<T>where
T: Send,
impl<T> Sync for Pid<T>where
T: Sync,
impl<T> Unpin for Pid<T>where
T: Unpin,
impl<T> UnwindSafe for Pid<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more