20 params.
addClassDescription(
"Implements a proportional-integral-derivative (PID) controller.");
24 params.
addParam<Real>(
"initial_integral", 0.0,
"Initial value for the integral component");
25 params.
addRequiredParam<Real>(
"K_p",
"Coefficient for the proportional term");
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");
68 if (MooseUtils::absoluteFuzzyEqual(
_dt, 0.0))
registerMooseObject("MooseApp", PIDChainControl)
Control that additionally provides the capability to produce/consume data values, to allow control op...
static InputParameters validParams()
Implements a proportional-integral-derivative (PID) controller.
const Real & _K_p
The coefficient for the proportional term.
const Real & _K_d
The coefficient for the derivative term.
Real & _previous_time
Previous time for which value was computed.
static InputParameters validParams()
Real & _derivative
The derivative component.
const Real & _input
input data
const Real & _integral_old
The old value of _integral.
const Real & _set_point
set point
void updateValues()
Updates all control data values.
virtual void execute() override
Execute the control.
Real & _output
The output computed by the PID controller.
Real & _error
The current value of the error.
const Real & _error_old
The old value of the error.
Real & _integral
The integral component.
const Real & _K_i
The coefficient for the integral term.
Real & _proportional
The proportional component.
PIDChainControl(const InputParameters ¶meters)
Real & _dt
Time step size.