Pynamics Dummy Controller
pynamics.controllers.dummy
DummyController(n_inputs, n_outputs, sampling_time)
Bases: BaseController
This class defines the dummy controller used by the pynamics package to run open-loop simulations. The controller performs no computations.
Attributes:
| Name | Type | Description |
|---|---|---|
input_dim |
int
|
The number of controller inputs. |
output_dim |
int
|
The number of control actions (one for a single-output controller / single-input system). |
Ts |
int | float
|
Controller sampling time. |
Methods:
| Name | Description |
|---|---|
info |
Display a warning. |
control |
Compute the control actions for the next time instant. In practice, it simply outputs the value of |
Source code in pynamics/controllers/dummy.py
control(ref, y)
Computes the control actions for the next time instant.
This method outputs the control actions for the next time instant, which in this case are simply the reference values.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ref |
ndarray
|
Array of reference values. For regulation problems, this should be an array of zeros. |
required |
y |
ndarray
|
System state vector. Used for compatibility reasons. Unused by this 'controller'. |
required |
Returns:
| Type | Description |
|---|---|
ndarray
|
Array of control actions. In this case, the reference values themselves. |
Source code in pynamics/controllers/dummy.py
info()
Provides useful information regarding the controller.
This method issues a warning to the user that this 'controller' should not be used as a benchmark of any kind. It is simply used for open-loop simulations.