| Contents | Index |
| On this page… |
|---|
Changing the Thermostat Setting |
Simulating the model allows you to observe how the thermostat setting and outdoor environment affect the indoor temperature and the cumulative heating cost.
In the demo model window, double-click the Scope block named PlotResults.
The software opens a Scope window that contains two axes with the labels HeatCost and Temperatures.
From the menu, select Simulation > Start.
The software simulates the model. As the simulation runs, the cumulative heating cost appears on the HeatCost graph at the top of the Scope window. The indoor and outdoor temperatures appear on the Temperatures graph as yellow (top) and magenta (bottom) signals, respectively.

One of the most powerful benefits of modeling a system with Simulink is the ability to interactively define the system inputs and observe changes in the behavior of your model. This allows you to quickly evaluate your model and validate the simulation results.
Change the thermostat setting to 68 degrees Fahrenheit and observe how the model responds.
In the Simulink editor window, double-click the Set Point block. The Source Block Parameters dialog box opens.
In the Constant value field, enter 68.

Click OK. The software applies your changes.
To rerun the simulation, select Simulation > Start.
The software simulates the model. In the Scope window, notice that a lower thermostat setting reduces the cumulative heating cost.

Change the average outdoor temperature to 45 degrees Fahrenheit and observe how the model responds.
In the Simulink editor window, double-click the Avg Outdoor Temp block.
The Source Block Parameters dialog box opens.
In the Constant value field, enter 45.

Click OK. The software applies your changes and closes the dialog box.
To rerun the simulation, select Simulation > Start.
The software simulates the model dynamics. In the Scope window, notice that a colder outdoor temperature increases the cumulative heating cost.

Decrease the temperature variation to see how the model responds.
In the Simulink editor window, double-click the Daily Temp Variation block.
The Source Block Parameters dialog box opens.
In the Amplitude field, enter 5.
Click OK. The software applies your changes and closes the dialog box.
To rerun the simulation, select Simulation > Start.
The software simulates the model. In the Scope window, notice that a more stable outdoor temperature alters the frequency with which the heater operates.

![]() | Understanding a Demo Model | Moving Data Between MATLAB and the Demo Model | ![]() |

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |