Skip to main content

Lugre

Struct Lugre 

Source
pub struct Lugre {
    pub on: bool,
    pub sigma0: f64,
    pub sigma1: f64,
    pub viscous: f64,
    pub coulomb: f64,
    pub stiction: f64,
    pub stribeck_v: f64,
    pub preload: f64,
    pub load_dependent: bool,
}
Expand description

LuGre friction contact: Coulomb, viscous, stiction and the Stribeck drop between them, with one internal state s (the bristle deflection).

Fields§

§on: bool§sigma0: f64§sigma1: f64§viscous: f64§coulomb: f64§stiction: f64§stribeck_v: f64§preload: f64

Guide preload; with load_dependent the Coulomb and stiction levels scale with preload + load.

§load_dependent: bool

Implementations§

Source§

impl Lugre

Source

pub fn from_config(cfg: &Config, table: &str) -> Result<Self, ConfigError>

Source

pub fn load_scale(&self, load: f64, nominal_load: f64) -> f64

Factor on the friction levels for a guide load, relative to the load the levels were given for.

Source

pub fn level(&self, v: f64, load_scale: f64) -> f64

Sliding level g(v) = Fc + (Fs - Fc) exp(-(v/vs)^2), times the load scale.

Source

pub fn eval(&self, v: f64, s: f64, load_scale: f64) -> (f64, f64)

Returns (friction force opposing positive v, ds/dt).

Source

pub fn steady(&self, v: f64, load_scale: f64) -> [f64; 3]

Steady sliding at v, g(v) sign(v) + b v, split into [Coulomb, viscous, stiction]: the Coulomb level, b v, and what the Stribeck curve adds to the Coulomb level, (Fs - Fc) exp(-(v/vs)^2), each times the load scale. Zero with the effect off.

Source

pub fn feedforward(&self, v: f64, load_scale: f64) -> f64

The steady sliding force for a feedforward at a planned speed v (Machine::steady_friction): steady’s sum, its level g(v) faded in by tanh(v / v_s) over the Stribeck speed, g(v) tanh(v / v_s) + b v. Above a few v_s it is steady (1 m/s on a 10 mm/s Stribeck speed: to 1e-86); towards rest it falls to 0 smoothly instead of stepping from the breakaway level, so that a move’s last micrometres and its stop put no torque step on the axis, as the bristles that stick there take the force over without one.

Source

pub fn split(&self, v: f64, s: f64, load_scale: f64) -> [f64; 3]

The force of eval split into [Coulomb, viscous, stiction]: b v, and the bristle force (all the rest) shared in the proportion of the Coulomb level to what the Stribeck curve adds to it at this speed. In steady sliding these are the parts of steady; at rest the bristles hold with the shares of the stiction level.

Trait Implementations§

Source§

impl Clone for Lugre

Source§

fn clone(&self) -> Lugre

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Lugre

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Lugre

§

impl RefUnwindSafe for Lugre

§

impl Send for Lugre

§

impl Sync for Lugre

§

impl Unpin for Lugre

§

impl UnsafeUnpin for Lugre

§

impl UnwindSafe for Lugre

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.