32template <
int States, 
int Inputs>
 
   45  template <
int Outputs>
 
   79  double Uff(
int i)
 const { 
return m_uff(i); }
 
   95  double R(
int i)
 const { 
return m_r(i); }
 
  144    m_uff = m_B.householderQr().solve(nextR - (m_A * r));
 
 
  153  units::second_t m_dt;
 
 
Constructs a plant inversion model-based feedforward from a LinearSystem.
Definition LinearPlantInversionFeedforward.h:33
 
double R(int i) const
Returns an element of the reference vector r.
Definition LinearPlantInversionFeedforward.h:95
 
InputVector Calculate(const StateVector &r, const StateVector &nextR)
Calculate the feedforward with current and future reference vectors.
Definition LinearPlantInversionFeedforward.h:140
 
Vectord< Inputs > InputVector
Definition LinearPlantInversionFeedforward.h:36
 
const InputVector & Uff() const
Returns the previously calculated feedforward as an input vector.
Definition LinearPlantInversionFeedforward.h:70
 
const StateVector & R() const
Returns the current reference vector r.
Definition LinearPlantInversionFeedforward.h:86
 
Vectord< States > StateVector
Definition LinearPlantInversionFeedforward.h:35
 
void Reset(const StateVector &initialState)
Resets the feedforward with a specified initial state vector.
Definition LinearPlantInversionFeedforward.h:102
 
InputVector Calculate(const StateVector &nextR)
Calculate the feedforward with only the desired future reference.
Definition LinearPlantInversionFeedforward.h:128
 
void Reset()
Resets the feedforward with a zero initial state vector.
Definition LinearPlantInversionFeedforward.h:110
 
LinearPlantInversionFeedforward(const LinearSystem< States, Inputs, Outputs > &plant, units::second_t dt)
Constructs a feedforward with the given plant.
Definition LinearPlantInversionFeedforward.h:46
 
double Uff(int i) const
Returns an element of the previously calculated feedforward.
Definition LinearPlantInversionFeedforward.h:79
 
LinearPlantInversionFeedforward(const Matrixd< States, States > &A, const Matrixd< States, Inputs > &B, units::second_t dt)
Constructs a feedforward with the given coefficients.
Definition LinearPlantInversionFeedforward.h:57
 
A plant defined using state-space notation.
Definition LinearSystem.h:35
 
void DiscretizeAB(const Matrixd< States, States > &contA, const Matrixd< States, Inputs > &contB, units::second_t dt, Matrixd< States, States > *discA, Matrixd< States, Inputs > *discB)
Discretizes the given continuous A and B matrices.
Definition Discretization.h:41
 
Eigen::Matrix< double, Rows, Cols, Options, MaxRows, MaxCols > Matrixd
Definition EigenCore.h:21
 
Eigen::Vector< double, Size > Vectord
Definition EigenCore.h:12