31template <
int States,
int Inputs>
43 template <
int Outputs>
47 plantRef.A(), plantRef.B()) {}
78 m_A = -B.householderQr().solve(A - Aref);
79 m_B = B.householderQr().solve(Bref);
98 double U(
int i)
const {
return m_u(i); }
112 m_u = m_A * x + m_B * u;
Contains the controller coefficients and logic for an implicit model follower.
Definition: ImplicitModelFollower.h:32
const InputVector & U() const
Returns the control input vector u.
Definition: ImplicitModelFollower.h:89
Vectord< Inputs > InputVector
Definition: ImplicitModelFollower.h:35
double U(int i) const
Returns an element of the control input vector u.
Definition: ImplicitModelFollower.h:98
void Reset()
Resets the controller.
Definition: ImplicitModelFollower.h:103
Vectord< States > StateVector
Definition: ImplicitModelFollower.h:34
InputVector Calculate(const StateVector &x, const InputVector &u)
Returns the next output of the controller.
Definition: ImplicitModelFollower.h:111
ImplicitModelFollower(const LinearSystem< States, Inputs, Outputs > &plant, const LinearSystem< States, Inputs, Outputs > &plantRef)
Constructs a controller with the given coefficients and plant.
Definition: ImplicitModelFollower.h:44
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.h:57
A plant defined using state-space notation.
Definition: LinearSystem.h:31
Definition: AprilTagPoseEstimator.h:15
Eigen::Matrix< double, Rows, Cols, Options, MaxRows, MaxCols > Matrixd
Definition: EigenCore.h:21
Eigen::Vector< double, Size > Vectord
Definition: EigenCore.h:12