20 params.
addClassDescription(
"Implements a proportional-integral-derivative (PID) controller.");
24 params.
addParam<
Real>(
"initial_integral", 0.0,
"Initial value for the integral component");
34 _input(getChainControlData<
Real>(
"input")),
35 _set_point(getChainControlData<
Real>(
"set_point")),
36 _K_p(getParam<
Real>(
"K_p")),
37 _K_i(getParam<
Real>(
"K_i")),
38 _K_d(getParam<
Real>(
"K_d")),
39 _error(declareChainControlData<
Real>(
"error")),
40 _error_old(getChainControlDataOldByName<
Real>(fullControlDataName(
"error"))),
41 _proportional(declareChainControlData<
Real>(
"proportional")),
42 _integral(declareChainControlData<
Real>(
"integral")),
43 _integral_old(getChainControlDataOldByName<
Real>(fullControlDataName(
"integral"))),
44 _derivative(declareChainControlData<
Real>(
"derivative")),
45 _output(declareChainControlData<
Real>(
"value")),
46 _previous_time(declareRestartableData<
Real>(
"previous_time"))
48 _integral = getParam<Real>(
"initial_integral");
const Real & _K_p
The coefficient for the proportional term.
bool absoluteFuzzyEqual(const T &var1, const T2 &var2, const T3 &tol=libMesh::TOLERANCE *libMesh::TOLERANCE)
Function to check whether two variables are equal within an absolute tolerance.
const Real & _set_point
set point
Real & _output
The output computed by the PID controller.
const Real & _K_d
The coefficient for the derivative term.
Real & _error
The current value of the error.
virtual void execute() override
Execute the control.
Real & _dt
Time step size.
Real & _proportional
The proportional component.
static InputParameters validParams()
auto max(const L &left, const R &right)
Implements a proportional-integral-derivative (PID) controller.
registerMooseObject("MooseApp", PIDChainControl)
Real & _integral
The integral component.
static InputParameters validParams()
const Real & _K_i
The coefficient for the integral term.
const Real & _integral_old
The old value of _integral.
void updateValues()
Updates all control data values.
Real & _derivative
The derivative component.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const Real & _input
input data
PIDChainControl(const InputParameters ¶meters)
const Real & _error_old
The old value of the error.
Real & _previous_time
Previous time for which value was computed.
Control that additionally provides the capability to produce/consume data values, to allow control op...