siconos.control.controller.CommonSMC (Python class)

class siconos.control.controller.CommonSMC(*args)[source]

Bases: siconos.control.controller.Actuator

Constructors

CommonSMC(int type, ControlSensor sensor)

General constructor.

Parameters:
  • type – the type of the SMC Actuator
  • sensor – the ControlSensor feeding the Actuator
CommonSMC(int type, ControlSensor sensor, array_like (np.float64, 2D) B, array_like (np.float64, 2D) D=std11::shared_ptr< array_like (np.float64, 2D) >())

Constructor for dynamics affine in control.

Parameters:
  • type – the type of the SMC Actuator
  • sensor – the ControlSensor feeding the Actuator
  • B – the matrix multiplying the control input
  • D – the saturation matrix (optional)
actuate() → void[source]

actuate()=0 -> None

Compute the new control law at each event.

getInternalNSDS() → NonSmoothDynamicalSystem[source]

get the NSDS used in the SMC

Returns:the NSDS used in the SMC
getInternalOSI() → OneStepIntegrator[source]

get the Integrator used in the SMC

Returns:the Integrator used in the SMC
initialize(NonSmoothDynamicalSystem nsds, Simulation s) → None[source]

Initialization.

Parameters:
  • nsds – current nonsmooth dynamical system
  • s – current simulation setup
lambda_() → SP::SiconosVector[source]

lambda() -> array_like (np.float64, 1D)

get _lambda

Returns:a pointer to _lambda
noUeq(bool b) → None[source]

Disable (or enable) the use of the state-continuous control FORMULA10_.

Parameters:b – disable the use of Ueq if true
relay() → LinearOSNS[source]

Get the OneStepNSProblem problem associated with the controller.

This is useful to gain access to the data given to the solver in Numerics

Returns:a reference to the LinearOSNS problem
setAlpha(double alpha) → None[source]

Set _alpha.

Parameters:alpha – the new value for _alpha
setComputeResidus(bool b) → None[source]

Disable (or enable) the computation of the residus on the Newton loop.

This has an incidence only if the Relation is nonlinear

Parameters:b – disable the computation of the residus
setCsurface(array_like (np.float64, 2D) Csurface) → None[source]

Set Csurface.

Parameters:Csurface – a SP::SimpleMatrix containing the new value for _Csurface
setDS(FirstOrderNonLinearDS ds) → None[source]

Set the DynamicalSystem used to compute the control law.

This is useful when we have a Nonlinear problem and we need to compute the control law with an approximate model, or when the dynamics are quite different.

Parameters:ds – the DynamicalSystem to be used in the Controller
setJacglambda(str plugin) → None[source]
setJacgx(str plugin) → None[source]
setJachlambda(str plugin) → None[source]
setJachx(str plugin) → None[source]
setPrecision(double newPrecision) → None[source]

Set the precision.

Parameters:newPrecision – a double
setSaturationMatrix(array_like (np.float64, 2D) newSat) → None[source]

Set _D to pointer newPtr.

Parameters:newSat – a SP::SimpleMatrix containing the new value for _D
setSolver(int numericsSolverId) → None[source]

Set the solver.

Parameters:numericsSolverId – the solver for the relay
setTheta(double newTheta) → None[source]

Set _theta, used in some discretization method for FORMULA11_.

Parameters:newTheta – the new value for _thetaSMC
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
sete(str plugin) → None[source]
setg(str plugin) → None[source]
seth(str plugin) → None[source]
ueq() -> array_like (np.float64, 1D)[source]

get FORMULA12_

Returns:a reference to _ueq
us() -> array_like (np.float64, 1D)[source]

get FORMULA13_

Returns:a reference to _us