Skip to content

Commit 7f3b4aa

Browse files
committed
Revised documentation
1 parent e185022 commit 7f3b4aa

8 files changed

Lines changed: 27 additions & 34 deletions

File tree

Buildings/Controls/OBC/Utilities/PIDWithAutotuning/AutoTuner/AMIGO/BaseClasses/PIDDerivativeTime.mo

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,7 @@ First implementation.<br/>
7676
</li>
7777
</ul>
7878
</html>", info="<html>
79-
<p>This block calculates the derivative time of a PID controller.</p>
80-
<h4>Main equations</h4>
79+
<p>This block calculates the derivative time of a PID controller as</p>
8180
<p align=\"center\" style=\"font-style:italic;\">
8281
T<sub>d</sub> = 0.5 L T/(0.3 L + T),
8382
</p>

Buildings/Controls/OBC/Utilities/PIDWithAutotuning/AutoTuner/AMIGO/BaseClasses/PIDGain.mo

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,7 @@ First implementation.<br/>
8282
</li>
8383
</ul>
8484
</html>", info="<html>
85-
<p>This block calculates the control gain of a PID model.</p>
86-
<h4>Main equations</h4>
85+
<p>This block calculates the control gain of a PID model as
8786
<p align=\"center\" style=\"font-style:italic;\">
8887
k = 1/k<sub>p</sub> + (0.2 + 0.45 T/L),
8988
</p>

Buildings/Controls/OBC/Utilities/PIDWithAutotuning/AutoTuner/AMIGO/BaseClasses/PIDIntegralTime.mo

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,7 @@ First implementation.<br/>
9090
</li>
9191
</ul>
9292
</html>", info="<html>
93-
<p>This block calculates the integral time of a PID model.</p>
94-
<h4>Main equations</h4>
93+
<p>This block calculates the integral time of a PID model as
9594
<p align=\"center\" style=\"font-style:italic;\">
9695
T<sub>i</sub> = L (0.4 L + 0.8 T)/(L + 0.1 T),
9796
</p>

Buildings/Controls/OBC/Utilities/PIDWithAutotuning/AutoTuner/AMIGO/BaseClasses/PIGain.mo

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,7 @@ First implementation.<br/>
124124
</li>
125125
</ul>
126126
</html>", info="<html>
127-
<p>This block calculates the control gain of a PI model.</p>
128-
<h4>Main equations</h4>
127+
<p>This block calculates the control gain of a PI model as
129128
<p align=\"center\" style=\"font-style:italic;\">
130129
k = 0.15/k<sub>p</sub> + (0.35-LT/(L+T)<sup>2</sup>)(T/k<sub>p</sub>/L),
131130
</p>

Buildings/Controls/OBC/Utilities/PIDWithAutotuning/AutoTuner/AMIGO/BaseClasses/PIIntegralTime.mo

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,7 @@ First implementation.<br/>
125125
</ul>
126126
</html>", info="<html>
127127
<p>
128-
This block calculates the integral time of a PI model.
129-
</p>
130-
<h4>Main equations</h4>
128+
This block calculates the integral time of a PI model as</p>
131129
<p align=\"center\" style=\"font-style:italic;\">
132130
T<sub>i</sub> = 0.35 L + 13 L T<sup>2</sup>/(T<sup>2</sup> + 12 L T + 7 L<sup>2</sup>),
133131
</p>

Buildings/Controls/OBC/Utilities/PIDWithAutotuning/FirstOrderAMIGO.mo

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ block FirstOrderAMIGO
111111
Buildings.Controls.OBC.Utilities.PIDWithAutotuning.Relay.ResponseProcess resPro(
112112
final yHig=yHig - yRef,
113113
final yLow=yRef - yLow)
114-
"Identify the on and off period length, the half period ratio,
114+
"Identify the on and off period length, the half period ratio,
115115
and the moments when the tuning starts and ends"
116116
annotation (Placement(transformation(extent={{-20,-60},{0,-40}})));
117117
Buildings.Controls.OBC.Utilities.PIDWithAutotuning.SystemIdentification.FirstOrderTimeDelay.ControlProcessModel
@@ -222,7 +222,7 @@ protected
222222
"Check if the setpoint changes"
223223
annotation (Placement(transformation(extent={{0,100},{20,120}})));
224224
Buildings.Controls.OBC.CDL.Utilities.Assert assMes3(
225-
final message="The setpoint must not change when an autotuning tuning is ongoing.
225+
final message="The setpoint must not change when an autotuning tuning is ongoing.
226226
This ongoing autotuning will be aborted and the control gains will not be changed.")
227227
"Warning message when the setpoint changes during tuning process"
228228
annotation (Placement(transformation(extent={{160,100},{180,120}})));
@@ -405,7 +405,7 @@ Step 2: Extract parameters of a first-order plus time-delay (FOPTD) model
405405
<ul>
406406
<li>
407407
Based on the inputs and outputs from the relay controller, the
408-
parameters of the FOPTD model is calculated (see
408+
parameters of the FOPTD model is calculated (see
409409
<a href=\"modelica://Buildings.Controls.OBC.Utilities.PIDWithAutotuning.SystemIdentification\">
410410
Buildings.Controls.OBC.Utilities.PIDWithAutotuning.SystemIdentification</a>).
411411
The FOPTD is a simplified representation of the control process.
@@ -417,7 +417,7 @@ Step 3: Calculate the PID gains
417417
<ul>
418418
<li>
419419
The PID gains are calculated with the Approximate M-constrained Integral Gain Optimization (AMIGO) method
420-
based on the FOPTD model parameters (see
420+
based on the FOPTD model parameters (see
421421
<a href=\"modelica://Buildings.Controls.OBC.Utilities.PIDWithAutotuning.AutoTuner.AMIGO\">
422422
Buildings.Controls.OBC.Utilities.PIDWithAutotuning.AutoTuner.AMIGO</a>).
423423
</li>
@@ -461,13 +461,13 @@ generated. The ongoing tuning process will be halted, and no adjustments will be
461461
to the PID parameters.
462462
</li>
463463
<li>
464-
The autotuning must be conducted when the simulation is in a stable state.
464+
The autotuning must be conducted when the process is in a stable state.
465465
The user should monitor changes in the independent variables and
466-
the control variables (e.g., mass flow rate, temperature) over time.
466+
the controlled variables (e.g., mass flow rate, temperature) over time.
467467
When the changes in the independent variables are small (e.g., less than 10%),
468-
and the changes in the control variables are either small or
468+
and the changes in the controlled variables are either small or
469469
exhibit regular oscillations,
470-
the simulation can be considered in a stable state.
470+
the process can be considered in a stable state.
471471
</li>
472472
</ul>
473473
<h4>Guidance for setting the parameters</h4>
@@ -477,7 +477,7 @@ typical range of the control error <code>r</code>,
477477
the reference output for the tuning process <code>yRef</code>, the higher and
478478
lower values for the relay output <code>yHig</code> and <code>yLow</code>, and the
479479
deadband <code>deaBan</code>.
480-
These parameters must be specified on a case-by-case basis.
480+
These parameters must be specified on a case-by-case basis.
481481
To set them, the user should conduct the following steps.
482482
</p>
483483
<p>
@@ -489,7 +489,7 @@ In the test run, disable the autotuning and keep the independent variables,
489489
including but not limited to the setpoint value, constant.
490490
</li>
491491
<li>
492-
During the test run, adjust <code>r</code> so that the
492+
During the test run, adjust <code>r</code> so that the
493493
output of the relay controller, <code>rel.yDif</code>,
494494
stays between 0 and 1.
495495
</li>

Buildings/Controls/OBC/Utilities/PIDWithAutotuning/Relay/Controller.mo

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -160,10 +160,9 @@ annotation (defaultComponentName = "relCon",
160160
coordinateSystem(preserveAspectRatio=false)),
161161
Documentation(info="<html>
162162
<p>
163-
This block generates a relay output <code>yDif</code> which equals to
164-
<code>(u_m - u_s)/r</code>.
165-
<code>u_m</code> and <code>u_s</code>
166-
are the measurement and the setpoint, respectively.
163+
This block generates a relay output <code>yDif = (u_m - u_s)/r</code>, where
164+
<code>u_m</code> is the measurement,
165+
<code>u_s</code> is the setpoint and
167166
<code>r</code> is the typical range of control error.
168167
</p>
169168
<p>
@@ -176,20 +175,20 @@ Step 1: Calculate control error,
176175
</p>
177176
<ul>
178177
<li>
179-
If the parameter <code>reverseActing = true</code>, set the control error <code>err</code> to
180-
<code>(u_s - u_m)/r</code>, else set it to <code>(u_m - u_s)/r</code>.
178+
If the parameter <code>reverseActing = true</code>, set the control error <code>err = (u_s - u_m)/r</code>,
179+
else set <code>err = (u_m - u_s)/r</code>.
181180
</li>
182181
</ul>
183182
<p>
184183
Step 2: Calculate <code>y</code> and <code>yOn</code>,
185184
</p>
186185
<ul>
187186
<li>
188-
If <code>err &gt; deaBan</code> and <code>trigger</code> is <code>true</code>,
187+
If <code>err &gt; deaBan</code> and <code>trigger = true</code>,
189188
then <code>y = yHig</code> and <code>yOn = true</code>,
190189
</li>
191190
<li>
192-
else if <code>err &lt; -deaBan</code> and <code>trigger</code> is <code>true</code>,
191+
else if <code>err &lt; -deaBan</code> and <code>trigger = true</code>,
193192
then <code>y = yLow</code> and <code>yOn = false</code>,
194193
</li>
195194
<li>

Buildings/Controls/OBC/Utilities/PIDWithAutotuning/Relay/ResponseProcess.mo

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -126,20 +126,20 @@ First implementation.<br/>
126126
</ul>
127127
</html>", info="<html>
128128
<p>
129-
This block processes a relay switch output signal and calculates:
129+
This block processes a relay switch output signal and calculates
130130
</p>
131131
<ol>
132132
<li>
133-
the length of the on period;
133+
the length of the on period,
134134
</li>
135135
<li>
136-
the length of the off period;
136+
the length of the off period,
137137
</li>
138138
<li>
139-
the normalized time delay of the responses;
139+
the normalized time delay of the responses, and
140140
</li>
141141
<li>
142-
the flags which indicate if the tuning starts and completes, respectively.
142+
the flags which indicate if the tuning starts and completes.
143143
</li>
144144
</ol>
145145
<p>

0 commit comments

Comments
 (0)