This block implements a PI or PID controller with the control gains being tuned by a rule-based method. This rule-based method automatically conducts tuning through the following steps:
Step 1: Introduce a relay disturbance
yHig and yLow), based on the control
error e(t) = us(t) - um(t). Details
can be found in
Buildings.Controls.OBC.Utilities.PIDWithAutotuning.Relay.Controller.Step 2: Extract parameters of a first-order plus time-delay (FOPTD) model
Step 3: Calculate the PID gains
This block is implemented using Buildings.Controls.OBC.Utilities.PIDWithInputGains
and inherits most of its configuration. However, through the
parameter controllerType, the controller can only be
configured as PI or PID controller.
Before the tuning process starts, this block has output from
Buildings.Controls.OBC.Utilities.PIDWithInputGains.
The PID tuning process starts when a request for performing
autotuning occurs, i.e., when the value of the boolean input signal
triTun changes from false to
true. During the tuning process, the block has the
output from a relay controller (see
Buildings.Controls.OBC.Utilities.PIDWithAutotuning.Relay.Controller).
The PID tuning process ends automatically (see details in
Buildings.Controls.OBC.Utilities.PIDWithAutotuning.BaseClasses.Relay.TunMonitor),
at which point this block reverts the output from the PID
controller that uses the tuned PID parameters.
Note:
inTunPro.y =
true, a new request for performing autotuning will be
ignored and a warning will be generated.y over time. When the changes in those disturbances
are small (e.g., less than 10%) and the change in y is
either small or exhibits regular oscillations, the process can be
considered in a stable state.The performance of the autotuning is determined by several
parameters, including the typical range of the control error
r, the reference output for the tuning process
yRef, the higher and lower values for the relay output
yHig and yLow, and the deadband
deaBan. These parameters must be specified on a
case-by-case basis. To set them, the user should conduct the
following steps.
Step 1: Conduct a "test run"
r so that the output
of the relay controller, rel.yDif, stays between 0 and
1.u_m.Step 2: Calculate yRef and deaBan
yRef to be the ratio of the difference between
the set point and the minimum value of u_m to the
range of u_m, (i.e., the difference between its
maximum and minimum values), during the test run.deaBan, first divide the maximum and the
minimum control errors during the test run by r. Then
set the deaBan to be half of the smaller absolute
value of those two deviations.Step 3: Determine yHig and yLow
yHig and yLow so that the
relay output is asymmetric, i.e., yHig - yRef ≠ yRef -
yLow.yHig must be greater than yRef but
cannot be greater than 1.yLow must be less than yRef but
cannot be less than 0.J. Berner (2017). "Automatic Controller Tuning using Relay-based Model Identification." Department of Automatic Control, Lund University.
u_s_start as it does not influence
the auto-tuning.r to relay
controller.