librmb 1.0
Rambunction 4330 Utility Library
|
#include <rmb/motorcontrol/feedforward/ElevatorFeedforward.h>
Public Types | |
using | Distance_t |
using | VelocityUnit |
using | Velocity_t |
using | AccelerationUnit |
using | Acceleration_t |
using | KsUnit |
using | Ks_t |
using | KvUnit |
using | Kv_t |
using | KaUnit |
using | Ka_t |
Public Types inherited from rmb::Feedforward< DistanceUnit > | |
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 | |
ElevatorFeedforward (Ks_t kS, Ks_t kG, Kv_t kV, Ka_t kA) | |
units::volt_t | calculate (Velocity_t velocity, Distance_t distance=Distance_t(0.0), Acceleration_t acceleration=Acceleration_t(0.0)) const override |
Velocity_t | maxAchievableVelocity (units::volt_t maxVoltage, Acceleration_t acceleration, Distance_t position=Distance_t(0.0)) const override |
Velocity_t | minAchievableVelocity (units::volt_t maxVoltage, Acceleration_t acceleration, Distance_t position=Distance_t(0.0)) const override |
Acceleration_t | maxAchievableAcceleration (units::volt_t maxVoltage, Velocity_t velocity, Distance_t position=Distance_t(0.0)) const override |
Acceleration_t | minAchievableAcceleration (units::volt_t maxVoltage, Velocity_t velocity, Distance_t position=Distance_t(0.0)) const override |
Kv_t | getVelocityGain () const override |
Ka_t | getAcclerationGain () const override |
units::volt_t | calculateStatic (Velocity_t velocity, Distance_t position=Distance_t(0)) const override |
Public Member Functions inherited from rmb::Feedforward< DistanceUnit > | |
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 units::volt_t | calculateStatic (Velocity_t velocity, Distance_t position=Distance_t(0)) const =0 |
Voltage feedforward for an elevator mechanism.
using rmb::ElevatorFeedforward< DistanceUnit >::Acceleration_t |
using rmb::ElevatorFeedforward< DistanceUnit >::AccelerationUnit |
using rmb::ElevatorFeedforward< DistanceUnit >::Distance_t |
using rmb::ElevatorFeedforward< DistanceUnit >::Ka_t |
using rmb::ElevatorFeedforward< DistanceUnit >::KaUnit |
using rmb::ElevatorFeedforward< DistanceUnit >::Ks_t |
using rmb::ElevatorFeedforward< DistanceUnit >::KsUnit |
using rmb::ElevatorFeedforward< DistanceUnit >::Kv_t |
using rmb::ElevatorFeedforward< DistanceUnit >::KvUnit |
using rmb::ElevatorFeedforward< DistanceUnit >::Velocity_t |
using rmb::ElevatorFeedforward< DistanceUnit >::VelocityUnit |
|
inline |
Creates an ElevatorFeedforward
kS | Static gain |
kG | Gravity gain |
kV | Velocity gain |
kA | Acceleration gain |
|
inlineoverride |
Calculates a feedforward voltage at a desired velocity, acceleration, and distance.
velocity | Desired Velocity |
distance | Position of Motor (Not always useful). |
acceleration | Desired Acceleration |
|
inlineoverride |
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. |
|
inlineoverridevirtual |
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.
Implements rmb::Feedforward< DistanceUnit >.
|
inlineoverridevirtual |
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.
Implements rmb::Feedforward< DistanceUnit >.
|
inlineoverride |
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 |
|
inlineoverride |
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 |
|
inlineoverride |
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 |
|
inlineoverride |
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 |