@@ -85,7 +85,7 @@ protected
8585 final deaBan= deaBan)
8686 "Block that calculate the time constant and the time delay"
8787 annotation (Placement(transformation(extent={{60,10},{80,30}})));
88- Buildings.Controls.OBC.CDL.Discrete.TriggeredSampler samk (
88+ Buildings.Controls.OBC.CDL.Discrete.TriggeredSampler samK (
8989 final y_start= 1 )
9090 "Block that samples the gain when the tuning period ends"
9191 annotation (Placement(transformation(extent={{-60,10},{-40,30}})));
@@ -101,7 +101,7 @@ protected
101101 final y_start= 1 )
102102 "Block that samples the time constant when the tuning period ends"
103103 annotation (Placement(transformation(extent={{120,10},{140,30}})));
104- Buildings.Controls.OBC.CDL.Discrete.TriggeredSampler samtau (
104+ Buildings.Controls.OBC.CDL.Discrete.TriggeredSampler samTau (
105105 final y_start= 0.5 )
106106 "Block that samples the normalized time delay when the tuning period ends"
107107 annotation (Placement(transformation(extent={{-140,-70},{-120,-50}})));
@@ -115,16 +115,12 @@ protected
115115 Buildings.Controls.OBC.CDL.Logical.And and2
116116 "Check if the autotuning completes successfully"
117117 annotation (Placement(transformation(extent={{80,-80},{100,-60}})));
118- Buildings.Controls.OBC.CDL.Utilities.Assert assMes4(
119- final message = "Autotuning failed. The controller gains are unchanged." )
118+ Buildings.Controls.OBC.CDL.Utilities.Assert assTunFai( final message =
119+ "Autotuning failed. The controller gains are unchanged." )
120120 "Warning message when an autotuning fails"
121121 annotation (Placement(transformation(extent={{134,50},{154,70}})));
122- Buildings.Controls.OBC.CDL.Logical.Not not2
123- "Check if an error occurs"
122+ CDL.Logical.Nand nand1 "Check if an errors occured during tuning"
124123 annotation (Placement(transformation(extent={{100,50},{120,70}})));
125- Buildings.Controls.OBC.CDL.Logical.And and1
126- "Check if the errors occur during tuning"
127- annotation (Placement(transformation(extent={{66,50},{86,70}})));
128124equation
129125 connect (gain.u, u) annotation (Line(points={{-122,28},{-140,28},{-140,80},{-180,
130126 80}}, color={0,0,127}));
@@ -146,11 +142,11 @@ equation
146142 {82,20}}, color={0,0,127}));
147143 connect (samL.trigger, triEnd) annotation (Line(points={{110,-42},{110,-50},{130,
148144 -50},{130,-120}}, color={255,0,255}));
149- connect (samk .y, timConDel.k)
145+ connect (samK .y, timConDel.k)
150146 annotation (Line(points={{-38,20},{58,20}}, color={0,0,127}));
151- connect (samk .trigger, triEnd) annotation (Line(points={{-50,8},{-50,-90},{130,
147+ connect (samK .trigger, triEnd) annotation (Line(points={{-50,8},{-50,-90},{130,
152148 -90},{130,-120}},color={255,0,255}));
153- connect (samk .y, k) annotation (Line(points={{-38,20},{20,20},{20,80},{180,80}},
149+ connect (samK .y, k) annotation (Line(points={{-38,20},{20,20},{20,80},{180,80}},
154150 color={0,0,127}));
155151 connect (timConDel.tOn, samtOn.y) annotation (Line(points={{58,26},{-20,26},{-20,
156152 60},{-78,60}},color={0,0,127}));
@@ -161,13 +157,13 @@ equation
161157 -90},{130,-120}}, color={255,0,255}));
162158 connect (gai.y, addPar.u)
163159 annotation (Line(points={{-58,-60},{-42,-60}}, color={0,0,127}));
164- connect (tau, samtau. u)
160+ connect (tau,samTau. u)
165161 annotation (Line(points={{-180,-60},{-142,-60}},color={0,0,127}));
166- connect (samtau .y, gai.u)
162+ connect (samTau .y, gai.u)
167163 annotation (Line(points={{-118,-60},{-82,-60}},color={0,0,127}));
168- connect (samtau .y, div .u1) annotation (Line(points={{-118,-60},{-100,-60},{-100,
164+ connect (samTau .y, div .u1) annotation (Line(points={{-118,-60},{-100,-60},{-100,
169165 -14},{18,-14}}, color={0,0,127}));
170- connect (triEnd, samtau. trigger) annotation (Line(points={{130,-120},{130,-90},
166+ connect (triEnd,samTau. trigger) annotation (Line(points={{130,-120},{130,-90},
171167 {-130,-90},{-130,-72}}, color={255,0,255}));
172168 connect (addPar.y, div .u2) annotation (Line(points={{-18,-60},{-6,-60},{-6,-26},
173169 {18,-26}},color={0,0,127}));
@@ -181,16 +177,14 @@ equation
181177 130,-90},{130,-120}}, color={255,0,255}));
182178 connect (timConDel.triFai, not1.u) annotation (Line(points={{82,12},{86,12},{86,
183179 0},{8,0},{8,-50},{18,-50}}, color={255,0,255}));
184- connect (not2.y, assMes4.u)
185- annotation (Line(points={{122,60},{132,60}}, color={255,0,255}));
186- connect (gain.k, samk.u)
180+ connect (gain.k,samK. u)
187181 annotation (Line(points={{-98,20},{-62,20}}, color={0,0,127}));
188- connect (and1 .u1, inTun) annotation (Line(points={{64,60},{0,60},{0,-120}},
189- color={255,0,255}));
190- connect (and1 .u2, timConDel.triFai) annotation (Line(points={{64 ,52},{58 ,52},{58 ,
191- 40},{86,40}, {86,12},{82,12}}, color={255,0,255}));
192- connect (and1 .y, not2 .u)
193- annotation (Line(points={{88 ,60},{98 ,60}}, color={255,0,255}));
182+ connect (nand1 .u1, inTun)
183+ annotation (Line(points={{98,60},{0,60},{0,-120}}, color={255,0,255}));
184+ connect (nand1 .u2, timConDel.triFai) annotation (Line(points={{98 ,52},{86 ,52},
185+ {86,12},{82,12}}, color={255,0,255}));
186+ connect (nand1 .y, assTunFai .u)
187+ annotation (Line(points={{122 ,60},{132 ,60}}, color={255,0,255}));
194188annotation (
195189 defaultComponentName = "conProMod" ,
196190 Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{100,
0 commit comments