[time-nuts] Thermal impact on OCXO

Scott Stobbe scott.j.stobbe at gmail.com
Thu Nov 17 11:03:56 EST 2016

It sounds like you knew what I meant by linearization, but I really
should have wrote linearize in parameters. Of course functions like

F = Ax^2 + Bx + C
F = Asin(omega t) + Bcos(omega t)

fit extremely well with ordinary least squares.

Well there is no free lunch, nlsq has its own challenges, the results
you get depends on the initial conditions you provide, and can also
completely diverge, or converge on a local minima which isn't the best
fit. There don't seem to be a lot of worked examples out there so for
someone one day in the future here is some sample octave/matlab code
for nlsq.

A1 = 0.0233;
A2 = 4.4583;
A3 = 0.0082;

A = [ A1 A2 A3 ];

ts = (1:(30))';

Fage = @(A,x) A(1).*log(A(2).*x + 1) + A(3)

F = Fage(A,ts);

% Add Gaussian measurement noise
F_pn = F + 1E6*0.5e-9*randn(size(ts));

% Fit F_pn to non-linear function Fage
Ainit = [ 1 1 1 ];

options = optimset('Display','on','TolFun',1e-12, 'TolX', 1e-12);
[Aest,resnorm, e, o] = lsqcurvefit(Fage,Ainit,ts,F_pn,[],[],options);

On Thu, Nov 17, 2016 at 8:24 AM, Attila Kinali <attila at kinali.ch> wrote:
> On Tue, 15 Nov 2016 23:58:31 -0500
> Scott Stobbe <scott.j.stobbe at gmail.com> wrote:
>> Do you recall if you fitted with true ordinary least squares, or fit with a
>> recursive/iterative approach in a least squares sense. If the aging curve
>> is linearizable, it isn't jumping out at me.
> Least square fits to non-linear functions are almost always iterative.
> There are only very few functions for which closed formulas are known.
> Quite a few people do "linearization", but in general this does not
> work well or leads to sub-optimal solutions (aka not an least squares fit)
> without people realizing it.
> An alternative method that works for some functions are state-space
> methods. But I barely know about them, so I cannot really comment on them.
>                         Attila Kinali
> --
> It is upon moral qualities that a society is ultimately founded. All
> the prosperity and technological sophistication in the world is of no
> use without that foundation.
>                  -- Miss Matheson, The Diamond Age, Neil Stephenson
> _______________________________________________
> time-nuts mailing list -- time-nuts at febo.com
> To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
> and follow the instructions there.

More information about the time-nuts mailing list