
3.4 Setting Up ODE Models 141
Physically, this temperature memory is realized in terms of the relatively cold
temperatures of the internal air inside the alarm clock or of certain parts inside the
alarm clock that are immediately adjacent to the alarm clock. We had introduced
T
i
above as an ‘‘effective temperature’’ representing internal air temperature and
internal parts’ temperatures. As explained in Section 3.2.3, the temperature sensor
‘‘sees’’ only T
i
instead of T
a
.Nowattimet = 0, when we enter the warm room,
T
i
is still colder than the actual sensor temperature, T
s
, and this is why that initial
decrease in the sensor temperature in Figure 3.2b is observed. In terms of this
model, the initial decrease in the sensor temperature can, thus, only be explained if
T
i0
< T
s0
,evenT
i0
< min
t≥0
T
s
(t). Looking into room.csv, it can be seen that this
means T
i
< 18.2. But we know even more. From Figure 3.2b or room.csv you can
see that around t ≈ 2.5minwehaveT
s
= 0. In terms of Equation 3.36, this means
T
i
(2.5) ≈ T
s
(2.5) or T
i
(2.5) ≈ 18.2(usingRoom.csv again).
Our a priori knowledge of the parameters of Equations 3.36–3.39 can be
summarized as follows:
•
r
si
, r
ia
: percent values, probably between 0 and 1
•
T
a
≈ 21
◦
C
•
T
s0
≈ 18.5
•
T
i0
: to be determined such that T
i
(2.5) ≈ 18.2.
3.4.2.3 Result of a Hand-fit
The criterion to be applied for the determination of more exact values of the
parameters is a good coincidence between the model and the data. According to
the nonlinear regression idea explained in Section 2.4, the parameters have to be
determined in a way such that T
s
as computed from Equations 3.36–3.39 matches
the data in Figure 3.2b as good as possible. Note, however, that if we do not use the
closed form solution of Equations 3.36–3.39 that is discussed in Section 3.7.3, the
methods in Section 2.4 need to be applied in a slightly modified way here since
T
s
, which serves as the nonlinear regression function, is given only implicitly as
the solution of Equations 3.36–3.39. This problem is addressed in Section 3.9.
Here, we confine ourselves to a simple hand tuning of the parameters. This is
what is usually done first after a new model has been created, in order to see if
a good fit with the data can be obtained in principle. Figure 3.5 shows the result
of Equations 3.36–3.39 obtained for the following hand-fitted parameter values:
r
si
= 0.18, r
ia
= 0.15, T
a
= 21, T
s0
= 18.5, and T
i0
= 17.
The figure was produced using the Maxima code
RoomODED.mac and the data
room.csv in the book software. This code is similar to FeverExp.mac discussed
in Section 3.2.2.1, and it is based on Equations 3.199 and 3.200, a ‘‘closed form
solution’’ of Equations 3.36–3.39, which is discussed in Section 3.7.3. Obviously,
the figure shows a very good fit between T
s
and the data. Note that the T
i
curve
in Figure 3.5 intersects the T
s
curve exactly at its minimum, as it was required
above. Note also that it is by no means ‘‘proved’’ by the figure that we have found
the ‘‘right’’ values of the parameters. There may be ambiguities, that is, it might
be true that a similarly perfect fit could be produced using an entirely different set
of parameters. Also, you should note that even if there are no ambiguities of this