libstp
Robotics library for Botball
Loading...
Searching...
No Matches
libstp::autotune::control::ControlOptimizationError Class Reference

Weighted step-response error for controller tuning. Port of ControlOptimizationError.ts. More...

#include <controller_optimization.hpp>

Public Member Functions

 ControlOptimizationError (const ControlLoop &controlLoop, double stepHeight, double maxOvershot, double weightingCtrlOut, double weightingOvershot)
double calcError (double w, double y) const

Detailed Description

Weighted step-response error for controller tuning. Port of ControlOptimizationError.ts.

Per-sample cost = (w - y)^2, plus a penalty proportional to control-output overshoot above stepHeight (weightingCtrlOut) and a penalty proportional to plant-output overshoot above stepHeight + maxOvershot (weightingOvershot).

Definition at line 21 of file controller_optimization.hpp.

Constructor & Destructor Documentation

◆ ControlOptimizationError()

libstp::autotune::control::ControlOptimizationError::ControlOptimizationError ( const ControlLoop & controlLoop,
double stepHeight,
double maxOvershot,
double weightingCtrlOut,
double weightingOvershot )

Member Function Documentation

◆ calcError()

double libstp::autotune::control::ControlOptimizationError::calcError ( double w,
double y ) const
nodiscard

The documentation for this class was generated from the following file: