Collection of validation models
Information
This package contains validation models.
Package Content
Name |
Description |
CountTrue
|
Validation model |
FirstTrueIndex
|
Validation model |
HoldReal
|
Validation model |
LastTrueIndex
|
Validation model |
MultiMaxInteger
|
|
MultiMinInteger
|
|
PlaceholderInteger
|
Validation model |
PlaceholderLogical
|
Validation model |
PlaceholderReal
|
Validation model |
SortWithIndices
|
Validation model for the Sort block |
StageIndex
|
|
TimerWithReset
|
Validation model for the Timer block |
TrueArrayConditional
|
|
Validation model
Information
Validation model for the block
Buildings.Templates.Plants.Controls.Utilities.CountTrue.
Modelica definition
Validation model
Information
Validation model for the block
Buildings.Templates.Plants.Controls.Utilities.FirstTrueIndex.
Modelica definition
Validation model
Information
Validation model for the block
Buildings.Templates.Plants.Controls.Utilities.HoldValue.
Modelica definition
Validation model
Information
Validation model for the block
Buildings.Templates.Plants.Controls.Utilities.FirstTrueIndex.
Modelica definition
Information
Validation model for the block
Buildings.Templates.Plants.Controls.Utilities.MultiMaxInteger.
Modelica definition
Information
Validation model for the block
Buildings.Templates.Plants.Controls.Utilities.MultiMinInteger.
Modelica definition
Validation model
Information
Validation model for the block
Buildings.Templates.Plants.Controls.Utilities.PlaceholderInteger.
Modelica definition
Validation model
Information
Validation model for the block
Buildings.Templates.Plants.Controls.Utilities.PlaceholderLogical.
Modelica definition
Validation model
Information
Validation model for the block
Buildings.Templates.Plants.Controls.Utilities.PlaceholderReal.
Modelica definition
Validation model for the Sort block
Information
Validation model for the block
Buildings.Templates.Plants.Controls.Utilities.SortWithIndices.
The input u1
varies from -2 to +2, input u2
varies from -1 to +2,
input u3
varies from +2 to -2, input u4
varies from +3 to +2,
input u5
varies from 0 to +4,
Modelica definition
model SortWithIndices
Buildings.Templates.Plants.Controls.Utilities.SortWithIndices sorAsc(
nin=5)
;
Buildings.Controls.OBC.CDL.Reals.Sources.Ramp ramp1(
duration=1,
offset=-2,
height=4)
;
Buildings.Controls.OBC.CDL.Reals.Sources.Ramp ramp2(
duration=1,
offset=-1,
height=3)
;
Buildings.Controls.OBC.CDL.Reals.Sources.Ramp ramp3(
duration=1,
offset=2,
height=-4)
;
Buildings.Controls.OBC.CDL.Reals.Sources.Ramp ramp4(
duration=1,
offset=3,
height=-1)
;
Buildings.Controls.OBC.CDL.Reals.Sources.Ramp ramp5(
duration=1,
offset=0,
height=4)
;
Buildings.Templates.Plants.Controls.Utilities.SortWithIndices sorDes(
nin=5,
ascending=false)
;
equation
connect(ramp1.y,sorAsc.u[1]);
connect(ramp2.y,sorAsc.u[2]);
connect(ramp3.y,sorAsc.u[3]);
connect(ramp4.y,sorAsc.u[4]);
connect(ramp5.y,sorAsc.u[5]);
connect(ramp1.y,sorDes.u[1]);
connect(ramp2.y,sorDes.u[2]);
connect(ramp3.y,sorDes.u[3]);
connect(ramp4.y,sorDes.u[4]);
connect(ramp5.y,sorDes.u[5]);
end SortWithIndices;
Information
Validation model for the block
Buildings.Templates.Plants.Controls.Utilities.StageIndex.
Parameters
Type | Name | Default | Description |
Integer | nSta | 4 | Number of stages |
Modelica definition
model StageIndex
parameter Integer nSta=4
;
Buildings.Controls.OBC.CDL.Logical.Sources.Pulse ena(
width=0.9,
period=160,
shift=10)
;
Buildings.Templates.Plants.Controls.Utilities.StageIndex idxSta(
have_inpAva=false,
final nSta=nSta)
;
Buildings.Controls.OBC.CDL.Logical.Sources.SampleTrigger upPul(
period=20)
;
Buildings.Controls.OBC.CDL.Logical.Sources.SampleTrigger dowPul(
period=20)
;
Buildings.Templates.Plants.Controls.Utilities.StageIndex idxStaUna(
final nSta=nSta)
;
Buildings.Controls.OBC.CDL.Logical.Sources.Constant u1AvaSta[nSta](
k={false, false, true, true})
;
Buildings.Templates.Plants.Controls.Utilities.StageIndex idxStaRun(
have_inpAva=false,
final nSta=nSta,
dtRun=25)
;
Buildings.Templates.Plants.Controls.Utilities.StageIndex idxStaRunUna(
final nSta=nSta,
dtRun=25)
;
Buildings.Controls.OBC.CDL.Logical.Sources.TimeTable booTimTab(
table=[
0, 0, 0;
10, 1, 0;
70, 0, 1],
period=160)
;
Buildings.Controls.OBC.CDL.Logical.And u1Up
;
Buildings.Controls.OBC.CDL.Logical.And u1Dow
;
Buildings.Controls.OBC.CDL.Logical.TrueHold u1UpHol(duration=0.1)
;
Buildings.Controls.OBC.CDL.Logical.TrueHold u1DowHol(duration=0.1)
;
equation
connect(ena.y, idxSta.u1Lea);
connect(ena.y, idxStaUna.u1Lea);
connect(ena.y, idxStaRun.u1Lea);
connect(u1AvaSta.y, idxStaUna.u1AvaSta);
connect(ena.y, idxStaRunUna.u1Lea);
connect(u1AvaSta.y, idxStaRunUna.u1AvaSta);
connect(upPul.y, u1Up.u2);
connect(dowPul.y, u1Dow.u2);
connect(booTimTab.y[2], u1Dow.u1);
connect(u1Up.y, idxSta.u1Up);
connect(u1Dow.y, idxSta.u1Dow);
connect(u1Up.y, idxStaUna.u1Up);
connect(u1Dow.y, idxStaUna.u1Dow);
connect(u1Dow.y, idxStaRun.u1Dow);
connect(u1Dow.y, idxStaRunUna.u1Dow);
connect(u1Up.y, idxStaRun.u1Up);
connect(u1Up.y, idxStaRunUna.u1Up);
connect(booTimTab.y[1], u1Up.u1);
connect(u1Up.y, u1UpHol.u);
connect(u1Dow.y, u1DowHol.u);
end StageIndex;
Validation model for the Timer block
Information
Validation model for the block
Buildings.Templates.Plants.Controls.Utilities.TimerWithReset.
Modelica definition
model TimerWithReset
Buildings.Templates.Plants.Controls.Utilities.TimerWithReset noThr
;
Buildings.Templates.Plants.Controls.Utilities.TimerWithReset thrTim(
final t=0.3) ;
Buildings.Templates.Plants.Controls.Utilities.TimerWithReset thrTim1(
final t=0.3) ;
Buildings.Controls.OBC.CDL.Logical.Sources.Pulse booPul(
final width=0.7,
final period=2)
;
Buildings.Controls.OBC.CDL.Logical.Sources.Pulse booPul1(
final width=0.7,
final period=2,
final shift=-1)
;
Buildings.Controls.OBC.CDL.Logical.Sources.Constant
con(k=false) ;
Buildings.Templates.Plants.Controls.Utilities.TimerWithReset noThrRes
;
Buildings.Templates.Plants.Controls.Utilities.TimerWithReset thrTimRes(
final t=
0.3) ;
Buildings.Templates.Plants.Controls.Utilities.TimerWithReset thrTim1Res(
final t=
0.3) ;
Buildings.Controls.OBC.CDL.Logical.Sources.SampleTrigger
samTri(
final period=1.5,
shift=1.2) ;
Buildings.Controls.OBC.CDL.Logical.TrueFalseHold res(trueHoldDuration=0.01,
falseHoldDuration=0) ;
equation
connect(booPul.y,noThr.u);
connect(booPul.y,thrTim.u);
connect(booPul1.y,thrTim1.u);
connect(con.y, noThr.reset);
connect(con.y, thrTim.reset);
connect(con.y, thrTim1.reset);
connect(samTri.y, noThrRes.reset);
connect(booPul.y, noThrRes.u);
connect(booPul.y, thrTimRes.u);
connect(samTri.y, thrTimRes.reset);
connect(samTri.y, thrTim1Res.reset);
connect(booPul1.y, thrTim1Res.u);
connect(samTri.y, res.u);
end TimerWithReset;
Information
Validation model for the block
Buildings.Templates.Plants.Controls.Utilities.TrueArrayConditional.
Modelica definition
model TrueArrayConditional
Buildings.Templates.Plants.Controls.Utilities.TrueArrayConditional truArrConSam(nin=2)
;
Buildings.Controls.OBC.CDL.Integers.Sources.Pulse uIdx1(
amplitude=1,
period=4,
shift=1.5) ;
Buildings.Controls.OBC.CDL.Integers.Sources.Pulse uIdx2(
amplitude=1,
period=2.5,
offset=2) ;
Buildings.Controls.OBC.CDL.Integers.Sources.TimeTable uTru(table=[0,0; 1,1; 2,
2], period=4) ;
Buildings.Templates.Plants.Controls.Utilities.TrueArrayConditional truArrConGre(nout=4,
nin=2) ;
equation
connect(uTru.y[1], truArrConSam.u);
connect(uIdx1.y, truArrConSam.uIdx[1]);
connect(uTru.y[1], truArrConGre.u);
connect(uIdx1.y, truArrConGre.uIdx[1]);
connect(uIdx2.y, truArrConSam.uIdx[2]);
connect(uIdx2.y, truArrConGre.uIdx[2]);
end TrueArrayConditional;