The present invention controls a room temperature by controlling an
environmental control unit. A total span about a setpoint temperature is
adjusted in accordance with a previous total span and a multiplicative
factor. The multiplicative factor is periodically updated from a desired
cycle time and a previous cycle time. The room temperature may also be
controlled by adjusting a duty cycle for controlling an environmental
control unit. The duty cycle is adjusted based on an error associated
with a previous control cycle and an attenuation factor. A new control
cycle may be started by cutting the previous control cycle or a current
control cycle may be extended if a predetermined condition is detected.
The control mode is selected based on environmental characteristics and
room characteristics. The control mode may include a span control mode
and a duty cycle control mode that is selected from the cycle rate.