https://mooseframework.inl.gov
Loading...
Searching...
No Matches
PIDControl.h
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
3//*
4//* All rights reserved, see COPYRIGHT for full restrictions
5//* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6//*
7//* Licensed under LGPL 2.1, please see LICENSE for details
8//* https://www.gnu.org/licenses/lgpl-2.1.html
9
10#pragma once
11
12#include "THMControl.h"
13
20class PIDControl : public THMControl
21{
22public:
24
25 virtual void execute();
26
27protected:
29 const Real & _value;
31 const Real & _set_point;
33 const Real & _K_p;
35 const Real & _K_i;
37 const Real & _K_d;
39 Real & _output;
41 const Real & _initial_value;
43 Real & _integral;
45 const Real & _integral_old;
47 Real & _error;
49 const Real & _error_old;
50
51public:
53};
const InputParameters & parameters() const
This block represents a proportional-integral-derivative controller (PID controller).
Definition PIDControl.h:21
Real & _output
The output computed by the PID controller.
Definition PIDControl.h:39
virtual void execute()
Definition PIDControl.C:48
const Real & _K_p
The coefficient for the proportional term.
Definition PIDControl.h:33
static InputParameters validParams()
Definition PIDControl.C:15
const Real & _K_d
The coefficient for the derivative term.
Definition PIDControl.h:37
const Real & _value
input data
Definition PIDControl.h:29
const Real & _error_old
The old value of the error.
Definition PIDControl.h:49
const Real & _integral_old
The old value of _integral.
Definition PIDControl.h:45
const Real & _set_point
set point
Definition PIDControl.h:31
Real & _error
The current value of the error.
Definition PIDControl.h:47
Real & _integral
The integral value accumulated over time.
Definition PIDControl.h:43
const Real & _K_i
The coefficient for the integral term.
Definition PIDControl.h:35
const Real & _initial_value
Initial value.
Definition PIDControl.h:41