The SystemUnderControl is a pool of 720 L of water at some initial temperature that needs to warm up to a reference temperature using heat supplied by the ControlSystem. To characterize the SystemUnderControl, attributes describe the state of the system, and a parametric constraint specifies a mathematical relationship among the input, Q to the SystemUnderControl and its output, deltaT.

This relationship can be modified to work in the discrete time domain. If Q is expressed as a rate, that is, the ControlSystem (the heat source in this model) provides heat at a maximum rate of 19.049 kJ per second, deltaT becomes a rate, that is, temperature change in degC per second. By using an implicit time period of 1 second the constraint between heat and temperature change can be modeled using a statechart, a discrete time domain artifact.
To add a statechart describing the behavior of SystemUnderControl:



In this statechart, a new temperature is calculated each second taking into account the heat applied (if any) and the cooling. The one second timing of the state transition provides an implicit specification of continuous time that simplifies the constraint equation. For example, coolingRate, normally expressed in degC_per_s becomes degC.
To see the statechart in the internal block diagram:
is in the upper right corner of the
s:SystemUnderControl part. Click the statechart symbol to open that
statechart.In the next lesson, you define a constraint and add a parametric diagram.