Class LinearSMCimproved#
Defined in Program listing for file control/src/Controller/LinearSMCimproved.hpp
-
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
-
LinearSMCimproved(SP::ControlSensor sensor)#