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

PID-gain optimization via DE. Port of ControllerOptimizationDifferentialEvolution.ts. More...

#include <controller_optimization.hpp>

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

Public Member Functions

 ControllerOptimizationDifferentialEvolution (ControlLoop &controlLoop, ControlElement &controlOptimization)
std::vector< double > optimize (double limitMinParams, double limitMaxParams, bool dither, int maxNumSteps, double stepHeight, double stepTime, double endTime, double maxOvershot, double weightingCtrlOut, double weightingOvershot, std::uint32_t seed=0xC0FFEEu)
double rateCandidate (const std::vector< double > &paramList) override
void setStep (double stepHeight, double stepTime, double endTime, double maxOvershot, double weightingCtrlOut, double weightingOvershot)
Public Member Functions inherited from libstp::autotune::control::IDifferentialEvolutionRating
virtual ~IDifferentialEvolutionRating ()=default

Detailed Description

PID-gain optimization via DE. Port of ControllerOptimizationDifferentialEvolution.ts.

Simulates the closed loop over a fixed number of time steps (NUM_TIME_STEPS = 5000) for each candidate gain vector and accumulates the weighted step error. Implements IDifferentialEvolutionRating.

Definition at line 48 of file controller_optimization.hpp.

Constructor & Destructor Documentation

◆ ControllerOptimizationDifferentialEvolution()

libstp::autotune::control::ControllerOptimizationDifferentialEvolution::ControllerOptimizationDifferentialEvolution ( ControlLoop & controlLoop,
ControlElement & controlOptimization )

Member Function Documentation

◆ optimize()

std::vector< double > libstp::autotune::control::ControllerOptimizationDifferentialEvolution::optimize ( double limitMinParams,
double limitMaxParams,
bool dither,
int maxNumSteps,
double stepHeight,
double stepTime,
double endTime,
double maxOvershot,
double weightingCtrlOut,
double weightingOvershot,
std::uint32_t seed = 0xC0FFEEu )

◆ rateCandidate()

double libstp::autotune::control::ControllerOptimizationDifferentialEvolution::rateCandidate ( const std::vector< double > & paramList)
overridevirtual

◆ setStep()

void libstp::autotune::control::ControllerOptimizationDifferentialEvolution::setStep ( double stepHeight,
double stepTime,
double endTime,
double maxOvershot,
double weightingCtrlOut,
double weightingOvershot )

Configure the rating state directly (normally done by optimize()). Exposed for direct cost-function testing.


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