|
libstp
Robotics library for Botball
|
Series chain of control elements. Port of ControlPath.ts. More...
#include <control_path.hpp>
Public Member Functions | |
| ControlPath ()=default | |
| void | add (std::unique_ptr< ControlElement > element) |
| Append an element to the chain (takes ownership). | |
| std::string | getType () const override |
| Short type tag, e.g. "P", "PT1", "ControlLoop". | |
| double | getLowestTimeConstant () const override |
| Lowest time constant of the element, or -1 if it has none. | |
| void | initialize (double dt) override |
Reset internal state for a simulation run at sample time dt. | |
| double | calculate (double u, double dt) override |
Advance one sample: feed input u, return output. | |
| int | optimizeGetNumParameters () const override |
| Number of tunable parameters this element consumes. | |
| void | optimizeSetParameters (const std::vector< double > ¶ms, int startIdx) override |
Load parameters from params starting at startIdx. | |
| Public Member Functions inherited from libstp::autotune::control::ControlElement | |
| virtual | ~ControlElement ()=default |
Series chain of control elements. Port of ControlPath.ts.
Output of element i feeds element i+1. Owns its elements via unique_ptr so callers can build a path with add(std::make_unique<...>()).
Definition at line 18 of file control_path.hpp.
|
default |
| void libstp::autotune::control::ControlPath::add | ( | std::unique_ptr< ControlElement > | element | ) |
Append an element to the chain (takes ownership).
|
overridevirtual |
Advance one sample: feed input u, return output.
Implements libstp::autotune::control::ControlElement.
|
nodiscardoverridevirtual |
Lowest time constant of the element, or -1 if it has none.
Implements libstp::autotune::control::ControlElement.
|
inlinenodiscardoverridevirtual |
Short type tag, e.g. "P", "PT1", "ControlLoop".
Implements libstp::autotune::control::ControlElement.
Definition at line 26 of file control_path.hpp.
|
overridevirtual |
Reset internal state for a simulation run at sample time dt.
Implements libstp::autotune::control::ControlElement.
|
nodiscardoverridevirtual |
Number of tunable parameters this element consumes.
Implements libstp::autotune::control::ControlElement.
|
overridevirtual |
Load parameters from params starting at startIdx.
Implements libstp::autotune::control::ControlElement.