Class LinearSensor

Defined in Program listing for file control/src/Sensor/LinearSensor.hpp

class LinearSensor : public ControlSensor

Common linear Sensor to get output of the system.

A generic linear sensor, to capture the output y defined as y = Cx + Du

Public Functions

LinearSensor(SP::DynamicalSystem ds)

Constructor for the SensorFactory.

Parameters
  • ds: the SP::DynamicalSystem it observes

LinearSensor(SP::DynamicalSystem ds, SP::SimpleMatrix C, SP::SimpleMatrix D = SP::SimpleMatrix())

Constructor with the full set of data.

Parameters
  • ds: the SP::DynamicalSystem it observes.
  • C: a SP::SiconosMatrix.
  • D: a SP::SiconosMatrix (optional).

virtual ~LinearSensor()

Destructor.

void capture()

capture data when the SensorEvent is processed ( for example set data[SensorEvent]=…

)

virtual void initialize(const NonSmoothDynamicalSystem &nsds)

initialize sensor data

Parameters
  • nsds: current nonsmooth dynamical system

void setC(const SimpleMatrix &C)

Set the C matrix.

Parameters
  • C: a SimpleMatrix

void setCPtr(SP::SimpleMatrix C)

Set the C matrix.

Parameters
  • C: a SP::SimpleMatrix

void setD(const SimpleMatrix &D)

Set the D matrix.

Parameters
  • D: a SimpleMatrix

void setDPtr(SP::SimpleMatrix D)

Set the D matrix.

Parameters
  • D: a SP::SimpleMatrix