Bang-bang temperature controller example

Muscle activity generates heat. A person vigorously exercising may need to cool down to maintain proper body temperature. Now imagine someone asleep in a cold bedroom (or on an operating table, under anesthesia), who, because she is immobile, cools down and therefore needs the help of an electric heating pad. The electric heating pad supplies power P in J/s to her body of mass M and specific heat Hs, and thermal conductivity k. She radiates heat over her surface area A with an air-skin convective heat transfer coefficient of hc. The convective system can be modeled like a "leaky integrator" with the equation

where ΔT is Tbody - Troom

Attend to the sense of the equation: The body will take longer to warm up the larger it is and the greater the specific heat; it will cool down faster if its area and heat transfer coefficient are larger. What must be the units of specific heat? The units have to include something/gm, to cancel out mass, and then J/deg to cancel out the energy in numerator's power, leaving deg/sec for the term. Specific heat is Joules/deg-gm. As you may remember, the specific heat of water is 4.18 J/deg-gm, so when 4.18J of energy is added to a gram of water the temperature will increase by 1 deg C.

We could apply the Laplace transform to the equation above and solve for ΔT to find:

but we want to have ambient temperature to enter as a parametric input, so we expand to a system that includes thermal conductivity from the heated region (5kg) into the other 45 kg of the body. Assume there is 1 sq. meter of convective surface. Power from the heater is transferred directly to 5kg of mass with the specific heat of water. Heat flows from the 5kg mass to the 45 kg "body" by thermal conduction, with a value of 0.058 W/(m^2*degK). A temperature profile in the 5 cm thick body with a 1 meter square area results in a "skin" temperature > ambient. The skin sends heat into the ambient air by convection, which we estimate at 5 W/(m^2*degK). See Simulink model below.

which in its current version has no hysteresis. What is are time constants of this 3-integrator system? See output below, for 100 hours!
The middle trace shows the heating pad going on and off...