File control/src/Sensor/LinearSensor.hpp#

Go to the source code of this file

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

class LinearSensor : public ControlSensor
#include <LinearSensor.hpp>

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.

virtual void initialize(const NonSmoothDynamicalSystem &nsds)

initialize sensor data

Parameters:

nsds – current nonsmooth dynamical system

virtual void capture()

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

)

void setC(const SimpleMatrix &C)

Set the C matrix.

Parameters:

C – a SimpleMatrix

inline 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

inline void setDPtr(SP::SimpleMatrix D)

Set the D matrix.

Parameters:

D – a SP::SimpleMatrix

Private Functions

ACCEPT_SERIALIZATION(LinearSensor)#
inline LinearSensor()#

Default constructor.

Private Members

SP::SiconosMatrix _data#

A matrix for output.

SP::SimpleMatrix _dataPlot#

A matrix for saving all values.

unsigned int _k#

counter

SP::SimpleMatrix _matC#

Canonical matrices.

SP::SimpleMatrix _matD#
unsigned int _nSteps#

Number of time steps.