Partial implementation of the StateFeedback interface for 1-dimensional output linear state-feedback filter types. More...
#include <state_feedback_1output.hpp>
Public Member Functions | |
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 state. More... | |
StateFeedback1Output & | operator= (const StateFeedback1Output &)=default |
StateFeedback1Output & | operator= (StateFeedback1Output &&)=default |
StateFeedback1Output (std::shared_ptr< ParamsType > _params) | |
StateFeedback1Output (const StateFeedback1Output &)=default | |
StateFeedback1Output (StateFeedback1Output &&)=default | |
virtual | ~StateFeedback1Output ()=default |
Public Member Functions inherited from tuw::StateFeedback< InputStateType, InputStateType, double, ParamsType > | |
StateFeedback & | operator= (const StateFeedback &)=default |
StateFeedback & | operator= (StateFeedback &&)=default |
std::shared_ptr< double > & | output () |
Access to the last computed output state. More... | |
std::shared_ptr< ParamsType > & | params () |
Access to the last parameters object pointer. More... | |
virtual void | reloadParam ()=0 |
Reloads class parameters. To be called when parameters that influence the class variables are changed. More... | |
StateFeedback (std::shared_ptr< ParamsType > _params) | |
StateFeedback (const StateFeedback &)=default | |
StateFeedback (StateFeedback &&)=default | |
virtual | ~StateFeedback ()=default |
Public Member Functions inherited from tuw::Integrator | |
void | integrate (const double &_dx) |
Addds a new value to the integrated value. More... | |
Integrator ()=default | |
Integrator (const Integrator &)=default | |
Integrator (Integrator &&)=default | |
const double & | intOutput () const |
Returns the integrator value. More... | |
Integrator & | operator= (const Integrator &)=default |
Integrator & | operator= (Integrator &&)=default |
void | reset (const double &_x0) |
resets the integrated value and compensation variable. More... | |
virtual | ~Integrator ()=default |
Protected Attributes | |
double | intSaturateVal_ |
Box constraint. When output outside of it, error integration is not performed. More... | |
double | kInt_ |
gain of the integrated error More... | |
Eigen::VectorXd | kX_ |
State error gains More... | |
size_t | outputOrder_ |
Order of the output variable in the defined state. More... | |
bool | reloadParamInternal_ |
Triggers base class reconfiguration. To be set to true on any parameter change. More... | |
Protected Attributes inherited from tuw::StateFeedback< InputStateType, InputStateType, double, ParamsType > | |
std::shared_ptr< double > | output_ |
Last computet output state. More... | |
std::shared_ptr< ParamsType > | params_ |
Pointer to the class parameters object. More... | |
Private Member Functions | |
void | reloadParamInternal () |
Performs class specific reconfiguration on parameters change. More... | |
Private Attributes | |
size_t | desSize_ |
size_t | outputOrderRelXDes_ |
double | t_ |
size_t | xDiffSize_ |
Eigen::VectorXd | xDiffVec_ |
Partial implementation of the StateFeedback interface for 1-dimensional output linear state-feedback filter types.
InputStateType | Class defining the current state of the afferent system |
ParamType | Class defining the filter parameters The class represents a generic state-feedback filter (with integrator term) for 1-dimensional output states: |
Given an observed state vector , a desired state vector , and a specified output order (outputOrder_), the filter computes as follows:
The integrator performs (numerically stable) integration on the error . It includes anti-windup and thus integration is not performed in a cycle if the computed output is outside the box-constraint intSaturateVal_. Note that integration can be disabled either by setting intSaturateVal_ or to .
If , is set to and is set to . This implies that the last state becomes feed-forward (as long as it is available and at the same order as the output order).
Variables that have to be manipulated by class extensions: outputOrder_, intSaturateVal_, kInt_, kX_, reloadParamInternal_.
Definition at line 71 of file state_feedback_1output.hpp.
|
inline |
Definition at line 75 of file state_feedback_1output.hpp.
|
virtualdefault |
|
default |
|
default |
|
inlineoverridevirtual |
Computes the output state at the specified time instant given the observed state and the desired state.
_xObs | Observed state |
_xDes | Desired state |
_t | Temporal evaluation point |
Implements tuw::StateFeedback< InputStateType, InputStateType, double, ParamsType >.
Definition at line 97 of file state_feedback_1output.hpp.
|
default |
|
default |
|
inlineprivate |
Performs class specific reconfiguration on parameters change.
Definition at line 125 of file state_feedback_1output.hpp.
|
private |
Definition at line 154 of file state_feedback_1output.hpp.
|
protected |
Box constraint. When output outside of it, error integration is not performed.
Definition at line 145 of file state_feedback_1output.hpp.
|
protected |
gain of the integrated error
Definition at line 147 of file state_feedback_1output.hpp.
|
protected |
State error gains
Definition at line 149 of file state_feedback_1output.hpp.
|
protected |
Order of the output variable in the defined state.
Definition at line 143 of file state_feedback_1output.hpp.
|
private |
Definition at line 160 of file state_feedback_1output.hpp.
|
protected |
Triggers base class reconfiguration. To be set to true on any parameter change.
Definition at line 151 of file state_feedback_1output.hpp.
|
private |
Definition at line 163 of file state_feedback_1output.hpp.
|
private |
Definition at line 157 of file state_feedback_1output.hpp.
|
private |
Definition at line 166 of file state_feedback_1output.hpp.