A sample
dynamic model of a real device shows how the various modeling constructs fit
together. This is a model of a sears “Weekender” programmable thermostat. This
device controls a furnace and their conditioner according to time dependent
attributes which the owner enters using a pad of buttons.
While running, thermostat operates the furnace or air conditioner to keep
the current temperature equal to the target temperature. The target temperature
is taken from table of program values supplied by the user. The table specifies
target temperature for 8 different time periods, 4 an weekdays and 4 on
weekends, with start times specified by the user. The target temperature is
reset from the table at the beginning of each program period. The user can
override the target temperature for the reminder of the current period or
indefinitely. The user programs the thermostat using a pad of 10 pushing
buttons and 3 switches. The user sees parameters on an alphanumeric display. A
switch illuminates a night light. The thermostat has a temperature sensor
that reads the air temperature. The
thermostat operates power relays for a
furnace and an air conditioner, and an indicator lights up when the furnace and
an air conditioner and an indicator lights up when the furnace or air
conditioner is operating. Each push buttons generates an event every time it is
pushed. We assigned one input event per button.
Temp up raises
target temperature or program temp
Temp down raises
target temperature or program temp
Time fwd advance
clock time or program time.
Time Back retards
clock time of program time
Set clock sets current
time of day.
Set day sets
current day of the weeks.
Run Prgm leaves
setup or program mode and runs the program.
View Prgm enters
program mode to examine and modify program time and program temp settings.
Hold temp holds current target temperature in spite
of the program.
F.C. Button alternates
temperatures display between Fahrenheit and Celsius , each switch supplies a
parameter value chosen from two or three possibilities. We model each switch
as independent concurrent sub diagram
with one state per switch setting.
Although we assign events names to change in state, if is the state of each
switch that is of interest. The switches and their setting are:
Light switch light
alphanumeric display values: light off, light on.
Season switch specifies
which devices the thermostat controls. Values : heat,cool,off
Fan switch specifies
when the ventilation fan operates values : fan on, fan auto
The thermostat controls the furnace, air conditions and fan power relays. We model this controls by activities
“run furnace”,”run air conditioner”, and run “fan” .
No comments:
Post a Comment