Temperature Controlled rasPi 3B

Achim Gratz Stromeko at nexgo.de
Wed Apr 26 20:45:22 UTC 2017


Gary E. Miller via devel writes:
> Yes, I remember your descriptions, what I'm asking for is code.  reuseable
> code.

Have at it.  The datafile (joined.txt) has the UTC timestamp, PPS
offset, temperature (sampled each second right after the PPS pulse and
averaged over 5min or 300 samples), NTP time offset and NTP frequency
offset as the columns (from the loopstats), in that order.  The
variables going into the script from the command line are UTC timestamp
for the begin of the data (start), last day to plot (sl), range of days
to use for fit (sr to sq).  The maximum time offset for samples to be
considered valid is thr, ideally one would check that in conjunction
with the derivative of the frequency offset (close to zero), but that's
cumbersome to do in gnuplot and the resulting extra noise from not doing
it is no big problem for convergence.  The initial model variables could
be moved to another datafile, which would also make them reusable
between runs and speed up convergence a bit.

--8<---------------cut here---------------start------------->8---
t(x)=x - 24*start
age(t)=pa*1000*log(t+paa)
p2a(t,T)=age(t)+pb*(T-T0)**2+pc
pa=750e-6
paa=2500
pb=-5.e-3
pc=-10.0
T0=62.5
thr=10e-9
fit [t=24*(sl-sr):24*(sl-sq)][T=50:70][ppm=*:*] (p2a(t,T)-ppm) "joined.txt" using (tp($1,$4)):($3):($5) via pa,paa
fit [t=24*(sl-sr):24*(sl-sq)][T=50:70][ppm=*:*] (p2a(t,T)-ppm) "joined.txt" using (tp($1,$4)):($3):($5) via T0,pb,pc
fit [t=24*(sl-sr):24*(sl-sq)][T=50:70][ppm=*:*] (p2a(t,T)-ppm) "joined.txt" using (tp($1,$4)):($3):($5) via T0,pa,paa,pb,pc
--8<---------------cut here---------------end--------------->8---



Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

SD adaptation for Waldorf microQ V2.22R2:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada



More information about the devel mailing list