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

Differentiator: y = K * (u - u_prev) / dt. Port of ControlElementD.ts. More...

#include <control_elements.hpp>

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

Public Member Functions

 ControlElementD (double k)
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) 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

Differentiator: y = K * (u - u_prev) / dt. Port of ControlElementD.ts.

Definition at line 55 of file control_elements.hpp.

Constructor & Destructor Documentation

◆ ControlElementD()

libstp::autotune::control::ControlElementD::ControlElementD ( double k)
inlineexplicit

Definition at line 58 of file control_elements.hpp.

Member Function Documentation

◆ calculate()

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

Advance one sample: feed input u, return output.

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

◆ getLowestTimeConstant()

double libstp::autotune::control::ControlElementD::getLowestTimeConstant ( ) const
inlinenodiscardoverridevirtual

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

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

Definition at line 61 of file control_elements.hpp.

◆ getType()

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

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

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

Definition at line 60 of file control_elements.hpp.

◆ initialize()

void libstp::autotune::control::ControlElementD::initialize ( double dt)
inlineoverridevirtual

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

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

Definition at line 62 of file control_elements.hpp.

◆ optimizeGetNumParameters()

int libstp::autotune::control::ControlElementD::optimizeGetNumParameters ( ) const
inlinenodiscardoverridevirtual

Number of tunable parameters this element consumes.

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

Definition at line 64 of file control_elements.hpp.

◆ optimizeSetParameters()

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

Load parameters from params starting at startIdx.

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

Definition at line 65 of file control_elements.hpp.


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_elements.hpp