libstp
Robotics library for Botball
Loading...
Searching...
No Matches
libstp::autotune::control::ControlPath Class Referencefinal

Series chain of control elements. Port of ControlPath.ts. More...

#include <control_path.hpp>

Inheritance diagram for libstp::autotune::control::ControlPath:
[legend]
Collaboration diagram for libstp::autotune::control::ControlPath:
[legend]

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 > &params, int startIdx) override
 Load parameters from params starting at startIdx.
Public Member Functions inherited from libstp::autotune::control::ControlElement
virtual ~ControlElement ()=default

Detailed Description

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.

Constructor & Destructor Documentation

◆ ControlPath()

libstp::autotune::control::ControlPath::ControlPath ( )
default

Member Function Documentation

◆ add()

void libstp::autotune::control::ControlPath::add ( std::unique_ptr< ControlElement > element)

Append an element to the chain (takes ownership).

◆ calculate()

double libstp::autotune::control::ControlPath::calculate ( double u,
double dt )
overridevirtual

Advance one sample: feed input u, return output.

Implements libstp::autotune::control::ControlElement.

◆ getLowestTimeConstant()

double libstp::autotune::control::ControlPath::getLowestTimeConstant ( ) const
nodiscardoverridevirtual

Lowest time constant of the element, or -1 if it has none.

Implements libstp::autotune::control::ControlElement.

◆ getType()

std::string libstp::autotune::control::ControlPath::getType ( ) const
inlinenodiscardoverridevirtual

Short type tag, e.g. "P", "PT1", "ControlLoop".

Implements libstp::autotune::control::ControlElement.

Definition at line 26 of file control_path.hpp.

◆ initialize()

void libstp::autotune::control::ControlPath::initialize ( double dt)
overridevirtual

Reset internal state for a simulation run at sample time dt.

Implements libstp::autotune::control::ControlElement.

◆ optimizeGetNumParameters()

int libstp::autotune::control::ControlPath::optimizeGetNumParameters ( ) const
nodiscardoverridevirtual

Number of tunable parameters this element consumes.

Implements libstp::autotune::control::ControlElement.

◆ optimizeSetParameters()

void libstp::autotune::control::ControlPath::optimizeSetParameters ( const std::vector< double > & params,
int startIdx )
overridevirtual

Load parameters from params starting at startIdx.

Implements libstp::autotune::control::ControlElement.


The documentation for this class was generated from the following file:
  • /home/runner/work/raccoon-lib/raccoon-lib/modules/libstp-autotune/include/autotune/control/control_path.hpp