Another Simple Analog Model: Law of Warming and Cooling (publ. 2025-02-19)

I haven't been able to place my analog parts order yet. Even after the last paycheck, the budget is very tight, and I don't want to run short on grocery money. But I'm hoping the tax refund will come in sometime in the next two weeks.

In the mean time, I'm continuing to explore as much as I can with what I have. Using Newton's simple law for warming and cooling, borrowed from a differential equations textbook, I sketched this simple model:

model sketch

A point of confusion here is that my model shows -k while the equation shows just k, with condition k < 0. This is because my potentiometer multiplier constant cannot itself be negative, so I have to send the signal into it inverted (or invert its output).

Here are some output screenshots. Yellow is the input, representing ambient temperature in the surroundings. Green is the output, representing the temperature of the object being warmed or cooled. The output voltage is tapped off the output of the integrator after being fed through another inverter, not shown on the sketch above.

result with k mid-range

As expected, the object's temperature graph lags a little behind the ambient temperature. If we bring k potentiometer high, i.e. reduce the insulation, the graphs get more in phase:

result with k high (low insulation)

And if we bring k potentiometer low, i.e., increase the insulation, the object's temperature change lags more, and it does not get as hot or cold:

result with k low (high insulation)

As a side note: recently I found an interesting piece of free software called Xcos, which is part of the Scilab suite.

Xcos

It provides modeling blocks like integrators and summers, and it allows you to run a step based simulation. So I could prototype these sort of models on my desktop computer. Unfortunately, xcos is not available on Guix — there is a Guix package for Scilab, but it only provides the Scilab CLI interpeter. I have made some strenuous efforts to get the full suite running or compiled on my Guix system but so far have not had success. The problems I am having all have to do with Java dependences or Java configure script code. Knowing that it is Scilab is available on Debian Buster, I even put together a Debian VM and tried to run it on that. The application runs, but there is some fatal problem I am experiencing where I cannot display output graphs. Something to do with OpenGL, I think.

This work © 2025 by Christopher Howard is licensed under Attribution-ShareAlike 4.0 International.

CC BY-SA 4.0 Deed

Proxied content from gemini://gem.librehacker.com/gemlog/starlog/20250219-0.gmi

Gemini request details:

Original URL
gemini://gem.librehacker.com/gemlog/starlog/20250219-0.gmi
Status code
Success
Meta
text/gemini
Proxied by
kineto

Be advised that no attempt was made to verify the remote SSL certificate.