Skip to Main Content Skip to Search
Product Documentation

Simulating the Demo Model

Running the Simulation

Simulating the sldemo_househeat model allows you to observe how the thermostat setting and outdoor environment affect the indoor temperature and the cumulative heating cost.

  1. In the demo model window, double-click the Scope block named PlotResults. A Scope window opens with two axes labeled HeatCost and Temperatures.

  2. From the menu, select Simulation > Start.

    The software simulates the model dynamics, and as the simulation runs, it displays the results in a Scope window. The cumulative heating cost is drawn on the HeatCost graph while the indoor and outdoor temperatures appear on the Temperatures graph.

Changing the Thermostat Setting

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.

  1. In the Simulink editor window, double-click the Set Point block. The Source Block Parameters dialog box opens.

  2. In the Constant value field, enter 68.

  3. Click OK. The software applies your changes and closes the dialog box.

  4. To rerun the simulation, select Simulation > Start.

    The software simulates the model dynamics. Notice that a lower thermostat setting reduces the cumulative heating cost.

Changing the Average Outdoor Temperature

Change the average outdoor temperature to 45 degrees Fahrenheit and observe how the model responds.

  1. In the Simulink editor window, double-click the Avg Outdoor Temp block. The Source Block Parameters dialog box opens.

  2. In the Constant value field, enter 45.

  3. Click OK. The software applies your changes.

  4. To rerun the simulation, select Simulation > Start.

    The software simulates the model dynamics. Notice that a colder outdoor temperature increases the cumulative heating cost.

Changing the Daily Temperature Variation

Decrease the temperature variation to see how the model responds.

  1. In the Simulink editor window, double-click the Daily Temp Variation block. The Source Block Parameters dialog box opens.

  2. In the Amplitude field, enter 5.

  3. Click OK. The software applies your changes.

  4. To rerun the simulation, select Simulation > Start.

    The software simulates the model dynamics. Notice that a more stable outdoor temperature alters the frequency with which the heater operates.

  


Related Products & Applications

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