29template <
int States,
int Inputs>
41 template <
int Outputs>
45 plantRef.A(), plantRef.B()) {}
76 m_A = -B.householderQr().solve(A - Aref);
77 m_B = B.householderQr().solve(Bref);
96 double U(
int i)
const {
return m_u(i); }
110 m_u = m_A * x + m_B * u;
InputVector Calculate(const StateVector &x, const InputVector &u)
Returns the next output of the controller.
Definition ImplicitModelFollower.hpp:109
void Reset()
Resets the controller.
Definition ImplicitModelFollower.hpp:101
ImplicitModelFollower(const Matrixd< States, States > &A, const Matrixd< States, Inputs > &B, const Matrixd< States, States > &Aref, const Matrixd< States, Inputs > &Bref)
Constructs a controller with the given coefficients and plant.
Definition ImplicitModelFollower.hpp:55
const InputVector & U() const
Returns the control input vector u.
Definition ImplicitModelFollower.hpp:87
double U(int i) const
Returns an element of the control input vector u.
Definition ImplicitModelFollower.hpp:96
Vectord< Inputs > InputVector
Definition ImplicitModelFollower.hpp:33
ImplicitModelFollower(const LinearSystem< States, Inputs, Outputs > &plant, const LinearSystem< States, Inputs, Outputs > &plantRef)
Constructs a controller with the given coefficients and plant.
Definition ImplicitModelFollower.hpp:42
Vectord< States > StateVector
Definition ImplicitModelFollower.hpp:32
A plant defined using state-space notation.
Definition LinearSystem.hpp:35
Definition LinearSystem.hpp:20
Eigen::Matrix< double, Rows, Cols, Options, MaxRows, MaxCols > Matrixd
Definition EigenCore.hpp:21
Eigen::Vector< double, Size > Vectord
Definition EigenCore.hpp:12