File control/src/Controller/LinearSMCimproved.hpp¶
Go to the source code of this file
General interface to define an actuator.
-
class LinearSMCimproved : public LinearSMC
Public Functions
-
LinearSMCimproved(SP::ControlSensor sensor)
Constructor.
- Parameters
sensor – the ControlSensor feeding the Actuator
-
LinearSMCimproved(SP::ControlSensor sensor, SP::SimpleMatrix B, SP::SimpleMatrix D = std::shared_ptr<SimpleMatrix>())
Constructor with all the data.
- Parameters
sensor – the ControlSensor feeding the Actuator
B – the B matrix in the FirstOrderLinearR
D – the D matrix in the FirstOrderLinearR
-
virtual ~LinearSMCimproved()
destructor
-
virtual void initialize(const NonSmoothDynamicalSystem &nsds, const Simulation &s)
Initialize Controller.
- Parameters
nsds – current nonsmooth dynamical system
s – current simulation setup
-
virtual void actuate()
Compute the new control law at each event Here we are using the following formula: TODO.
-
inline void setPerturbationPrediction(double ub = std::numeric_limits<double>::quiet_NaN())
Enable perturbation prediction.
-
inline const SiconosVector &up() const
Get the control input _up, acting against matched perturbations.
- Returns
a reference to _up
-
void setPredictionOrder(unsigned int order)
Set the order of the prediction.
0 -> the predicted value is the same as the one we measured
1 -> \( \widetilde{Cp_{k+1}} = 2Cp_k - Cp_{k-1} \)
2 -> \( \widetilde{Cp_{k+1}} = 3Cp_k - 3Cp_{k-1} + Cp_{k-2} \)
- Parameters
order – the order of the prediction
Protected Functions
-
void predictionPerturbation(const SiconosVector &xTk, SimpleMatrix &CBstar)¶
Predict the effect of the perturnation during the next timestep.
- Parameters
xTk – available state at the current time instant
CBstar – matrix \( CB^{*} \)
Protected Attributes
-
bool _predictionPerturbation¶
try to predict the perturbation
-
bool _inDisceteTimeSlidingPhase¶
boolean to determine if we are in the discrete-time sliding phase
-
BufferOfVectors _measuredPert¶
Vector to store previous values of the perturbation.
-
BufferOfVectors _predictedPert¶
Vector of predicted values for the perturbation.
-
double _ubPerturbation¶
Upper bound on the norm2 of the perturbation.
Private Functions
-
ACCEPT_SERIALIZATION(LinearSMCimproved)¶
-
inline LinearSMCimproved()¶
default constructor
-
LinearSMCimproved(SP::ControlSensor sensor)