1
$\begingroup$

First, sorry about a n00b question.

Here's the graph:

enter image description here

The x=30, y=0.5 is an approximation. The other two dots are measured. My goal is to mathematically describe/calculate y based on arbitrary x value.

Context

I'm regulating heating with Raspberry Pi and I have noticed that, to get increase of 1 deg C, the heating needs to work for 1/2 hours when the outside-inside temperature difference is ~10 deg. C. The measured time needed to increase room temp for 1 deg C rises to 1 hour when the in-out diff is 20 deg C. (And, as I said, 30 deg delta is approximated, for now).

The heating_speed (y axis, measured in C/h) as function of temp_delta (x axis, measured in C) just "feels" that it can not be linear. But, I could be mistaken.

Additionally, I'm not interrested in the freaky border cases when the in-out temp delta is > 40 C. In those cases, I believe, the current heating power will not be sufficient to keep the temperature stabile and it will probably have negative heating_speed.

Alternate assumption

Possibly, the function is linear, like this (blue):

enter image description here

In this case, I guess, the formula will be this: 3.-0.1 x. WA link 1, link 2.

$\endgroup$
8
  • $\begingroup$ There is an infinite number of functions which could go through your two points. You must decide first on the type of formula you want to use, then compute its parameters and then extrapolate or interpolate for any arbirary value of x. $\endgroup$ Nov 27 '13 at 10:36
  • 1
    $\begingroup$ @Saran Please provide some context so we can better help you. How did you encounter this? $\endgroup$
    – Git Gud
    Nov 27 '13 at 10:37
  • $\begingroup$ @GitGud I've added some "context". $\endgroup$
    – Saran
    Nov 27 '13 at 11:17
  • 1
    $\begingroup$ Here's a WA link. $\endgroup$
    – Git Gud
    Nov 27 '13 at 11:27
  • 1
    $\begingroup$ If you would plot instead $y = \mbox{temp_delta}$ and $x = \mbox{h} = t = $ heating time, then doesn't the graph become an exponential function, like $exp(-t/\tau)$ with $\tau$ a decay time ? Such exponentials are rather common with heating problems, in my experience. Moreover, a few measurements would then enable you to determine the function. In general, it's advisable to develop a mathematical model (with some free parameters) of the phenomenon, instead of trying to adapt to a ("randomly chosen") curve. $\endgroup$ Nov 27 '13 at 12:06
1
$\begingroup$

If you use what suggests Han de Bruijn, that is to say y = a Exp[-b x], since you have two data points, you can easily solve for "a" and "b". What you get is a = 4 and b = - Log[2]/10. For x = 30, you exactly get y = 0.5.

$\endgroup$
6
  • $\begingroup$ The curve could also be like $1-exp(-t/\tau)$ ; can't get a clear picture from the available information. $\endgroup$ Nov 27 '13 at 12:12
  • $\begingroup$ I'd like to accept your answer, but I can't confirm it. I tried with x = 30 and I get y = 0.29. Log(2)/10 = 0.0301. Times 30 = 0.9031. So, 4 Exp [- 0.9] = 0.29. $\endgroup$
    – Saran
    Nov 27 '13 at 13:46
  • $\begingroup$ @Saran. It is not a decimal logarithm ! $\endgroup$ Nov 27 '13 at 17:30
  • $\begingroup$ @ClaudeLeibovici indeed. But, have you tried calculating other values (apart for x=30)? For example, for x=10, I get y=0.38 which is not even close. $\endgroup$
    – Saran
    Nov 28 '13 at 14:41
  • $\begingroup$ @Saran. This function was built basd on your two data points. Then, by definition, it is exact at these two points. If y(x) = 4 Exp[- Log(10) x / 10 ], with Log(10) = 2.30259, you have y(0)=4, y(10)=2, y(20)=1, y(30)=0.5, y(40)=0.25, y(50)=0.125. I hope you see the geometric progression for values which are multiples of 10. $\endgroup$ Nov 29 '13 at 4:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.