Question 7.10.1: Thermostatic Control of Temperature (a) Develop a Simulink m...
Thermostatic Control of Temperature
(a) Develop a Simulink model of a thermostatic control system in which the temperature model is
RC \frac{d T}{d t} + T = Rq + T_{a} (t)
where T is the room air temperature in °F, T_a is the ambient (outside) air temperature in °F, time t is measured in hours, q is the input from the heating system in ft-lb/hr, R is the thermal resistance, and C is the thermal capacitance. The thermostat switches q on at the value q_{max} whenever the temperature drops below 69°, and switches q to q = 0 whenever the temperature is above 71°. The value of q_{max} indicates the heat output of the heating system.
Run the simulation for the case where T (0) = 70° and T_{a}(t) = 50 + 10 \sin(\pi t/12). Use the values R = 5 × 10^{−5} °F-hr/lb-ft and C = 4 × 10^{4} lb-ft/°F. Plot the temperatures T and T_a versus t on the same graph, for 0 ≤ t ≤ 24 hr. Do this for two cases: q_{max} = 4 × 10^{5} and q_{max} = 8 × 10^{5} lb-ft/hr. Investigate the effectiveness of each case. (b) The integral of q over
time is the energy used. Plot ∫ q dt versus t and determine how much energy is used in 24 hr for the case where q_{max} = 8 × 10^{5}.
Learn more on how we answer questions.
The model can be arranged as follows:
\frac{dT}{dt} = \frac{1}{RC} [Rq + T_{a}(t) − T ]
The Simulink model is shown in Figure 7.10.7, where 1/RC = 0.5 and the gain labeled R has the value R = 5 × 10^{−5}, which is entered as 5e-5. The output of the Relay block is q(t). The input T_{a}(t) is produced with the Sine block. For the Sine block, set the Amplitude to 10, the Bias to 50, the Frequency to pi/12, the Phase to 0, and the Sample time to 0. The second Integrator block and Scope 2 were included to compute and display ∫ q dt versus t.
For the Relay block, set the Switch on point to 71, the Switch off point to 69, the Output when on to 0, and the Output when off to the variable qmax. This corresponds to Figure 7.10.6a.
Set the simulation stop time to 24.
You can set the value of qmax by editing the Relay block or by setting its value in the MATLAB Command window before running the simulation, for example, by typing qmax = 4e+5 before the first simulation.
The simulation results show that when q_{max} = 4 × 10^{5}, the system is unable to keep the temperature from falling below 69°. When q_{max} = 8 × 10^{5}, the temperature stays within the desired band. The plot of ∫ q dt versus t for this case shows that the energy used at the end of 24 hr is 9.6158 × 10^{6} ft-lb. This value can be obtained by exporting the output of the second integrator to the workspace
