siconos.control.observer

Module documentation

class siconos.control.observer.nullDeleter(*args, **kwargs)[source]

Bases: object

Using a shared_ptr to hold a pointer to a statically allocated

object use create<type>SPtr(<type> &x) cf http://www.boost.org/doc/

class siconos.control.observer.Observer(*args, **kwargs)[source]

Bases: object

Observers Base Class

Abstract class, interface to user-defined observers.

An Observer is dedicated to estimate the state of a DynamicalSystem given its dynamics, inputs and a initial estimate of the state.

setId(newId)[source]

set id of the Observer

Parameters

newId (string) – the new id.

getId()[source]

get id of the Observer

Return type

string

Returns

a string

getType()[source]

get the type of the Observer (ie class name)

Return type

int

Returns

an integer

setTimeDiscretisation(td)[source]

This is derived in child classes if they need to copy the TimeDiscretisation associated with this Sensor

Parameters

td (TimeDiscretisation) – the TimeDiscretisation for this Sensor

initialize(nsds, s)[source]

initialize observer data.

Parameters
  • nsds (NonSmoothDynamicalSystem) – current nonsmooth dynamical system

  • s (Simulation) – current simulation setup

process()[source]

capture data when the ObserverEvent is processed

display()[source]

display the data of the Observer on the standard output

e()[source]

get the error e

Return type

SiconosVector

Returns

a pointer to e

xHat()[source]
Return type

SiconosVector

Returns

the estimated state

setDS(ds)[source]

Set the DynamicalSystem used in the Observer

Parameters

ds (DynamicalSystem) – the DynamicalSystem used in the Observer

getInternalNSDS()[source]
Return type

NonSmoothDynamicalSystem

Returns

the Model used in the Observer

class siconos.control.observer.LuenbergerObserver(*args)[source]

Bases: siconos.control.observer.Observer

Overload 1: Constructor with a TimeDiscretisation, a ControlSensor and an initial estimate of the state.

Parameters
  • sensor (ControlSensor) – the SP::ControlSensor that feed us with measurements

  • xHat0 (SiconosVector) – the initial guess for the state


Overload 2: Constructor with all the data

Parameters
  • sensor (ControlSensor) – the ControlSensor that feeds the Observer

  • xHat0 (SiconosVector) – the initial guess for the state

  • C (SiconosMatrix) – the observation matrix

  • L (SiconosMatrix) – the gain matrix

process()[source]

Compute the new control law at each event

initialize(nsds, s)[source]

Initialization

Parameters
  • nsds (NonSmoothDynamicalSystem) – current nonsmooth dynamical system

  • s (Simulation) – current simulation setup

setLPtr(L)[source]

Set the L matrix

Parameters

L (SiconosMatrix) – the new L matrix

setCPtr(C)[source]

Set the C matrix

Parameters

C (SiconosMatrix) – the new C matrix

class siconos.control.observer.SlidingReducedOrderObserver(*args)[source]

Bases: siconos.control.observer.Observer

Overload 1: Constructor with the standard interface

Parameters
  • sensor (ControlSensor) – the SP::ControlSensor that feed us with measurements

  • xHat0 (SiconosVector) – the initial guess for the state


Overload 2: Constructor with all the data

Parameters
  • sensor (ControlSensor) – the sensor that feeds the Observer

  • xHat0 (SiconosVector) – the initial guess for the state

  • C (SimpleMatrix) – observation matrix

  • L (SimpleMatrix) – gain matrix

process()[source]

Update the estimate at each event

initialize(nsds, s)[source]

Initialization

Parameters
  • nsds (NonSmoothDynamicalSystem) – current nonsmooth dynamical system

  • s (Simulation) – current simulation setup

setLPtr(L)[source]

Set the L matrix

Parameters

L (SimpleMatrix) – the new L matrix

setCPtr(C)[source]

Set the C matrix

Parameters

C (SimpleMatrix) – the new C matrix