Вы находитесь на странице: 1из 5

Thermal Model of a House

This demo illustrates how you can use Simulink to create the thermal model of a house. This system models the outdoor environment, the thermal characteristics of the house, and the house heating system. The sldemo_househeat_data.m file initializes data in the model workspace. To make changes, you can edit the model workspace directly or edit the m-file and re-load the model workspace. To view the model workspace, select View > Contents odel !"plorer from the Simulink editor.

#pening the

odel

odel $nitialization odel %omponents &unning the Simulation and Visualizing the &esults %losing the &emarks odel

Opening the Model $n the 'T(') window, load the model *y e"ecuting the following code +select the code and press ,- to

evaluate selection..

mdl='sldemo_househeat'; open_system(mdl);

Figure 1: The /ouse /eating Model Initialization

odel

This model calculates heating costs for a generic house. 0hen the model is opened, it loads the information a*out the house from the sldemo_househeat_data.m file. The -file does the following1

2efines the house geometry +size, num*er of windows. Specifies the thermal properties of house materials %alculates the thermal resistance of the house

3rovides the heater characteristics +temperature of the hot air, flow-rate. 2efines the cost of electricity +4.4-56k0hr. Specifies the initial room temperature +74 deg. %elsius 8 9: deg. ,ahrenheit. Note: Time is given in units of hours. %ertain ;uantities, like air flow-rate, are e"pressed per hour +not per second..

Model Components Set Point <Set 3oint< is a constant *lock. $t specifies the temperature that must *e maintained indoors. $t is =4 degrees ,ahrenheit *y default. Temperatures are given in ,ahrenheit, *ut then are converted to %elsius to perform the calculations. Thermostat <Thermostat< is a su*system that contains a &elay *lock. The thermostat allows fluctuations of > degrees ,ahrenheit a*ove or *elow the desired room temperature. $f air temperature drops *elow 9> degrees ,ahrenheit, the thermostat turns on the heater. See the thermostat su*system *elow.

open_system([mdl,'/Thermostat']);

Figure 2: The <Thermostat< Su*system Heater </eater< is a su*system that has a constant air flow rate, < dot<, which is specified in the sldemo_househeat_data.m -file. The thermostat signal turns the heater on or off. 0hen the heater is

on, it *lows hot air at temperature T/eater +>4 degrees %elsius 8 ?77 degrees ,ahrenheit *y default. at a constant flow rate of *y the !;uation ?. !uation 1 dot +?kg6sec 8 @944kg6hr *y default.. The heat flow into the room is e"pressed

open_system([mdl,'/Heater']);

Figure ": The Heater Su#s$stem Cost Cal%ulator <%ost %alculator< is a Aain *lock. <%ost %alculator< integrates the heat flow over time and multiplies it *y the energy cost. The cost of heating is plotted in the <3lot&esults< scope. House </ouse< is a su*system that calculates room temperature variations. $t takes into consideration the heat flow from the heater and heat losses to the environment. /eat losses and the temperature time derivative are e"pressed *y !;uation 7. !uation 2

open_system([mdl,'/House']);

Figure &: The /ouse Su*system Modeling the n'ironment

0e model the environment as a heat sink with infinite heat capacity and time varying temperature Tout. The constant *lock <'vg #utdoor Temp< specifies the average air temperature outdoors. The <2aily Temp Variation< Sine 0ave *lock generates daily temperature fluctuations of outdoor temperature. Vary these parameters and see how they affect the heating costs. (unning the Simulation and )isualizing the (esults &un the simulation and visualize the results. #pen the <3lot&esults< scope to visualize the results. The heat cost and indoor versus outdoor temperatures are plotted on the scope. The temperature outdoor varies sinusoidally, whereas the indoors temperature is maintained within > degrees ,ahrenheit of <Set 3oint<. Time a"is is la*eled in hours.

evalc('sim(mdl)'); open_system([mdl '/Plot esults']),

Figure *: Simulation results +time a"is la*eled in hours.

'ccording to this model, it would cost around 5@4 to heat the house for two days. Try varying the parameters and o*serve the system response. Closing the Model

close_system(mdl);
(emar+s This particular model is designed to calculate the heating costs only. $f the temperature of the outside air is higher than the room temperature, the room temperature will e"ceed the desired <Set 3oint<. Bou can modify this model to include an air conditioner. Bou can implement the air conditioner as a modified heater. To do this, add parameters like the following to sldemo_househeat_data.m.

%old air output Temperature of the stream from the air conditioner 'ir conditioner efficiency

Bou would also need to modify the thermostat to control *oth the air conditioner and the heater.

Вам также может понравиться