librmb 1.0
Rambunction 4330 Utility Library
|
#include <rmb/motorcontrol/feedforward/Feedforward.h>
Public Types | |
using | Distance_t |
using | VelocityUnit |
using | Velocity_t |
using | AccelerationUnit |
using | Acceleration_t |
using | KsUnit = units::volts |
using | Ks_t = units::unit_t<KsUnit> |
using | KvUnit |
using | Kv_t = units::unit_t<KvUnit> |
using | KaUnit |
using | Ka_t = units::unit_t<KaUnit> |
Public Member Functions | |
virtual units::volt_t | calculate (Velocity_t velocity, Distance_t distance=Distance_t(0.0), Acceleration_t acceleration=Acceleration_t(0.0)) const =0 |
virtual Velocity_t | maxAchievableVelocity (units::volt_t maxVoltage, Acceleration_t acceleration, Distance_t position) const =0 |
virtual Velocity_t | minAchievableVelocity (units::volt_t maxVoltage, Acceleration_t acceleration, Distance_t position) const =0 |
virtual Acceleration_t | maxAchievableAcceleration (units::volt_t maxVoltage, Velocity_t velocity, Distance_t position) const =0 |
virtual Acceleration_t | minAchievableAcceleration (units::volt_t maxVoltage, Velocity_t velocity, Distance_t position) const =0 |
virtual Kv_t | getVelocityGain () const =0 |
virtual Ka_t | getAcclerationGain () const =0 |
virtual units::volt_t | calculateStatic (Velocity_t velocity, Distance_t position=Distance_t(0)) const =0 |
Generalized interface for voltage feedforwards.
DistanceUnit | Base unit of distance for feedforward inputs. |
using rmb::Feedforward< DistanceUnit >::Acceleration_t |
Type declaration for FeedForward<DistanceUnit>::AccelerationUnit
using rmb::Feedforward< DistanceUnit >::AccelerationUnit |
VelocityUnit / Second
using rmb::Feedforward< DistanceUnit >::Distance_t |
User specified distance type
using rmb::Feedforward< DistanceUnit >::Ka_t = units::unit_t<KaUnit> |
Type declaration for FeedForward<DistanceUnit>::KaUnit
using rmb::Feedforward< DistanceUnit >::KaUnit |
Acceleration gain unit is volts / AcclerationUnit
using rmb::Feedforward< DistanceUnit >::Ks_t = units::unit_t<KsUnit> |
Type declaration for Feedforward<DistanceUnit>::KsUnit
using rmb::Feedforward< DistanceUnit >::KsUnit = units::volts |
Static gain is in volts
using rmb::Feedforward< DistanceUnit >::Kv_t = units::unit_t<KvUnit> |
Type declaration for FeedForward<DistanceUnit>::KvUnit
using rmb::Feedforward< DistanceUnit >::KvUnit |
Velocity gain unit is Volts / VelocityUnit
using rmb::Feedforward< DistanceUnit >::Velocity_t |
Type declaration for FeedForward<DistanceUnit>::VelocityUnit
using rmb::Feedforward< DistanceUnit >::VelocityUnit |
DistanceUnit / Second
|
pure virtual |
Calculates a feedforward voltage at a desired velocity, acceleration, and distance.
velocity | Desired Velocity |
distance | Position of Motor (Not always useful). |
acceleration | Desired Acceleration |
|
pure virtual |
Calculates the static gain of the feedforward at a given position. This is the value added on tot he end of the feedforward calculation. A velocity term is included only to determine the direction of movment. This is useful when adding feedforwads to the PID loops of motor controllers.
velocity | term only to determine the direction of movment (positive or negetive). |
position | positon at which the static gain is calculated. |
|
pure virtual |
Return the acceleration gain of feed forward. This is the value that acceleration is multiplied by when calculating voltage. This is useful when adding feedforwads to the PID loops of motor controllers.
Implemented in rmb::ArmFeedforward, rmb::ElevatorFeedforward< DistanceUnit >, and rmb::SimpleFeedforward< DistanceUnit >.
|
pure virtual |
Return the velocity gain of feed forward. This is the value that velocity is multiplied by when calculating voltage. This is useful when adding feedforwads to the PID loops of motor controllers.
Implemented in rmb::ArmFeedforward, rmb::ElevatorFeedforward< DistanceUnit >, and rmb::SimpleFeedforward< DistanceUnit >.
|
pure virtual |
Calculates the maximum achievable accceleration of a component.
maxVoltage | max voltage that can be applied |
velocity | velocity that this acceleration is achived at |
position | position that this acceleration is achived at |
|
pure virtual |
Calculates the minimum achievable velocity of a component.
maxVoltage | max voltage that can be applied |
acceleration | acceleration that this velocity is achived at |
position | position that this veloocity is achived at |
|
pure virtual |
Calculates the minimum achievable accceleration of a component.
maxVoltage | max voltage that can be applied |
velocity | velocity that this acceleration is achived at |
position | position that this acceleration is achived at |
|
pure virtual |
Calculates the minimum achievable velocity of a component.
maxVoltage | max voltage that can be applied |
acceleration | acceleration that this velocity is achived at |
position | position that this veloocity is achived at |