MATLAB Examples

House Heating System

This example shows how to model a simple house heating system. The model contains a heater, a controller, and a house structure with four radiators and four rooms. Each room exchanges heat with the environment through its exterior walls, roof, and windows. Each path is simulated as a combination of a thermal convection, thermal conduction, and the thermal mass. It is assumed that heat is not transferred internally between rooms. The heater cosists of a furnace, a boiler, an accumulator, and a pump to circulate hot water in the system. The controller starts admitting fuel into the furnace if the overall average temperature of rooms falls below 21 degree C and it stops if the temperature exceeds 25 degree C. The simulation calculates the heating cost and indoor temperatures.

Contents

Model

House Thermal Network

It cosists of four radiators and four rooms.

Radiator Subsystem

Room Subsystem

Indoor Average Temperature Subsystem

Heater Subsystem

Boiler Subsystem

Control Subsystem

Simulation Results from Simscape Logging

The first plot shows the temperature variation of each room compared to the outside temperature fluctuations. The second plot shows the average overall temperatures of roof, walls, and windows.

These plots show heat flow rate from furnace to the boiler and to radiators. The cost of fuel is calculated based on the fuel mass flow rate through the furnace. It is assumed that the fuel has the density of natural gas (~ 0.9 kg/m^3) and the cost of natural gas is $8.50 per thousand cubic feet (Mcf): $8.50 per 1000 cf.

Fluid Properties

This figure plots the fluid properties of water as functions of pressure and temperature.