A simple custom PD controller for an oscillator
see DampedOscillatorCustomController.cpp on how to use it.
#pragma once
{
public:
const double& kp,
const double& kd
)
: uff_(uff), kp_(kp), kd_(kd)
{
}
{
}
{
controlAction = uff_;
controlAction(0) -= kp_ * state(0) + kd_ * state(1);
}
private:
double kp_;
double kd_;
};