29 template <
size_t STATE_DIM,
size_t CONTROL_DIM,
typename SCALAR =
double>
33 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
57 : u_ff_(uff), x_ref_(x), K_(K)
64 :
Controller<STATE_DIM, CONTROL_DIM,
SCALAR>(other), u_ff_(other.u_ff_), x_ref_(other.x_ref_), K_(other.K_)
94 controlAction = u_ff_ + K_ * (x - x_ref_);
void updateControlLaw(const ControlVector< CONTROL_DIM, SCALAR > &uff, const StateVector< STATE_DIM, SCALAR > &x, const FeedbackMatrix< STATE_DIM, CONTROL_DIM, SCALAR > &K=FeedbackMatrix< STATE_DIM, CONTROL_DIM, SCALAR >::Zero())
update the control law with a new set of parameters
Definition: ConstantStateFeedbackController.h:104
EIGEN_MAKE_ALIGNED_OPERATOR_NEW ConstantStateFeedbackController()
Default constructor.
Definition: ConstantStateFeedbackController.h:39
void computeControl(const StateVector< STATE_DIM, SCALAR > &x, const SCALAR &t, ControlVector< CONTROL_DIM, SCALAR > &controlAction) override
Computes current control.
Definition: ConstantStateFeedbackController.h:90
Definition: ControlVector.h:12
ConstantStateFeedbackController< STATE_DIM, CONTROL_DIM, SCALAR > * clone() const override
Clone operator.
Definition: ConstantStateFeedbackController.h:76
CppAD::AD< CppAD::cg::CG< double > > SCALAR
ConstantStateFeedbackController(const ControlVector< CONTROL_DIM, SCALAR > &uff, const StateVector< STATE_DIM, SCALAR > &x, const FeedbackMatrix< STATE_DIM, CONTROL_DIM, SCALAR > &K)
Constructor.
Definition: ConstantStateFeedbackController.h:54
Definition: StateVector.h:12
A constant state feedback controller.
Definition: ConstantStateFeedbackController.h:30
Definition: FeedbackMatrix.h:12
~ConstantStateFeedbackController()
Destructor.
Definition: ConstantStateFeedbackController.h:70
ConstantStateFeedbackController(const ConstantStateFeedbackController< STATE_DIM, CONTROL_DIM, SCALAR > &other)
Copy constructor.
Definition: ConstantStateFeedbackController.h:63
Interface class for all controllers.
Definition: Controller.h:26