Quantcast

Documentation Center

  • Trial Software
  • Product Updates

Simulate the Control System Model

Run 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 sldemo_househeat model window, double-click the Scope block named PlotResults. A Scope window opens with two axes labeled HeatCost and Temperatures.

  2. In the Simulink® Editor, select Simulation > Run.

    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. The indoor and outdoor temperatures appear on the Temperatures graph.

Change 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 sldemo_househeat model window, open the masked Subsystem block (the block icon that displays the text Select Temperature).

  2. In the Subsystem model window, double-click the Set Point block. The Source Block Parameters dialog box opens.

  3. In the Constant value field, enter 68.

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

  5. To rerun the simulation, you can either select Simulation > Run, or from the toolbar, you can use the Run button ( ). The software simulates the model dynamics. Notice that a lower thermostat setting reduces the cumulative heating cost.

Change the Average Outdoor Temperature

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

  1. In the sldemo_househeat model 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. Rerun the simulation.

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

Change the Daily Temperature Variation

Decrease the temperature variation to see how the model responds.

  1. In the sldemo_househeat model 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. Rerun the simulation.

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

Was this topic helpful?