Generic Simulation Modules

class pymoskito.generic_simulation_modules.LinearStateSpaceModel(settings)[source]

The state space model of a linear system.

The parameters of this model can be provided in form of a file whose path is given by the setting config file . This path should point to a pickled dict holding the following keys:

An Instance of scipy.signal.StateSpace (from scipy) representing the system,
An array-like object holding the operational point’s inputs,
An array-like object holding the operational point’s outputs.
state_function(t, x, args)[source]

Calculate the state derivatives of a system with state x at time t.

  • x (Array-like) – System state.
  • t (float) – System time.

Temporal derivative of the system state at time t.

class pymoskito.generic_simulation_modules.ODEInt(settings)[source]

Wrapper for ode_int from Scipy project


Integrate until target step is reached.

Parameters:t – target time
Returns:system state at target time

propagate input changes to ode_int

class pymoskito.generic_simulation_modules.ModelInputLimiter(settings)[source]

ModelInputLimiter that limits the model input values.

Limits: (List of) list(s) that hold (min, max) pairs for the corresponding input.
class pymoskito.generic_simulation_modules.Setpoint(settings)[source]

Provides setpoints for every output component.

If the output is not scalar, just add more entries to the list. By querying the differential order from the controller (if available) the required derivatives are given.


Keep in mind that while this class provides zeros for all derivatives of the desired value, they actually strive to infinity for t=0 .

class pymoskito.generic_simulation_modules.HarmonicTrajectory(settings)[source]

This generator provides a scalar harmonic sinus signal with derivatives up to order n

class pymoskito.generic_simulation_modules.SmoothTransition(settings)[source]

provides (differential) smooth transition between two scalar states

class pymoskito.generic_simulation_modules.PIDController(settings)[source]

PID Controller

class pymoskito.generic_simulation_modules.LinearStateSpaceController(settings)[source]

A controller that is based on a state space model of a linear system.

This controller needs a linear statespace model, just as the LinearStateSpaceModel . The file provided in config file should therefore contain a dict holding the entries: model, op_inputs and op_outputs .

If poles is given (differing from None ) the state-feedback will be computed using pymoskito.place_siso() . Furthermore an appropriate prefilter is calculated, which establishes stationary attainment of the desired output values.


If a SIMO or MIMO system is given, the control package as well as the slycot package are needed the perform the pole placement.

class pymoskito.generic_simulation_modules.DeadTimeSensor(settings)[source]

Sensor that adds a measurement delay on chosen states

class pymoskito.generic_simulation_modules.GaussianNoise(settings)[source]

Noise generator for gaussian noise

class pymoskito.generic_simulation_modules.AdditiveMixer(settings)[source]

Signal Mixer that accumulates all input signals.

Processing is done according to rules of numpy broadcasting.