soft4pes.control.common.controller#

Base class for controllers.

Classes#

Controller

Base class for controllers.

Module Contents#

class soft4pes.control.common.controller.Controller[source]#

Bases: abc.ABC

Base class for controllers.

data[source]#

Data storage for the controller, containing input and output namespaces.

Type:

SimpleNamespace

input[source]#

Namespace for storing input data.

Type:

SimpleNamespace

output[source]#

Namespace for storing output data.

Type:

SimpleNamespace

Ts[source]#

Sampling interval [s].

Type:

float

set_sampling_interval(Ts)[source]#

Set the sampling interval.

This method can be extended to set and/or calculate additional parameters.

Parameters:

Ts (float) – Sampling interval [s].

abstract execute(sys, kTs)[source]#

Execute the controller.

Parameters:
  • sys (object) – System model.

  • kTs (float) – Current discrete time instant [s].

Returns:

output – The output of the controller after execution.

Return type:

SimpleNamespace

save_data()[source]#

Save controller data.

The method saves the current input and output data to the data storage.