Download as pdf or txt
Download as pdf or txt
You are on page 1of 36

TESSLibs 17

Component Libraries for the TRNSYS


Simulation Environment

Volume 2

Controls Component Library


Mathematical Reference

TESS – Thermal Energy Systems Specialists, LLC


http://www.tess-inc.com
http://www.trnsys.com
TESSLibs 17 – Mathematical Reference

About This Manual


The information presented in this manual is intended to provide a detailed mathematical
reference for the TESS Controls Component Library for use with TRNSYS 17.

Revision history
 2005-11 For TESSLibs 2.00 and TRNSYS 16.00.0000
 2010-05 For TESSLibs 17.0 and TRNSYS 17.00.0000
 2012-03 For TESSLibs 17.1 and TRNSYS 17.01.0000

Where to find more information


Further information about the program and its availability can be obtained from the TRNSYS and
TESSLibs websites or from the TRNSYS coordinator at Thermal Energy System Specialists, LLC:

TRNSYS Coordinator Email: techsupport@tess-inc


Thermal Energy System Specialists, LLC Phone: +1 (608) 274 2577
22 North Carroll Street – suite 370 Fax: +1 (608) 278 1475
Madison, WI 53703 – U.S.A.

TRNSYS and TESSLibs websites:


http://sel.me.wisc.edu/trnsys
http://www.tess-inc.com
http://www.trnsys.com

Notice
This report was prepared as an account of work partially sponsored by the United States
Government. Neither the United States or the United States Department of Energy, nor any of
their employees, nor any of their contractors, subcontractors, or employees, including but not
limited to Thermal Energy System Specialists, LLC, makes any warranty, expressed or implied, or
assumes any liability or responsibility for the accuracy, completeness or usefulness of any
information, apparatus, product or process disclosed, or represents that its use would not infringe
privately owned rights.
© 2013 by Thermal Energy System Specialists, LLC of Madison, Wisconsin, USA
The software described in this document is furnished under a license agreement. This manual
and the software may be used or copied only under the terms of the license agreement. Except
as permitted by any such license, no part of this manual may be copied or reproduced in any form
or by any means without prior written consent from Thermal Energy System Specialists, LLC, of
Madison, Wisconsin.

3–2
TessLibs 17 – Mathematical Reference

TESS Library Contributors

J.W. Thornton D.E. Bradley T.P. McDowell

N.J. Blair M.J. Duffy N.D.LaHam

A.V. Naik

3–3
TESSLibs 17 – Mathematical Reference

3–4
TessLibs 17 – Mathematical Reference

TABLE OF CONTENTS
3. CONTROLLERS LIBRARY M ATHEMATICAL REFERENCE 3–7
3.1. Type 658: Humidistat 3–8
3.1.1. Nomenclature 3–8
3.1.2. Mathematical Description 3–8
3.1.3. References 3–9
3.2. Type 661: Delayed Output Device 3–10
3.2.1. Mathematical Description 3–10
3.3. Type 698: Five Stage Room Thermostat for n Temperatures 3–11
3.3.1. Mathematical Reference 3–11
3.4. Type 911: Differential Controller with Lockouts 3–14
3.4.1. Nomenclature 3–14
3.4.2. Mathematical Description 3–14
3.5. Type 953: Tempering Valve Controller 3–16
3.5.1. Nomenclature 3–16
3.5.2. Mathematical Description 3–16
3.6. Type 970: N-Stage Differential Heating Controller with Multiple Setpoints, Multiple
Deadbands and Time Delay 3–18
3.6.1. Mathematical Description 3–18
3.7. Type 971: N-Stage Differential Cooling Controller with Multiple Setpoints, Multiple
Deadbands and Time Delay 3–20
3.7.1. Mathematical Description 3–20
3.8. Type 973: N-Stage Differential Controller with 1 Setpoint, 1 Deadband and Time Delay 3–22
3.8.1. Mathematical Description 3–22
3.9. Type 974: N-Stage Differential Cooling Controller with 1 Setpoint, 2 Deadbands, Minimum
Run Time and Time Delay 3–24
3.9.1. Mathematical Description 3–24
3.10. Type 980: On/Off Time Calculator 3–26
3.10.1. Mathematical Reference 3–26
3.11. Type 1233: Thermostatic Control with Specified Run-Time 3–28
3.12. Type 1250: Outside Air Reset Controller 3–29
3.13. Type 1502: N-Stage Heating Aquastat or Simple Thermostat 3–31
3.13.1. Nomenclature 3–31
3.13.2. Mathematical Description 3–31
3.14. Type 1503: N-Stage Cooling Aquastat or Simple Thermostat 3–33
3.14.1. Nomenclature 3–33
3.14.2. Mathematical Description 3–33
3.15. Type 1669: Proportional Controller 3–35

3–5
TESSLibs 17 – Mathematical Reference

3.15.1. Mathematical Description 3–35

3–6
TessLibs 17 – Mathematical Reference

3. CONTROLLERS LIBRARY
MATHEMATICAL REFERENCE
This manual provides a detailed reference on each component model (Type) in the TESS
Libraries add-on to the TRNSYS Simulation Environment. The information includes the
mathematical basis of the model, as well as other elements that the user should take into
consideration when using the model (e.g. data file format, etc.).
This guide is organized in thirteen component categories that match the upper level directories in
the Simulation Studio proformas. Those categories are:
Applications
Cogeneration (CHP)
Controllers
Electrical
Geothermal (GHP)
Ground Coupling
HVAC
High Temperature Solar
Hydronics
Loads and Structures
Optimization (TRNOPT)
Solar
Storage
Utility

Within the categories, components are organized according to the models implemented in each
component. This is different from the Simulation Studio structure, where components are first
organized according to the function they perform, then according to the operation modes. An
example is the mathematical model known as Type 1 (Solar Collector), which is the first
component in the "Solar Thermal collectors" category in this manual. Type 1 is the underlying
model for 5 different proformas listed in the "Solar Thermal Collectors\Quadratic Efficiency"
category in the Simulation Studio. It is very frequent for one Type listed in this manual to be
associated with several proformas which correspond to different modes of operation for the
component.

3–7
TESSLibs 17 – Mathematical Reference

3.1. Type 658: Humidistat


This ON/OFF differential device is most often used to control the operation of a humidifier based
on the temperatures and relative humidities of the zone and inlet air ventilation stream. The
humidistat generates a control function which can have a value of 1 or 0. The value of the control
signal is set as a function of the difference between a set point relative humidity and the relative
humidity of the zone air, compared with two dead band relative humidity differences. The new
value of the control function also depends upon the value of the input control function at the
previous time step. The controller is normally used with the input control signal connected to the
output control signal, providing a hysteresis effect. However, control signals from different
components may be used as the input control signal for this component if a more detailed form of
hysteresis is desired.

3.1.1. Nomenclature
The relative humidity set point for the humidistat. In other words, the target
RHSetPoint %
zone relative humidity.
TAirInlet C The temperature of air sensed by the controller.
The multiplier used to calculate the relative humidity set point from the
A -
inlet air temperature.
The constant used to calculate the relative humidity set point from the inlet
B -
air temperature.

3.1.2. Mathematical Description


In this model, the relative humidity set point is a linear function of the inlet air temperature as
shown in equation 1:

RH SetPoint  A * TAirInlet  B (Eq. 658.1)

Where “A” is the relative humidity set point multiplier (parameter 6) and “B” is the relative humidity
set point constant (parameter 5). For safety considerations, a high limit cut-out is included with
this controller. Regardless of the dead band conditions, the control function will be set to zero if
the high limit condition is exceeded.

The overall control strategy is as follows. If the input control signal was ON at the previous time
step (in other words humidification was being called for at the last time) then the signal remains
ON as long as the difference between the relative humidity set point and the zone relative
humidity is greater than the lower relative humidity dead band. Otherwise, the control signal
switches OFF.

If the input control signal was OFF at previous time step, then the signal switches ON if the
difference between the relative humidity set point and the zone relative humidity is greater than
the upper relative humidity dead band. Otherwise, the control signal stays OFF.

3–8
TessLibs 17 – Mathematical Reference

As stated previously, the signal switches OFF regardless of the dead band conditions if the high
limit cutout is activated. The control strategy is depicted graphically in Error! Reference source
ot found..

Figure 3-1: Humidistat Control Strategy

When the difference between the relative humidity set point and the zone relative humidity nears
the upper or lower dead band in the normal mode of operation, the control signal may sometimes
oscillate between ON and OFF for successive iterations at a given time step. This happens
because the relative humidity set point and the relative humidity of the zone change slightly at
each iteration, alternately satisfying and not satisfying the conditions for switching the controller.
The value of parameter 1 in this model is the number of oscillations of the control signal that are
permitted in the time step before the component “sticks” the output signal at one value so that the
calculations at this time step may be solved. It is recommended that the value of this first
parameter be set to an odd number to avoid biasing short-term results.
The problem of control strategies, controller sticking, and hysteresis in simulation is discussed in
section 4.1 in the Mathematical Reference in the TRNSYS documentation set.

An example with the Type658 component model is included in the following location.
“.\Tess Models\Examples\Controllers Library\Type658.tpf”

3.1.3. References
[1] Beckman, W.A., J.W. Thornton,, S. Long, and B.D. Wood, “Control Problems in Solar
Domestic Hot Water Systems”, Proceedings of the American Solar Energy Society, Solar 93
Conference, Washington D.C., 1993
[2] Duffie, J.A. and W.A. Beckman, Solar Engineering of Thermal Processes, Wiley Interscience,
New York, 1980

3–9
TESSLibs 17 – Mathematical Reference

3.2. Type 661: Delayed Output Device


This component models a "sticky" controller where the outputs are set to the input values from a
user-defined previous time step. For example, the user could decide to have the outputs to
another component be based on the zone temperatures from the previous hour or even from the
previous day.

3.2.1. Mathematical Description


Physical systems have time delays and non idealities inherent in them that are often not included
in their simulation model representations. For example, a thermostat does not turn on a furnace
immediately upon sensing a temperature below its set point. It has an internal time constant and
perhaps even some control logic that causes there to be a few seconds delay before the furnace
is activated. As a second example, there is a time delay between energy being added to a real
room and a thermostat sensing the temperature increase; air convection, relative location of the
thermostat and heat source and other factors act to create the time delay. Since these effects are
beyond the input complexity level of most models, whether they are rooms and thermostats or
other system components, the end result in simulation is a less stable system than in reality. The
addition of a sticky controller (delayed input device) can build back these non idealities and
significantly increase the stability of a control strategy.
As parameters, Type661 takes the time delay and initial value for as many inputs as are desired.
By default the component is able to store up to 50 inputs, each for as much as 25 time steps.
These defaults may be changed by modifying and recompiling the Fortran source code. The initial
value of each input is maintained until the appropriate time step for output is reached. At that
point, the input value is released. The figure below graphically shows the input and output for a
component that is set up to store a single input value for 5 time steps.

Figure 3-2: Input Values Held for 5 Timesteps


An example with the Type661 component model is included in the following location.
“.\Tess Models\Examples\Controllers Library\Controls Examples 1.tpf”

3–10
TessLibs 17 – Mathematical Reference

3.3. Type 698: Five Stage Room Thermostat for n


Temperatures
This ON/OFF differential device models a five stage room thermostat which outputs five control
signals that can be used to control an HVAC system having a three stage heating source and a
two stage cooling source. This version of the model is designed to allow the user to specify
multiple temperatures (up to 25) to watch with the same set of set points. The controller contains
hysteresis effects and is equipped with a parameter that allows the user to set the number of
controller oscillations permitted within a single time step before the output values “stick.”

3.3.1. Mathematical Reference


Very often, controllers pose difficulties in simulations because in defining a mathematical model
of a piece of equipment, simplifying assumptions are inevitably made. These simplifying
assumptions often disregard physical realities of the system components in order that they might
actually be solvable. The side effect is that some of the component’s robustness or insensitivity to
input changes disappears. Take the example of modeling a room in a building that is equipped
with a thermostat and a heating device. The common way of modeling such a system would be
for the thermostat to look at the difference between the room temperature and a set point
temperature. If the room temperature is below the set point temperature, the heating device is
turned on and energy is added to the space. The room model then recalculates its air
temperature based on the new information about the addition of energy to the space. The
thermostat then senses that the air temperature is higher and recalculates its decision and so on.
Often ignored is the fact that the heater is placed within the room and that it does not add energy
evenly to the space – it heats up the air in its immediate surroundings. Convection within the
space develops and there is a time lag between when the heater begins adding energy to the
space and when the air in the space is uniformly warmer enough that the thermostat would
register a new temperature. While room models that perform convection calculations no doubt
exist, they are often more detailed than is needed for the purposes of building energy simulations.
In an effort to slow down the reaction time of simulated systems, it is often necessary to add
“stickiness” to controller components. In the case of this model and of many other controllers in
TRNSYS, the stickiness comes in the form of a parameter that controls how many times a
controller may change states within the iterations of a single time step before its newly calculated
value sticks to one setting or another. As soon as the controller sticks, the system ought to get
out of whatever iterative process it is in and converge upon a solution. Very often an odd number
is chosen for the number of allowable state changes (NSTK) so that the controller makes altering
decisions, turning equipment ON and OFF in such a way that the system moves away from its
non convergent state. The second parameter in Type698 (“# of oscillations permitted”) is the
NSTK value that will be used throughout the simulation. If the controller was stuck for more than
10 % of the time steps in a given simulation, the actual percentage of stuck time steps will be
reported to the TRNSYS list and simulation log files.

Multiple Stage Heating and Cooling


Type698 is designed to control up to three stages of heating equipment and two stages of cooling
equipment. A stage might consist of a particular power setting on a furnace, or might consist of an
entirely unique piece of equipment. For example, some furnaces are designed with a low and
high burner setting. If the monitored temperature falls to a certain point, the low burner and fan
come on. If the temperature continues to fall past a second set point, the furnace will switch over
to high burner and fan speed, adding more energy to the space. Such a furnace would be
referred to by this model as a two stage heating device. The same furnace could be used in such

3–11
TESSLibs 17 – Mathematical Reference

a way that if even the high burner setting was still not sufficient to bring the zone temperature
back up, an electric resistance heater (completely separate from the furnace) could be brought on
as a third stage heating device. Type698 is able to control up to three stages of heating and two
stages of cooling. Thus the user must specify three heating set points and two cooling set points
as inputs (since they may vary with time). Type698 checks to insure that the set point
temperature are all realistic. That is to say that the second stage cooling set point much be higher
than the first stage cooling set point, which in turn must be higher than the first stage heating set
point, which must be higher than the second stage heating set point, which must be higher than
the third stage heating set point temperature. The relative placement of the various set points is
shown graphically on a temperature scale in Error! Reference source not found..

Figure 3-3: Set Point Definition

If the zone temperature goes above the stage two cooling set point temperature, it may be
desirable for both the equipment associated with stage two and the equipment associated with
stage 1 cooling to be ON simultaneously. Alternatively, it may be desirable for the stage 1 cooling
equipment to shut OFF and for only the stage two equipment to be running. Similarly for heating it
may be desirable for stage 1 heating equipment to shut off in stage 2 but to come back on in
stage 3. To this end, Type698 requires the user to specify a series of parameter values to
indicate exactly when a stage may be enabled and when it should be disabled. The following
table summarizes the parameters, their values and the corresponding equipment enabling.

Table 1: Controller Stage Enabling


PARAMETER PARAMETER INTERPRETATION
NUMBER VALUE
3 0 Stage 1 Heating will be DISABLED when Stage 2 Heating is ON
3 1 Stage 1 Heating will be ENABLED when Stage 2 Heating is ON
4 0 Stage 2 Heating will be DISABLED when Stage 3 Heating is ON
4 1 Stage 2 Heating will be ENABLED when Stage 3 Heating is ON
5 0 Stage 1 Heating will be DISABLED when Stage 3 Heating is ON
5 1 Stage 1 Heating will be ENABLED when Stage 3 Heating is ON
6 0 Stage 1 Cooling will be DISABLED when Stage 2 Cooling is ON
6 1 Stage 1 Cooling will be ENABLED when Stage 2 Cooling is ON

3–12
TessLibs 17 – Mathematical Reference

Dead Bands and Hysteresis


Often times, controllers are designed with dead bands to prevent them from turning equipment
ON and OFF in fast succession when the monitoring temperature and set point temperature are
close to one another. Dead bands essentially replace a set point temperature with a bracketed
range of set point temperatures. In heating mode, equipment would remain OFF until the
monitored temperature had fallen to the specified set point minus the lower dead band
temperature difference. Once ON, the equipment would remain ON until the monitored
temperature exceeds the specified set point temperature plus the upper dead band. In some
controllers, both upper and lower dead bands are specified. Type698 simply centers the specified
heating and cooling dead band temperature differences on each set point. A heating set point
temperature and its dead band temperature difference are shown graphically in Error! Reference
ource not found..

Figure 3-4: Type698 Dead Band Temperature Difference

Component Operation
At any given iteration, Type698 determines the appropriate settings of up to 25 controllers, all of
which use the same set points and stage enabling scheme but which may each be monitoring a
different temperature. The value of 25 is a soft limit that may be increased as appropriate by
recompiling Type698 and relinking it into a DLL. For more information on this operation please
refer to the main TRNSYS documentation. Each of the controllers is checked to note whether it
has changed states more than the allowable number of times. If so, the state is stuck for all
remaining iterations in the time step and will only be unstuck once a new time step has started. At
the end of each iteration’s calculations, the state of each controller is stored for comparison
during the following iteration.

Example
Type698 is used in an example that can be found in:
“.\Tess Models\Examples\Controllers Library\Controls Example 1.tpf”

3–13
TESSLibs 17 – Mathematical Reference

3.4. Type 911: Differential Controller with Lockouts


This controller is almost identical in nature to Type 2. It generates a control function  that can
have values of 0 or 1. The value of  is chosen as a function of the difference between upper and
lower temperatures, TH and TL, compared with two dead band temperature differences, TH and
TL. The new value of  is dependent on whether i = 0 or 1. This controller differs from Type 2 in
that it contains lockouts; once the controller turns ON, it must stay ON until a user specified
amount of time has passed. Likewise, once the controller turns OFF, it stays OFF until a user
specified amount of time has passed. The controller is normally used with connected to i giving
a hysteresis effect. For safety considerations, a high limit cut-out is included. Regardless of the
dead band conditions or the lockout time, the control function will be set to zero if the high limit
condition is exceeded. Note that this controller is not restricted to sensing temperatures, even
though temperature notation is used throughout the documentation.

3.4.1. Nomenclature

T H [C] * Upper dead band temperature difference.

T L [C] * Lower dead band temperature difference.

TH [C] * Upper input temperature.

TIN [C] * Temperature for high-limit cut out monitoring.

TL [C] * Lower input temperature.

TMAX [C] * Maximum input temperature.

 [0/1] Output control function.

i [0/1] Input control function.

*NOTE: While temperature notation is used, the model can be used to sense and make control decisions
based on any variable (flow rate, solar radiation, power, etc.)

3.4.2. Mathematical Description


Mathematically, the control function is expressed as follows:

If the controller was previously ON

If i = 1 and TL  (TH - TL), o = 1 (Eq. 911.1)

If  = 1 and TL > (TH - TL), o = 0 (Eq. 911.2)

3–14
TessLibs 17 – Mathematical Reference

If the controller was previously OFF

If i = 0 and TH  (TH - TL), o = 1 (Eq. 911.3)

If i = 0 and TH > (TH - TL), o = 0 (Eq. 911.4)

However, two caveats apply. First, once the controller changes states (turns ON when it was
previously OFF or turns OFF when it was previously ON) then a lockout time applies. In other
words when the controller turns ON, it must stay ON for at least as long as the user-specified
minimum ON time. Likewise when the controller turns OFF, it must stay OFF for at least as long
as the user-specified minimum OFF time. Such lockouts are often used in control systems to
avoid controller “chattering.” One very common application is in solar domestic water heating
systems when the sun is just coming up; as the sun comes up, liquid in the collector itself heats
up and signals to the controller that the pump should be turned ON. As soon as liquid starts to
flow, the warm stagnant liquid in the collector is replaced with liquid that has cooled off during the
night and the controller signals the pump to switch OFF. The cycle repeats, causing the pump to
chatter until there is enough solar radiation to consistently heat the liquid in the collector loop. The
second caveat is that the control function is set to zero, regardless of the upper and lower dead
band conditions and regardless of whether the lockout time has passed, if T IN > TMAX. This
situation is often encountered in domestic hot water systems where the pump is not allowed to
run if the tank temperature is above some prescribed limit.

The controller function is shown graphically as follows.

 =1
i
1

o
 =0
i
0

 (T - T ) 
L H L H
Figure 3-5: Controller Function
Example
Type911 is used in both heating and cooling in an example that can be found in:
“.\Tess Models\Examples\Controllers Library\Controls Example 2.tpf”

3–15
TESSLibs 17 – Mathematical Reference

3.5. Type 953: Tempering Valve Controller


Type953 models a tempering valve controller that can operate in either heating or cooling mode.
The Type takes the source temperature, the tempering temperature and a set point temperature.
It determines the fraction of fluid that should go through the source and the fraction of fluid that
should bypass the source and be used to temper the source outflow.

3.5.1. Nomenclature
TRe turn [ºC] The temperature of the return or mains fluid used to temper the source fluid.

TSet [ºC] The setpoint temperature of the tempered liquid after mixing.

TSource [ºC] The temperature of the heat source fluid.

 Source [ºC] The fraction of the return fluid that should be sent to the heat source.

3.5.2. Mathematical Description


In many situations, fluid is to be stored at one temperature but is to be provided at a temperature
that is not to exceed a different desired set point. For example, water may be stored in a water
heater at 70C but in order not to cause scalding, may be delivered at a temperature not to exceed
50C. Often the way this temperature reduction is accomplished is to divert some of the liquid
returning to the water heater around the heating element and then to mix it back in downstream of
the heater. The figure below shows a simple schematic representation of such a system.

Figure 3-6: Tempering Valve System Schematic


The above describes a heating application in which hot liquid is desired but cannot exceed a
maximum set point temperature. The Type953 tempering valve controller can operate in such a
heating mode but can also be used in a cooling application where the cold liquid is to be provided
at a temperature that is not to fall below a minimum set point. Type953 takes the tempered fluid
set point temperature (the temperature that is desired), the source temperature (the temperature
of either the untempered hot or cold fluid), and the return temperature (the temperature of fluid
that is used to temper and that replaces fluid drawn out of the source). It also takes the valve
mode as an input (mode 1 is used for heating applications and mode 2 is used for cooling

3–16
TessLibs 17 – Mathematical Reference

applications). This means that the valve can change from heating to cooling mode during a
simulation; a useful feature for hydronic heating and cooling systems that make use of the same
piping network throughout the entire year.
In heating mode, the fraction of fluid that goes to the source is given by:

Treturn  Tset
 source  Eq 3.5.2-1
Treturn  Tsource

In cooling mode, the fraction of fluid that goes to the source is given by:

Tset  Treturn
 source  Eq 3.5.2-2
Tsource  Treturn

Type953 keeps track of whether the tempering valve has changed the fraction of fluid that should
go to the source from one TRNSYS iteration to the next (within a given time step). Type953’s sole
parameter allows the user to control how many changes in valve state are allowed before the
valve sticks to its last-calculated source fraction. The Type also keeps track of and reports the
number of simulation time steps during which the valve had to stick to its decision in order to
prevent excessive iteration. The report at the end is counted as a warning but should not worry
the user unless the valve was stuck at an inordinately large fraction of the simulation time steps.

The example, “.\Tess Models\Examples\Controllers Library\Tempering Valve Example.tpf”


features the TRNSYS SDHW example using Type953.

3–17
TESSLibs 17 – Mathematical Reference

3.6. Type 970: N-Stage Differential Heating Controller


with Multiple Setpoints, Multiple Deadbands and
Time Delay
Type970 is an n-stage heating thermostat which outputs n on/off control functions that can be
used to control a system having n levels of heating alternatives. Although temperature notation is
used, this controller can be based on any consistent set of input variable types. This model is a
replacement for Type 671 and allows the user to have different deadbands for each setpoint, and
this component also has on and off time delays.

3.6.1. Mathematical Description

Dead Bands and Hysteresis


Often times, controllers are designed with dead bands to prevent them from turning equipment
ON and OFF in fast succession when the monitoring temperature and set point temperature are
close to one another. Dead bands essentially replace a set point temperature with a bracketed
range of set point temperatures. In heating mode, equipment would remain OFF until the
monitored temperature had fallen to the specified set point minus the lower dead band
temperature difference. Once ON, the equipment would remain ON until the monitored
temperature exceeds the specified set point temperature plus the upper dead band. In some
controllers, both upper and lower dead bands are specified. Type970 simply centers the specified
heating and cooling dead band temperature differences on each set point. A heating set point
temperature and its dead band temperature difference are shown graphically in the following
figure.

Figure 3-7: Type970 Dead Band Temperature Difference


Figure 7: Type970 Dead Band Temperature Difference

Multiple Stage Heating

3–18
TessLibs 17 – Mathematical Reference

Type970 is designed to control up to n-stages of heating equipment. A stage might consist of a


particular power setting on a furnace, or might consist of an entirely unique piece of equipment.
For example, some furnaces are designed with a low and high burner setting. If the monitored
temperature falls to a certain point, the low burner and fan come on. If the temperature continues
to fall past a second set point, the furnace will switch over to high burner and fan speed, adding
more energy to the space. Such a furnace would be referred to by this model as a two stage
heating device. The same furnace could be used in such a way that if even the high burner
setting was still not sufficient to bring the zone temperature back up, an electric resistance heater
(completely separate from the furnace) could be brought on as a third stage heating device.
Type970 is able to control up to n-stages of heating. Thus, the user must specify n heating set
points, up to 25, as inputs (since they may vary with time). Type970 checks to insure that the set
point temperatures are all realistic. That is to say that the second stage heating set point must be
lower than the first stage heating set point and the third stage heating set point must be lower
than both the first and second stage set points. This trend will be continued for all 25 levels of
heating set points.

Figure 3-8: Set point definition for the Type970

Example
Type970 is used in both heating and cooling in an example that can be found in:
“.\Tess Models\Examples\Controllers Library\Controls Example 2.tpf”

3–19
TESSLibs 17 – Mathematical Reference

3.7. Type 971: N-Stage Differential Cooling Controller


with Multiple Setpoints, Multiple Deadbands and
Time Delay
Typ971 is an n-stage cooling thermostat which outputs n on/off control functions that can be used
to control a system having n levels of cooling alternatives. Although temperature notation is used,
this controller can be based on any consistent set of input variable types. This model is a
replacement for Type 672 and allows the user to have different deadbands for each setpoint, and
this component also has on and off time delays.

3.7.1. Mathematical Description

Dead Bands and Hysteresis


Often times, controllers are designed with dead bands to prevent them from turning equipment
ON and OFF in fast succession when the monitoring temperature and set point temperature are
close to one another. Dead bands essentially replace a set point temperature with a bracketed
range of set point temperatures. In heating mode, equipment would remain OFF until the
monitored temperature had fallen to the specified set point minus the lower dead band
temperature difference. Once ON, the equipment would remain ON until the monitored
temperature exceeds the specified set point temperature plus the upper dead band. In some
controllers, both upper and lower dead bands are specified. Type698 simply centers the specified
heating and cooling dead band temperature differences on each set point. A heating set point
temperature and its dead band temperature difference are shown graphically in Figure 4.

Figure 3-9: Type971 Dead Band Temperature Difference


Multiple Stage Cooling
Type971 is designed to control up to n-stages of cooling equipment. A stage might consist of a
particular power setting on an air conditioner, or might consist of an entirely unique piece of
equipment. For example, some air conditioner compressors are designed with a low and high
setting. If the monitored temperature increases to a certain point, the low compressor setting and

3–20
TessLibs 17 – Mathematical Reference

fan come on. If the temperature continues to increase past a second set point, the air conditioner
will switch over to high compressor setting and fan speed, removing more energy from the space.
Such an air conditioner would be referred to by this model as a two stage cooling device. The
same air conditioner could be used in such a way that if even the high cooling setting was still not
sufficient to bring the zone temperature back down, an auxiliary cooling device (completely
separate from the furnace) could be brought on as a third stage heating device. Type971 is able
to control up to n-stages of cooling. Thus, the user must specify n-cooling set points, up to 25, as
inputs (since they may vary with time). Type971 checks to insure that the set point temperatures
are all realistic. That is to say that the second stage cooling set point must be higher than the first
stage cooling set point. The third stage cooling set point must be higher than both the first and
second stage set points. This trend will be continued for all 25 levels of cooling set points.

Figure 3-10: Set point definition for Type971

Example
Type971 is used in both heating and cooling in an example that can be found in:
“.\Tess Models\Examples\Controllers Library\Controls Example 2.tpf”

3–21
TESSLibs 17 – Mathematical Reference

3.8. Type 973: N-Stage Differential Controller with 1


Setpoint, 1 Deadband and Time Delay
Type973 models an n-stage differential controller with the parameter option to be in either heating
mode or cooling mode. There is one setpoint with one deadband for this controller. This controller
has time delay for the subsequent stages to turn on and to turn off.

3.8.1. Mathematical Description


An n-stage differential controller is modeled to output n on/off control functions that can be used
to control a heating or cooling (Parameter 6) system having a n-stage source. The model turns
on the first stage when the temperature falls below (or rises above in cooling mode) the setpoint
minus (plus) one-half of the deadband temperature difference and remains on until the
temperature rises above (falls below) the setpoint plus (minus) one half of the deadband
temperature difference. The controller will turn on the second ,and subsequent stages, after a
user-specified period (Parameter 3) of time has elapsed and the temperature has not yet reached
the turn off temperature (setpoint plus (minus) one half of the deadband temperature difference).
Once the turn off temperature has been reached, stages will be turned off one at a time after the
user specified delay time(Parameter 4) has been passed.
The following figure is a graphical representation of the Type973 with four heating stages.

Figure 3-11: Type973 Control Signals

3–22
TessLibs 17 – Mathematical Reference

The 1st stage heating turns "on" or to logic value 1 when temperatures falls below 15 C and 1st
stage "off" when temperature rises to 25 C. The example of the Type973 represented by this
figure turns subsequent stages "on" at 5-hour increments if the temperature remains below the
set point temperature - dead band temperature. The heating stages will turn "off" after 2 hour
increments if the temperature remains above the 20 C set point temperature.

Example
Type973 can be found in:
“.\Tess Models\Examples\Controllers Library\Controls Example 2.tpf”

3–23
TESSLibs 17 – Mathematical Reference

3.9. Type 974: N-Stage Differential Cooling Controller


with 1 Setpoint, 2 Deadbands, Minimum Run Time
and Time Delay
Type974 models an n-stage differential controller with the parameter option to be in either heating
mode or cooling mode. There is one setpoint with a “turn on” deadband and a “turn off” deadband
for this controller; this is how this controller differs from the Type973 controller. This controller has
time delay for the subsequent stages to turn on and to turn off.

3.9.1. Mathematical Description


An N-stage differential controller is modeled to output N ON/OFF control functions that can be
used to control a heating or cooling system having an N-stage source. The model turns on the
first stage when the temperature falls below (or rises above in cooling mode) the setpoint minus
(plus) the turn-on deadband temperature difference. The controller will turn on and off stages in
an attempt to maintain the setpoint temperature. Stages are turned on when the temperatures
remains below (above) the setpoint temperature for a user-specified period of time. Stages are
turned off when the temperature rises above (falls below) the setpoint for a user-specified period
of time. The controller will immediately turn off all the stages if the temperature rises above (falls
below) the setpoint plus (minus) the turn-off deadband temperature difference.

Figure 3-12: Type974 Control Signals

3–24
TessLibs 17 – Mathematical Reference

The above figure is a graphical representation of the Type974 with four heating stages. The 1st
stage heating turns "on" or to logic value 1 when temperatures falls below 15 C and 1st stage
"off" when temperature rises to 25 C. The example of the Type974 represented by this figure
turns subsequent stages "on" at 5-hour increments if the temperature remains below the set point
temperature - dead band temperature. The heating stages will turn "off" after 2 hour increments if
the temperature remains above the 20 C set point temperature. The control sequence will not be
initiated until stage 3 is reached, which is set by Input 3.

Example
Type974 is used in an example that can be found in:
“.\Tess Models\Examples\Controllers Library\Controls Example 2.tpf”

3–25
TESSLibs 17 – Mathematical Reference

3.10. Type 980: On/Off Time Calculator


This component watches a control signal and calculates the current "on" and "off" times of the
signal.

3.10.1. Mathematical Reference

After convergence of the TRNSYS simulation, if the input control signal is greater than 0.5 then
the "on time" output control signal is incremented by the timestep and the "off- time" signal is set
to zero. If the input control signal is zero, the "on time" control signal is set to zero and the "off
time" control signal is incremented by the timestep. Thus, this component calculates and outputs
the time current time within the temperature (or any other variable) range and the current time
that the temperature is outside the range.

Figure 3-13:
The above figure is a graphic representation of the Type980 calculating the running time that the
temperature is within the bounds of 15 C to 25 C (good control), and the running time that the
temperature is < 15 C or > 25 C (poor control). The Type980 component watches an input control

3–26
TessLibs 17 – Mathematical Reference

signal, up to n watched inputs, and calculates the duration which the signal is within or outside
the specified bounds.

Example
Type980 is used in an example that can be found in:
“.\Tess Models\Examples\Controllers Library\Controls Example 2.tpf”

3–27
TESSLibs 17 – Mathematical Reference

3.11. Type 1233: Thermostatic Control with Specified


Run-Time
The on/off controller generates a control function which can have a value of 1 (on) or 0 (off). The
value of the control signal is chosen as a function of the temperature input and the temperature
setpoint input.

For safety considerations, a high/low limit cut-out is included with this controller. Regardless of
the current conditions, the control function will be set to zero if the high limit condition is exceeded
in heating mode or if the low limit condition has been tripped in cooling mode.

A minimum run-time period and a minimum reset time period to better replicate controllers found
in many HVAC and solar applications has been implemented for this controller. We've also
added a lockout input that sets the output control function to zero whenever this lockout signal is
greater than 0.5. This feature can be used to disable the controller during certain times of the
day, certain times of year, or during periods where a given criteria is met.

Thus, this subroutine models a simple "Run-Time" controller that will turn "on" when a
temperatures falls below a user-specified setpoint temperature and stay on until the run-time
period has been elapsed or until the temperature rises above the safety-limit temperature.The
device can only come back "on" when the temperature falls below the setpoint temperature AND
enough time has passed to clear the minimum "off-time" condition.

NOTE: This control strategy can only be used with solver 0 (Successive substitution).

Example
Type1233 is used in an example that can be found in:
“.\Tess Models\Examples\Controllers Library\Controls Example 3.tpf”

3–28
TessLibs 17 – Mathematical Reference

3.12. Type 1250: Outside Air Reset Controller


This component creates two outputs; a temperature dependent setpoint and an on/off signal. The
user provides the mode (heating or cooling) and two pairs of ambient/setpoint combinations.

3.12.1. Mathematical Description

Heating Mode:
For example, the user wishes to provide heated water to a radiant floor system where the
temperature of the water is 40 C at an ambient temperature of -20 C but only 30 C at an ambient
temperature of 10 C.

The parameters of this model would then be:


1 -20 40 10 30

Using the nomenclature of this model:


Mode = 1
T_Amb_L = -20
T_Set_L = 40
T_Amb_H = 10
T_Set_H = 30

It's important to note that at ambient temperatures less than T_Amb_L, the setpoint remains at
the T_Set_L condition and the operating signal is set to 1 (ON). At ambient temperatures above
T_Amb_H, the operating signal is set to 0 (off) and the setpoint is set to the T_Set_H condition.

Cooling Mode:
For example, the user wishes to provide chilled water to a cooling coil where the temperature of
the water should be 10 C at an ambient temperature of 35 C but has to be only 15 C at an
ambient temperature of 20 C.

The parameters of this model would then be:


2 20 15 35 10

Using the nomenclature of this model:


Mode = 2
T_Amb_L = 20
T_Set_L = 15

3–29
TESSLibs 17 – Mathematical Reference

T_Amb_H = 35
T_Set_H = 10

It is important to note that at ambient temperatures greater than T_Amb_H, the setpoint remains
at the T_Set_H condition and the operating signal is set to 1 (ON). At ambient temperatures
below T_Amb_L, the operating signal is set to 0 (off) and the setpoint is set to the T_Set_L
condition.

Example
Type1250 is used in an example that can be found in:
“.\Tess Models\Examples\Controllers Library\Controls Example 3.tpf”

3–30
TessLibs 17 – Mathematical Reference

3.13. Type 1502: N-Stage Heating Aquastat or Simple


Thermostat
An N-Stage heating aquastat/simple thermostat is modeled to output N ON/OFF control functions
that can be used to control a fluid cooling system having up to an N stage heating source(s). The
component was Type502 in previous TESS Libraries versions, but it has been updated and
allocated a new Type number.

3.13.1. Nomenclature

T’Hn [ºC] New heating set point temperature for stage n.

THn [ºC] Old heating set point temperature for stage n.

n [0 or 1] Heating control signal at the previous time step for stage n.

DTdb [ºC] Dead band temperature difference for hysteresis effects.

SetBack [0 or 1] Set back control signal.

DTSe Back [ºC] Dead band temperature difference for set up effect .

3.13.2. Mathematical Description


This controller commands first stage heating at cool fluid temperatures, second stage heating at
cooler fluid temperatures, and N-stage heating at even lower fluid temperatures levels. The user
has the option to apply stage exceptions such as to disable first stage heating during second
stage and third stage heating, and to disable second stage heating during third stage heating.
Please see the “More” button for Parameter 4 to implement this.

In many heating applications, a desired fluid temperature may depend on the time of day or the
day of the week. This variation of the heating set point temperatures are modeled here using an
optional set back control function and a set back temperature difference.

As with many controller components in TRNSYS, instabilities may occur when system
temperatures are at or very near to their set point values. Again as with other controllers, these
instabilities can be reduced by adding hysteresis (dead bands) to the controller such that the
controller signal does not change until the system temperature has reached its set point plus (or
minus) a small delta temperature. Hysteresis effects can be included in the model by supplying
the optional dead band temperature difference DTdb. A single value of DTdb, is applied to all
three output control functions.

3–31
TESSLibs 17 – Mathematical Reference

PARAMETER 2, NSTK, sets the number of oscillations permitted within a time step before the
output state of the controller is stuck. It is recommended that NSTK be set to a value of 3 or 5.
Odd values of NSTK ensure that if controller sticking becomes a problem, the controller will
change states between time steps and that the system will move toward a more stable state. For
a more detailed discussion of controller stability problems, see the introduction to the Controllers
section (chapter 4.1) of the TRNSYS documentation set.

The cooling ON/OFF temperatures are set as follows:

TH' 1  TH 1   1 DTdb   SetBack DTSetBack (Eq. 1502.1)

TH' 2  TH 2   2 DTdb   SetBack DTSetBack (Eq. 1502.2)

TH' 3  TH 3   3 DTdb   SetBack DTSetBack (Eq. 1502.3)

At each iteration, the current values of the watch temperatures are compared to the current
values of the heating ON/OFF temperatures as computed using equations 1502.1 through
1502.3. The controller sets the value of the appropriate stage’s output control signal to 1 if the
current watch temperature is below the corresponding heating ON/OFF temperature.

In this model, dead band temperature differences for both hysteresis and temperature set back
are centered on the set point temperature.

If hysteresis effects are not used, then the dead band DTdb is set to zero. If the set back option is
not used, both SetBack and DTSetBack are set to zero.

NOTE: Care should be taken when choosing dead bands and set points. Dead bands that are
greater than the temperature difference between the set points will cause the controller to have
convergence problems.

Example
Type1502 is used in an example that can be found in:
“ . \Tess Models\Examples\Controllers Library\Controls Example 1.tpf”

3–32
TessLibs 17 – Mathematical Reference

3.14. Type 1503: N-Stage Cooling Aquastat or Simple


Thermostat
An N-Stage cooling aquastat/simple thermostat is modeled to output N ON/OFF control functions
that can be used to control a fluid cooling system having up to an N stage heating source(s). The
component was Type503 in previous TESS Libraries versions, but it has been updated and
allocated a new Type number.

3.14.1. Nomenclature

T’Cn [ºC] New cooling set point temperature for stage n.

TCn [ºC] Old cooling set point temperature for stage n.

n [0 or 1] Cooling control signal at the previous time step for stage n.

DTdb [ºC] Dead band temperature difference for hysteresis effects.

SetUp [0 or 1] Set up control signal.

DTSetUp [ºC] Dead band temperature difference for set up effects.

3.14.2. Mathematical Description


This controller commands first stage cooling at warm fluid temperatures, second stage cooling at
warmer fluid temperatures, and N-stage cooling at even higher fluid temperatures levels. The
user has the option to apply stage exceptions such as to disable first stage cooling during second
stage and third stage cooling, and to disable second stage cooling during third stage cooling.
Please see the “More” button for Parameter 4 to implement this.

In many cooling applications, a desired fluid temperature may depend on the time of day or the
day of the week. This variation of the cooling set point temperatures are modeled here using an
optional set up control function and a set up temperature difference.

As with many controller components in TRNSYS, instabilities may occur when system
temperatures are at or very near to their set point values. Again as with other controllers, these
instabilities can be reduced by adding hysteresis (dead bands) to the controller such that the
controller signal does not change until the system temperature has reached its set point plus (or
minus) a small delta temperature. Hysteresis effects can be included in the model by supplying
the optional dead band temperature difference DTdb. A single value of DTdb, is applied to all
three output control functions.

PARAMETER 1, NSTK, sets the number of oscillations permitted within a time step before the
output state of the controller is stuck. It is recommended that NSTK be set to a value of 3 or 5.
Odd values of NSTK ensure that if controller sticking becomes a problem, the controller will
change states between time steps and that the system will move toward a more stable state. For

3–33
TESSLibs 17 – Mathematical Reference

a more detailed discussion of controller stability problems, see the introduction to the Controllers
section (chapter 4.4) of the TRNSYS documentation set.

The cooling ON/OFF temperatures are set as follows:

TC' 1  TC1   1 DTdb   SetUp DTSetUp (Eq. 1503.1)

TC' 2  TC 2   2 DTdb   SetUp DTSetUp (Eq. 1503.2)

TC' 3  TC 3   3 DTdb   SetUp DTSetUp (Eq. 1503.3)

At each iteration, the current values of the watch temperatures are compared to the current
values of the cooling ON/OFF temperatures as computed using equations 503.1 through 503.3.
The controller sets the value of the appropriate stage’s output control signal to 1 if the current
watch temperature is above the corresponding cooling ON/OFF temperature.

In this model, dead band temperature differences for both hysteresis and temperature set up are
centered on the set point temperature.

If hysteresis effects are not used, then the dead band DTdb is set to zero. If the set up option is
not used, both SetUp and DTSetUp are set to zero.

NOTE: Care should be taken when choosing dead bands and set points. Dead bands that are
greater than the temperature difference between the set points will cause the controller to have
convergence problems.
Example
Type1503 is used in an example that can be found in:
“ . \Tess Models\Examples\Controllers Library\Controls Example 1.tpf”

3–34
TessLibs 17 – Mathematical Reference

3.15. Type 1669: Proportional Controller


This component returns a control signal between 0 and 1 that is related to the current value of an
input as compared to a user defined minimum and maximum value. The component was built
from the TESS Type669 of the previous version and improved to have a maximum rate of
increase and a minimum rate of increase for the control signal.

3.15.1. Mathematical Description


Type1669 takes the values of up to 100 input signals. Those signals are compared to the current
values of upper and lower set points. If an input value is equal to or greater than the upper set
point, Type1669 will output a value of 1. If the input value is equal to or less than the lower set
point value, Type1669 will report a control signal value of 0. The control scheme is described in
the figure below.

Figure 1669: Proportional Control Diagram

Mathematically, the simple proportion of the input to the values is described by Equation 1669.1.
This was the primary function of the previous Type669 component

   Value  LowerSetPt   
  max  0,  min 1,   (Eq. 1669.1)
  UpperSetpt  LowerSetPt   
 

Oppose to the former Type669, Type1669 now has the maximum rate of increase per hour and
the maximum rate of decrease per hour as parameters. When both of these parameters are equal
to 1, the above equation still applies. However, when those parameters are not equal to 1 (there
is a maximum rate of increase per hour or maximum rate of decrease per hour for the controller),
the following applies. When the control signal value is more than the previous value, the following
is the control signal.

3–35
TESSLibs 17 – Mathematical Reference

If 𝛾𝑖−1 < 𝛾𝑖 ,

γ = min(𝛾𝑖 , 𝛾𝑖−1 + 𝑀𝑎𝑥𝑅𝑎𝑡𝑒𝐼𝑛𝑐𝑟𝑒𝑎𝑠𝑒 ∗ 𝑇𝑖𝑚𝑒𝑠𝑡𝑒𝑝) (Eq. 1669.2)

When the control signal value is less than the previous control signal, the following is the control
signal.

If 𝛾𝑖−1 > 𝛾𝑖 ,

γ = min(𝛾𝑖 , 𝛾𝑖−1 − 𝑀𝑎𝑥𝑅𝑎𝑡𝑒𝐷𝑒𝑐𝑟𝑒𝑎𝑠𝑒 ∗ 𝑇𝑖𝑚𝑒𝑠𝑡𝑒𝑝) (Eq. 1669.3)

When the control signal value is less than the previous control signal, the following is the control
signal.
It will occasionally be desired to implement this component in the opposite conditioning mode (i.e.
heating instead of cooling). The simplest way to implement this is with an EQUATION block in
TRNSYS. Make an input in the EQUATION block; this input will be the output control signal from
Type1669. Next, implement an output equation such as the following.

γ
γHeating = 1 − (Eq. 1669.4)
1

Example
Type1669 is used in an example that can be found in:
“ . \TESS Models\Examples\Controllers Library\ Controls Example 1.tpf”

3–36

You might also like