siconos.control.observer.Observer (Python class)

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.

Generated class (swig), based on C++ header Program listing for file control/src/Observer/Observer.hpp.

Constructors

Observer(int type, ControlSensor sensor, array_like (np.float64, 1D) xHat0, str newId="none")

Constructor with a TimeDiscretisation.

Parameters:
  • type – the type of the Observer, which corresponds to the class type
  • sensor – the SP::Sensor to get the measurements
  • xHat0 – the initial guess for the state
  • newId – the id of the Observer
Observer(int type, ControlSensor sensor, array_like (np.float64, 1D) xHat0, DynamicalSystem ds, str newId="none")

Constructor with a TimeDiscretisation.

Parameters:
  • type – the type of the Observer, which corresponds to the class type.
  • sensor – the SP::Sensor to get the measurements
  • xHat0 – the initial guess for the state
  • ds – the SP::DynamicalSystem used as a model for the real DynamicalSystem
  • newId – the id of the Observer
display() → None[source]

display the data of the Observer on the standard output

e() -> array_like (np.float64, 1D)[source]

get the error e

Returns:a pointer to e
getId() → str[source]

get id of the Observer

Returns:a string
getInternalNSDS() → NonSmoothDynamicalSystem[source]

get the Model used in the Observer

Returns:The Model used in the Observer
getType() → int[source]

get the type of the Observer (ie class name)

Returns:an integer
initialize(NonSmoothDynamicalSystem nsds, Simulation s) → None[source]

initialize observer data.

Parameters:
  • nsds – current nonsmooth dynamical system
  • s – current simulation setup
process() → void[source]

process()=0 -> None

capture data when the ObserverEvent is processed

setDS(DynamicalSystem ds) → None[source]

Set the DynamicalSystem used in the Observer.

Parameters:ds – the DynamicalSystem used in the Observer
setId(str newId) → None[source]

set id of the Observer

Parameters:newId – the new id.
setTimeDiscretisation(TimeDiscretisation td) → None[source]

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

Parameters:td – the TimeDiscretisation for this Sensor
xHat() -> array_like (np.float64, 1D)[source]

get the estimated state

Returns:a pointer to xHat