pub struct Pid<T: Float> {
pub order: Leaf<Order>,
pub gain: Gain<T>,
pub limit: Gain<T>,
pub setpoint: Leaf<T>,
pub min: Leaf<T>,
pub max: Leaf<T>,
}
Expand description
PID Controller parameters
Fields§
§order: Leaf<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: Leaf<T>
Setpoint
Units: input
min: Leaf<T>
Output lower limit
Units: output
max: Leaf<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: Float> TreeAny for Pid<T>where
Gain<T>: TreeAny,
Leaf<T>: TreeAny,
impl<T: Float> TreeAny for Pid<T>where
Gain<T>: TreeAny,
Leaf<T>: TreeAny,
Source§fn ref_any_by_key<K>(&self, keys: K) -> Result<&dyn Any, Traversal>where
K: Keys,
fn ref_any_by_key<K>(&self, keys: K) -> Result<&dyn Any, Traversal>where
K: Keys,
Obtain a reference to a
dyn Any
trait object for a leaf node.Source§fn mut_any_by_key<K>(&mut self, keys: K) -> Result<&mut dyn Any, Traversal>where
K: Keys,
fn mut_any_by_key<K>(&mut self, keys: K) -> Result<&mut dyn Any, Traversal>where
K: Keys,
Obtain a mutable reference to a
dyn Any
trait object for a leaf node.§fn ref_by_key<T, K>(&self, keys: K) -> Result<&T, Traversal>where
T: Any,
K: IntoKeys,
fn ref_by_key<T, K>(&self, keys: K) -> Result<&T, Traversal>where
T: Any,
K: IntoKeys,
Obtain a reference to a leaf of known type by key.
§fn mut_by_key<T, K>(&mut self, keys: K) -> Result<&mut T, Traversal>where
T: Any,
K: IntoKeys,
fn mut_by_key<T, K>(&mut self, keys: K) -> Result<&mut T, Traversal>where
T: Any,
K: IntoKeys,
Obtain a mutable reference to a leaf of known type by key.
Source§impl<'de, T: Float> TreeDeserialize<'de> for Pid<T>where
Gain<T>: TreeDeserialize<'de>,
Leaf<T>: TreeDeserialize<'de>,
impl<'de, T: Float> TreeDeserialize<'de> for Pid<T>where
Gain<T>: TreeDeserialize<'de>,
Leaf<T>: TreeDeserialize<'de>,
Source§fn deserialize_by_key<K, D>(
&mut self,
keys: K,
de: D,
) -> Result<usize, Error<D::Error>>where
K: Keys,
D: Deserializer<'de>,
fn deserialize_by_key<K, D>(
&mut self,
keys: K,
de: D,
) -> Result<usize, Error<D::Error>>where
K: Keys,
D: Deserializer<'de>,
Deserialize a leaf node by its keys. Read more
Source§impl<T: Float> TreeKey for Pid<T>where
Gain<T>: TreeKey,
Leaf<T>: TreeKey,
impl<T: Float> TreeKey for Pid<T>where
Gain<T>: TreeKey,
Leaf<T>: TreeKey,
Source§fn traverse_all<W: Walk>() -> Result<W, W::Error>
fn traverse_all<W: Walk>() -> Result<W, W::Error>
Walk metadata about all paths. Read more
Source§fn traverse_by_key<K, F, E>(keys: K, func: F) -> Result<usize, Error<E>>
fn traverse_by_key<K, F, E>(keys: K, func: F) -> Result<usize, Error<E>>
Traverse from the root to a leaf and call a function for each node. 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