[time-nuts] Simple simulation model for an OCXO?
Matthias Welwarsky
time-nuts at welwarsky.de
Mon May 2 15:12:47 UTC 2022
Dear all,
I'm trying to come up with a reasonably simple model for an OCXO that I can
parametrize to experiment with a GPSDO simulator. For now I have the following
matlab function that "somewhat" does what I think is reasonable, but I would
like a reality check.
This is the matlab code:
function [phase] = synth_osc(samples,da,wn,fn)
# aging
phase = (((1:samples)/86400).^2)*da;
# white noise
phase += (rand(1,samples)-0.5)*wn;
# flicker noise
phase += cumsum(rand(1,samples)-0.5)*fn;
end
There are three components in the model, aging, white noise and flicker noise,
with everything expressed in fractions of seconds.
The first term basically creates a base vector that has a quadratic aging
function. It can be parametrized e.g. from an OCXO datasheet, daily aging
given in s/s per day.
The second term models white noise. It's just a random number scaled to the
desired 1-second uncertainty.
The third term is supposed to model flicker noise. It's basically a random
walk scaled to the desired magnitude.
As an example, the following function call would create a phase vector for a
10MHz oscillator with one day worth of samples, with an aging of about 5
Millihertz per day, 10ps/s white noise and 10ns/s of flicker noise:
phase = osc_synth(86400, -44e-6, 10e-12, 10e-9);
What I'd like to know - is that a "reasonable" model or is it just too far off
of reality to be useful? What could be changed or improved?
Best regards,
Matthias
More information about the Time-nuts_lists.febo.com
mailing list