Package with components related to a first-order plus time-delay model
Information
This package contains the blocks to identify the parameters of a first-order plus time-delay model.
Package Content
| Name |
Description |
ControlProcessModel
|
Identify the parameters of a first-order plus time-delay (FOPTD) model of the control process |
Validation
|
Collection of models that validate the blocks in the FirstOrderTimeDelay |
BaseClasses
|
Package with base classes |
Identify the parameters of a first-order plus time-delay (FOPTD) model of the control process
Information
This block calculates the model parameters of a FOPTD model.
Specifically, it employs
Buildings.Controls.OBC.Utilities.PIDWithAutotuning.SystemIdentification.FirstOrderTimeDelay.BaseClasses.Gain
and
Buildings.Controls.OBC.Utilities.PIDWithAutotuning.SystemIdentification.FirstOrderTimeDelay.BaseClasses.TimeConstantDelay
to identify the gain, the time constant, and the time delay, respectively.
The calculations are disabled by default. They will be enabled once the tuning period starts,
i.e., triSta becomes true.
The calculations complete when the tuning period ends,
i.e., triEnd becomes true.
Refer to
Buildings.Controls.OBC.Utilities.PIDWithAutotuning.Relay.Controller for detailed explanation
of the parameters yHig, yLow, and deaBan.
Parameters
| Type | Name | Default | Description |
| Real | yHig | | Higher value for the output |
| Real | yLow | | Lower value for the output |
| Real | deaBan | | Deadband for holding the output value |
Connectors
Modelica definition
block ControlProcessModel
parameter Real yHig(min=1E-6)
;
parameter Real yLow(min=1E-6)
;
parameter Real deaBan(min=1E-6)
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput tOn(
final quantity="Time",
final unit="s",
min=100*Buildings.Controls.OBC.CDL.Constants.eps)
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput tOff(
final quantity="Time",
final unit="s",
min=100*Buildings.Controls.OBC.CDL.Constants.eps)
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput tau(
final quantity="Time",
final unit="s",
min=100*Buildings.Controls.OBC.CDL.Constants.eps)
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput u
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput triSta
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput triEnd
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput inTun
;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput k
;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput T(
final quantity="Time",
final unit="s",
min=100*Buildings.Controls.OBC.CDL.Constants.eps)
;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput L(
final quantity="Time",
final unit="s",
min=100*Buildings.Controls.OBC.CDL.Constants.eps)
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput tunSta
;
protected
Buildings.Controls.OBC.CDL.Reals.AddParameter addPar(
final p=1)
;
Buildings.Controls.OBC.CDL.Reals.Divide div
;
Buildings.Controls.OBC.Utilities.PIDWithAutotuning.SystemIdentification.FirstOrderTimeDelay.BaseClasses.Gain
gain(
final yHig=yHig,
final yLow=yLow) ;
Buildings.Controls.OBC.Utilities.PIDWithAutotuning.SystemIdentification.FirstOrderTimeDelay.BaseClasses.TimeConstantDelay
timConDel(
final yHig=yHig,
final yLow=yLow,
final deaBan=deaBan)
;
Buildings.Controls.OBC.CDL.Discrete.TriggeredSampler samK(
final y_start=1)
;
Buildings.Controls.OBC.CDL.Discrete.TriggeredSampler samL(
final y_start=1)
;
Buildings.Controls.OBC.CDL.Discrete.TriggeredSampler samtOn(
final y_start=1)
;
Buildings.Controls.OBC.CDL.Discrete.TriggeredSampler samT(
final y_start=1)
;
Buildings.Controls.OBC.CDL.Discrete.TriggeredSampler samTau(
final y_start=0.5)
;
Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter gai(
final k=-1)
;
Buildings.Controls.OBC.CDL.Logical.Not not1
;
Buildings.Controls.OBC.CDL.Logical.And and2
;
Buildings.Controls.OBC.CDL.Utilities.Assert assTunFai(
final message=
"Autotuning failed. The controller gains are unchanged.")
;
CDL.Logical.Nand nand1 ;
equation
connect(gain.u, u);
connect(gain.tOn, tOn);
connect(gain.tOff, tOff);
connect(gain.triSta, triSta);
connect(timConDel.T, samT.u);
connect(samT.y, T);
connect(samT.trigger, triEnd);
connect(L, samL.y);
connect(samL.u, timConDel.L);
connect(samL.trigger, triEnd);
connect(samK.y, timConDel.k);
connect(samK.trigger, triEnd);
connect(samK.y, k);
connect(timConDel.tOn, samtOn.y);
connect(samtOn.u, tOn);
connect(samtOn.trigger, triEnd);
connect(gai.y, addPar.u);
connect(tau,samTau. u);
connect(samTau.y, gai.u);
connect(samTau.y, div.u1);
connect(triEnd,samTau. trigger);
connect(addPar.y, div.u2);
connect(div.y, timConDel.rat);
connect(and2.u1, not1.y);
connect(and2.y, tunSta);
connect(and2.u2, triEnd);
connect(timConDel.triFai, not1.u);
connect(gain.k,samK. u);
connect(nand1.u1, inTun);
connect(nand1.u2, timConDel.triFai);
connect(nand1.y, assTunFai.u);
end ControlProcessModel;