C++Guns – RoboBlog

07.02.2013

Temperatur im Terrarium

Filed under: Allgemein — Thomas @ 18:02

python_temp

Ich habe mir leider die Starttemperatur nicht notiert. Als Modellgleichgung habe ich einfach die e-Funktion verwendet.

-a*exp(-x*b) + c

Final set of parameters            Asymptotic Standard Error
=======================            ==========================

a               = 4.75243          +/- 0.4415       (9.291%)
b               = 2.43808          +/- 0.3206       (13.15%)
c               = 38.1491          +/- 0.4577       (1.2%)

Hier die Messwerte

17:06:59 33.5
17:07:33 33.6
17:08:50 33.7
17:11:27 33.9
17:12:35 34.0
17:14:00 34.1
17:15:28 34.2
17:16:50 34.3
17:18:30 34.4
17:20:00 34.5
17:22:00 34.6
17:23:20 34.7
17:26:00 34.8
17:27:15 34.9
17:30:30 35.0
17:32:42 35.2
17:39:00 35.5
17:45:00 35.8

Hier die gnuplot commands

set xdata time
set timefmt x "%H:%M:%S"
set format x "%H:%M"
set kex left
set xlabel "time"
set ylabel "temp"
f(x) = -a*exp(- (b*(x-61500)/(70000-61500)) ) + c
fit f(x) "2.808" using 1:2 via a,b,c
plot [61500:70000] "2.808" using 1:2 with linespoints title "temp", f(x) title "approx"

2 Comments »

  1. Kann gnuplot die approximierte Funktion finden oder hast du das anders gemacht?

    Comment by Chase — 10.02.2013 @ 11:02

  2. Man muss die Funktion schon vorgeben. Also Polynom, e Funktion e.t.c. Gnuplot verändert dann so lange die vorgegebenen Parameter bis es passt. Gibt man ihm gute Startwerte, bekommt man auch ein besseres Ergebnis ;)
    Ich habe in meinem Datensatz ja Uhrzeiten stehen. Gnuplot rechnet das in Sekunden um und dann geht die x Range von 61500 bis 70000. Und das ist doch recht blöd zu rechnen. Darum habe ich gleich eine Normierung mit in die Funktion gebaut: (x-61500)/(70000-61500). Damit läuft x nur noch von 0 bis 1 und die fit Funktion freu sich.

    Comment by Thomas — 10.02.2013 @ 14:02

RSS feed for comments on this post.

Leave a comment

You must be logged in to post a comment.

Powered by WordPress