File control/src/Controller/LinearSMC.hpp

Go to the source code of this file

Linear sliding mode controller.

class LinearSMC : public CommonSMC
#include <LinearSMC.hpp>

Linear sliding mode controller.

This controller implements the following sliding mode control strategy: \(\begin{equation} u = u_{\mathrm{eq}} + u_s\qquad\text{where}\begin{cases} u_{\mathrm{eq}} \text{is the equivalent control input}\\u_s = -sgn(\sigma)\end{cases},\end{equation}\)

where \( \sigma = Cx\) is the user-defined sliding variable.

Subclassed by LinearSMCimproved

Public Functions

LinearSMC(SP::ControlSensor sensor, unsigned int type = LINEAR_SMC)

Constructor for the ActuatorFactory.

Parameters
  • sensor: the ControlSensor feeding the Actuator
  • type: do not set this yourself ! this is used in derived classes

LinearSMC(SP::ControlSensor sensor, SP::SimpleMatrix B, SP::SimpleMatrix D = std11::shared_ptr<SimpleMatrix>(), unsigned int type = LINEAR_SMC)

Constructor with all the data.

Parameters
  • sensor: the ControlSensor feeding the Actuator
  • B: the matrix
  • D: the D matrix in the FirstOrderLinearR
  • type: do not set this yourself ! this is used in derived classes

virtual ~LinearSMC()

destructor

virtual void actuate()

Compute the new control law at each event Here we are using the following formula: \(u = u_{\mathrm{eq}} + u_s\).

void setDPtr(SP::SimpleMatrix D)

Set the D matrix.

Parameters
  • D: the new D matrix

Protected Functions

LinearSMC()

default constructor

Private Functions

ACCEPT_SERIALIZATION(LinearSMC)

serialization hooks