Component 409: Temperature Sensor by HVACSIM+
General Description
Temperature sensors are modeled by a simple first-order differential
equation with a single time constant. The input to the component is modified
using a gain and an offset supplied as parameters, allowing the output to be
treated as a voltage level, a control signal, or a temperature in either
Fahrenheit or Celsius. If a Celsius temperature output is desired, an offset
of zero and a gain of one are used. If a control variable between zero and one
is required for use as a controller input, the offset is the minimum allowable
temperature and the gain is the maximum allowable temperature minus the minimum
temperature.
Nomenclature
Ci - temperature input modified by gain and offset
Co - output signal (e.g. sensed temperature)
Ti - temperature input
Tg - gain
To - offset
DeltaT - time step
Toll - time constant
Mathematical Description
Ci = (Ti - To)/Tg
d(Co)/dt = (Ci - Co)/Toll
If the time constant, Toll, is greater than or equal to one second, the
differential equation is solved outside the subroutine by the MODSIM, the main
HVACSIM+ program, differential equation solver. If Toll is less than one
second, the differential equation is solved within the subroutine:
IF (Toll/DeltaT) < 0.05 OR | Ci - Co- | < 10^(-10) THEN
Co = Ci
ELSE
Co = Ci - (Ci - Co-)*exp(-DeltaT/Toll)
where Co- is the value of Co one time step ago.
Component 409 Configuration
Inputs Description
1 Ti - temperature input
2 Co - temperature sensor output
Outputs Description
1 Co - temperature sensor output
Parameters Description
1 Toll - temperature sensor time constant
2 To - offset
3 Tg - gain
Reference:
1. HVACSIM+ Building Systems and Equipment Simulation Program Reference
Manual (NBSIR 84-2996)
Daniel R. Clark
United States Department of Commerce
National Institute of Standards and Technology
Gaithersburg, Maryland 20899-0001