33 #ifndef STATE_FEEDBACK_1OUTPUT_HPP 34 #define STATE_FEEDBACK_1OUTPUT_HPP 70 template <
typename InputStateType,
typename ParamsType>
78 this->
output_ = std::shared_ptr<double>(
new double);
97 std::shared_ptr<double>&
compute(std::shared_ptr<InputStateType>& _xObs, std::shared_ptr<InputStateType>& _xDes,
98 const double& _t)
override 108 xDiffVec_(i) = _xObs->value(i) - _xDes->value(i);
110 for (
size_t i = outputOrder_; i <
xDiffSize_; ++i)
170 #endif // STATE_FEEDBACK_1OUTPUT_HPP Eigen::VectorXd kX_
State error gains
double intSaturateVal_
Box constraint. When output outside of it, error integration is not performed.
void reset(const double &_x0)
resets the integrated value and compensation variable.
Eigen::VectorXd xDiffVec_
bool reloadParamInternal_
Triggers base class reconfiguration. To be set to true on any parameter change.
size_t outputOrder_
Order of the output variable in the defined state.
StateFeedback1Output & operator=(const StateFeedback1Output &)=default
std::shared_ptr< double > output_
Last computet output state.
double kInt_
gain of the integrated error
virtual ~StateFeedback1Output()=default
const double & intOutput() const
Returns the integrator value.
StateFeedback1Output(std::shared_ptr< ParamsType > _params)
Interface for a filter that outputs a desired state given an observed state and a desired state...
Partial implementation of the StateFeedback interface for 1-dimensional output linear state-feedback ...
void reloadParamInternal()
Performs class specific reconfiguration on parameters change.
size_t outputOrderRelXDes_
void integrate(const double &_dx)
Addds a new value to the integrated value.
std::shared_ptr< double > & compute(std::shared_ptr< InputStateType > &_xObs, std::shared_ptr< InputStateType > &_xDes, const double &_t) override
Computes the output state at the specified time instant given the observed state and the desired stat...
Minimal class performing numerically stable integration (using the Kahan summation algorithm)...