time-nuts@lists.febo.com

Discussion of precise time and frequency measurement

View all threads

New Subscriber, DIY GPSDO project (yes, another one)

MW
Matthias Welwarsky
Tue, Mar 3, 2020 1:42 PM

On Dienstag, 3. März 2020 14:14:37 CET Attila Kinali wrote:

N'achmittag!

No heatsink, just a couple of thermal vias into the ground plane and it
gets a bit warm, but not more than 35°C (case temperature). I just
checked with a thermocouple.

Ok.. I'm surprised. Is the PCB able to dissipate this much heat?

Well, it probably means that, yes. But I've not characterized the power
consumption fully. I was in a bit of a hurry to get the prototype up and
working so I didn't really make a power or thermal budget before, I just put
everything together and hoped for the best. Since the numbers cannot lie,
either the heat transfer through the thermal vias is much better than
anticipated or the actual power consumption is much less than the estimate :)

I'll know that soon.

40°C is not just OKish, it's totally OK. I wouldn't worry until you
hit something like 60°C. As long as the die is safely below 100°C
it will be fine.

And yes, the 10MHz output will add a lot of additional current.
At 3.3V that is about 25-30mA going into the connector.

That's going to roast the LDO for sure.

I would also recommed using a DC/DC switched power supply to go
down from 24V to 5V, to get around the big bulk of waste heat
production.

For the GPS pre-regulator definitely. For the rest of the electronics -
maybe. But I wanted the power supply of U6 at more than 5V and I had to
balance the power dissipation somewhat to not burden everything onto U3,
hence the 12V intermediate voltage. Still, U3 could be replaced by a buck
converter down to, say, 6V, that would take the stress off of all
downstream LDOs. I just need to find something that has an appropriate
footprint. I don't have a lot of PCB area. I seem to remember that
synchronous buck converters can be had in SOT-23-6 package ;) I just need
to find something with a high enough switching frequency so that the
inductor can be very small.

There are parts are meant as a replacement for 78xx. Ie fit
in a TO-220 footprint, like e.g. the OKI-78SR series from Murata.
They are usually available in 3.3V, 5V and 12V... some manufacturers
also have values in-between.

Thanks for the pointers, I'll have a look at them.

On the idea of using a TVS diode instead of the SCR crowbar - forget it. I
tried. By the time the polyfuse trips, the TVS has released the magic
smoke. The LPRO-101 draws about 1.7A during initial heat-up, the fuse has
to be rated accordingly. A TVS diode with a breakdown voltage of 27V
would have to dissipate, say, about 50 Watts for a couple of seconds at
least. I used a LDP24A, Besides from being of enormous size, I didn't
trust it not causing a fire when the protection trips.

Oh...kay? The input circuitry is usually meant as a protection against
surges, not against having a power supply with the wrong voltage attached.
So I am a litte bit surprised that you try to protect against that.
Do you see it likely that your power supply goes up to a voltage that
would break the LDOs downstream?

Hm, the origin of that circuit was a connector board I designed for the LPRO
as a standalone frequency reference. I was a bit afraid to damage the Rb by
connecting an incompatible power supply. I wasn't too worried about surge
protection but actually overvoltage and reverse polarity. I just copied and
pasted that part into the GPSDO.

Do you have some schematics online of your design? I've seen Tobias
schematics on the list, but I only looked at the last month of postings
so far.

Not yet. I'm working on a write-up that explains all the components
and what design decisions lead to them. For now, you can find the
key components in the mails I wrote as an answer to Tobias:
http://lists.febo.com/pipermail/time-nuts_lists.febo.com/2019-October/097962
.html
http://lists.febo.com/pipermail/time-nuts_lists.febo.com/2019-November/0982
07.html

Thanks, I'll have a look.

In the meantime, I'm thinking of another modification to make: getting rid of
the HC390 ripple counter. I think I might be able to use the STM32 as a
frequency divider. I just have to figure out how to program the timers. What
might work is the following:

  • Feed the 10MHz clock into the external trigger input for the timer,
    configure the timer to count the trigger pulses instead of the internal clock
    source.
  • Set the timer to auto-reload the desired divisor, e.g. 20 (-1),
  • Set the capture/compare register to the same value, set the output mode to
    "toggle"

The result should be a 250kHz signal at the timers output pin. I have no idea
though if the jitter is going to be better than with the HC390. If anything in
the above scheme is linked to the internal AHB clock, the expected jitter will
be around 20ns. That would definitely not improve the situation ;)

BR,
Matthias

		Attila Kinali
On Dienstag, 3. März 2020 14:14:37 CET Attila Kinali wrote: > N'achmittag! > > > No heatsink, just a couple of thermal vias into the ground plane and it > > gets a bit warm, but not more than 35°C (case temperature). I just > > checked with a thermocouple. > > Ok.. I'm surprised. Is the PCB able to dissipate this much heat? Well, it probably means that, yes. But I've not characterized the power consumption fully. I was in a bit of a hurry to get the prototype up and working so I didn't really make a power or thermal budget before, I just put everything together and hoped for the best. Since the numbers cannot lie, either the heat transfer through the thermal vias is much better than anticipated or the actual power consumption is much less than the estimate :) I'll know that soon. > 40°C is not just OKish, it's totally OK. I wouldn't worry until you > hit something like 60°C. As long as the die is safely below 100°C > it will be fine. > > And yes, the 10MHz output will add a lot of additional current. > At 3.3V that is about 25-30mA going into the connector. That's going to roast the LDO for sure. > > > I would also recommed using a DC/DC switched power supply to go > > > down from 24V to 5V, to get around the big bulk of waste heat > > > production. > > > > For the GPS pre-regulator definitely. For the rest of the electronics - > > maybe. But I wanted the power supply of U6 at more than 5V and I had to > > balance the power dissipation somewhat to not burden everything onto U3, > > hence the 12V intermediate voltage. Still, U3 could be replaced by a buck > > converter down to, say, 6V, that would take the stress off of all > > downstream LDOs. I just need to find something that has an appropriate > > footprint. I don't have a lot of PCB area. I seem to remember that > > synchronous buck converters can be had in SOT-23-6 package ;) I just need > > to find something with a high enough switching frequency so that the > > inductor can be very small. > > There are parts are meant as a replacement for 78xx. Ie fit > in a TO-220 footprint, like e.g. the OKI-78SR series from Murata. > They are usually available in 3.3V, 5V and 12V... some manufacturers > also have values in-between. Thanks for the pointers, I'll have a look at them. > > On the idea of using a TVS diode instead of the SCR crowbar - forget it. I > > tried. By the time the polyfuse trips, the TVS has released the magic > > smoke. The LPRO-101 draws about 1.7A during initial heat-up, the fuse has > > to be rated accordingly. A TVS diode with a breakdown voltage of 27V > > would have to dissipate, say, about 50 Watts for a couple of seconds at > > least. I used a LDP24A, Besides from being of enormous size, I didn't > > trust it not causing a fire when the protection trips. > > Oh...kay? The input circuitry is usually meant as a protection against > surges, not against having a power supply with the wrong voltage attached. > So I am a litte bit surprised that you try to protect against that. > Do you see it likely that your power supply goes up to a voltage that > would break the LDOs downstream? Hm, the origin of that circuit was a connector board I designed for the LPRO as a standalone frequency reference. I was a bit afraid to damage the Rb by connecting an incompatible power supply. I wasn't too worried about surge protection but actually overvoltage and reverse polarity. I just copied and pasted that part into the GPSDO. > > Do you have some schematics online of your design? I've seen Tobias > > schematics on the list, but I only looked at the last month of postings > > so far. > Not yet. I'm working on a write-up that explains all the components > and what design decisions lead to them. For now, you can find the > key components in the mails I wrote as an answer to Tobias: > http://lists.febo.com/pipermail/time-nuts_lists.febo.com/2019-October/097962 > .html > http://lists.febo.com/pipermail/time-nuts_lists.febo.com/2019-November/0982 > 07.html Thanks, I'll have a look. In the meantime, I'm thinking of another modification to make: getting rid of the HC390 ripple counter. I think I might be able to use the STM32 as a frequency divider. I just have to figure out how to program the timers. What might work is the following: - Feed the 10MHz clock into the external trigger input for the timer, configure the timer to count the trigger pulses instead of the internal clock source. - Set the timer to auto-reload the desired divisor, e.g. 20 (-1), - Set the capture/compare register to the same value, set the output mode to "toggle" The result should be a 250kHz signal at the timers output pin. I have no idea though if the jitter is going to be better than with the HC390. If anything in the above scheme is linked to the internal AHB clock, the expected jitter will be around 20ns. That would definitely not improve the situation ;) BR, Matthias > > > Attila Kinali
JH
Jim Harman
Tue, Mar 3, 2020 5:14 PM

Attila,

In your post from October you say,

What, I think, you haven't had a look at is the resolution of your DAC.

You get, including your resistive divider a 17bit resolution. But this
is not enough. You want to be able to control the OCXO such, that at
the loop time constant, you have less than 1LSB offset in frequency.
Usualy people aim for something in the order of 1000s as loop time
constant,
often even longer than that. Assuming your GPS receiver gives you
approximately
1ns RMS jitter (probably worse than that, but it makes it easy to
calculate)
that would mean frequency control of the level of 1e-12 is required.
Assuming
your OCXO has a tuning range of 1ppm (I've seen 0.1 to 20ppm for OCXOs)
that would mean you have to controll the EFC voltage better than parts in
1e-9
or 30 bits. Yes, this is kind of unreallistic, but that's what the design
should aim for. If you acheive something around 24bits, you will be
probably
close enough. (Note: that's 24bit resolution and stability over the
loop time constant. It is not 24bit absolute resolution)

I don't understand why you say the DAC should have a resolution of 24-30
bits. I can see that the loop time constant affects the precision needed in
the filter calculations, but what does the time constant have to do with
the needed DAC resolution? We don't have to wait for the whole time
constant before changing the DAC, we can update the filter calculations and
look at its output every second and adjust the DAC whenever the PI filtered
phase error is one DAC step or more.

If the OCXO has a tuning range of 1 ppm and we want frequency control
of 1e-12, wouldn't that require a DAC with 1e6 steps or 20 bits,
assuming the DAC covers the full tuning range of the oscillator?

Thanks for any explanation you can provide.

--Jim Harman

Attila, In your post from October you say, What, I think, you haven't had a look at is the resolution of your DAC. > You get, including your resistive divider a 17bit resolution. But this > is not enough. You want to be able to control the OCXO such, that at > the loop time constant, you have less than 1LSB offset in frequency. > Usualy people aim for something in the order of 1000s as loop time > constant, > often even longer than that. Assuming your GPS receiver gives you > approximately > 1ns RMS jitter (probably worse than that, but it makes it easy to > calculate) > that would mean frequency control of the level of 1e-12 is required. > Assuming > your OCXO has a tuning range of 1ppm (I've seen 0.1 to 20ppm for OCXOs) > that would mean you have to controll the EFC voltage better than parts in > 1e-9 > or 30 bits. Yes, this is kind of unreallistic, but that's what the design > should aim for. If you acheive something around 24bits, you will be > probably > close enough. (Note: that's 24bit resolution and stability over the > loop time constant. It is not 24bit absolute resolution) I don't understand why you say the DAC should have a resolution of 24-30 bits. I can see that the loop time constant affects the precision needed in the filter calculations, but what does the time constant have to do with the needed DAC resolution? We don't have to wait for the whole time constant before changing the DAC, we can update the filter calculations and look at its output every second and adjust the DAC whenever the PI filtered phase error is one DAC step or more. If the OCXO has a tuning range of 1 ppm and we want frequency control of 1e-12, wouldn't that require a DAC with 1e6 steps or 20 bits, assuming the DAC covers the full tuning range of the oscillator? Thanks for any explanation you can provide. > --Jim Harman
BK
Bob kb8tq
Tue, Mar 3, 2020 5:27 PM

Hi

Ideally in a digital control loop you want at least 2 “extra” bits past the
minimum required to hit your target accuracy. Things like noise, LSB
non-linearity, calculation roundoff, all drive that need. Indeed for a
low noise loop, you would push the margin out even further.

If your OCXO’s EFC is not perfectly linear (they never are) then it’s
“slope ratio” gets into the act. If the highest slope is 2X the lowest
(which is not uncommon), that will add another bit to the total.

Bob

On Mar 3, 2020, at 12:14 PM, Jim Harman j99harman@gmail.com wrote:

Attila,

In your post from October you say,

What, I think, you haven't had a look at is the resolution of your DAC.

You get, including your resistive divider a 17bit resolution. But this
is not enough. You want to be able to control the OCXO such, that at
the loop time constant, you have less than 1LSB offset in frequency.
Usualy people aim for something in the order of 1000s as loop time
constant,
often even longer than that. Assuming your GPS receiver gives you
approximately
1ns RMS jitter (probably worse than that, but it makes it easy to
calculate)
that would mean frequency control of the level of 1e-12 is required.
Assuming
your OCXO has a tuning range of 1ppm (I've seen 0.1 to 20ppm for OCXOs)
that would mean you have to controll the EFC voltage better than parts in
1e-9
or 30 bits. Yes, this is kind of unreallistic, but that's what the design
should aim for. If you acheive something around 24bits, you will be
probably
close enough. (Note: that's 24bit resolution and stability over the
loop time constant. It is not 24bit absolute resolution)

I don't understand why you say the DAC should have a resolution of 24-30
bits. I can see that the loop time constant affects the precision needed in
the filter calculations, but what does the time constant have to do with
the needed DAC resolution? We don't have to wait for the whole time
constant before changing the DAC, we can update the filter calculations and
look at its output every second and adjust the DAC whenever the PI filtered
phase error is one DAC step or more.

If the OCXO has a tuning range of 1 ppm and we want frequency control
of 1e-12, wouldn't that require a DAC with 1e6 steps or 20 bits,
assuming the DAC covers the full tuning range of the oscillator?

Thanks for any explanation you can provide.

--Jim Harman


time-nuts mailing list -- time-nuts@lists.febo.com
To unsubscribe, go to http://lists.febo.com/mailman/listinfo/time-nuts_lists.febo.com
and follow the instructions there.

Hi Ideally in a digital control loop you want at least 2 “extra” bits past the minimum required to hit your target accuracy. Things like noise, LSB non-linearity, calculation roundoff, all drive that need. Indeed for a low noise loop, you would push the margin out even further. If your OCXO’s EFC is not perfectly linear (they never are) then it’s “slope ratio” gets into the act. If the highest slope is 2X the lowest (which is not uncommon), that will add another bit to the total. Bob > On Mar 3, 2020, at 12:14 PM, Jim Harman <j99harman@gmail.com> wrote: > > Attila, > > In your post from October you say, > > What, I think, you haven't had a look at is the resolution of your DAC. >> You get, including your resistive divider a 17bit resolution. But this >> is not enough. You want to be able to control the OCXO such, that at >> the loop time constant, you have less than 1LSB offset in frequency. >> Usualy people aim for something in the order of 1000s as loop time >> constant, >> often even longer than that. Assuming your GPS receiver gives you >> approximately >> 1ns RMS jitter (probably worse than that, but it makes it easy to >> calculate) >> that would mean frequency control of the level of 1e-12 is required. >> Assuming >> your OCXO has a tuning range of 1ppm (I've seen 0.1 to 20ppm for OCXOs) >> that would mean you have to controll the EFC voltage better than parts in >> 1e-9 >> or 30 bits. Yes, this is kind of unreallistic, but that's what the design >> should aim for. If you acheive something around 24bits, you will be >> probably >> close enough. (Note: that's 24bit resolution and stability over the >> loop time constant. It is not 24bit absolute resolution) > > > I don't understand why you say the DAC should have a resolution of 24-30 > bits. I can see that the loop time constant affects the precision needed in > the filter calculations, but what does the time constant have to do with > the needed DAC resolution? We don't have to wait for the whole time > constant before changing the DAC, we can update the filter calculations and > look at its output every second and adjust the DAC whenever the PI filtered > phase error is one DAC step or more. > > If the OCXO has a tuning range of 1 ppm and we want frequency control > of 1e-12, wouldn't that require a DAC with 1e6 steps or 20 bits, > assuming the DAC covers the full tuning range of the oscillator? > > Thanks for any explanation you can provide. > > >> > --Jim Harman > _______________________________________________ > time-nuts mailing list -- time-nuts@lists.febo.com > To unsubscribe, go to http://lists.febo.com/mailman/listinfo/time-nuts_lists.febo.com > and follow the instructions there.
AK
Attila Kinali
Tue, Mar 3, 2020 5:28 PM

On Tue, 3 Mar 2020 12:14:37 -0500
Jim Harman j99harman@gmail.com wrote:

I don't understand why you say the DAC should have a resolution of 24-30
bits. I can see that the loop time constant affects the precision needed in
the filter calculations, but what does the time constant have to do with
the needed DAC resolution? We don't have to wait for the whole time
constant before changing the DAC, we can update the filter calculations and
look at its output every second and adjust the DAC whenever the PI filtered
phase error is one DAC step or more.

You do wait the whole time before updating the DAC value.. kind of ish.
The control loop's time constant is exactly that: The time it takes
the control loop for a change in the input to affect the output (very
loosely speaking). Yes, the sample rate at which the loop runs is
much higher, but that doesn't change the fact that the loop is slow
to react. And you want it to be slow to react, as otherwise the high
noise of GPS degrades the performance of your OCXO.

If the OCXO has a tuning range of 1 ppm and we want frequency control
of 1e-12, wouldn't that require a DAC with 1e6 steps or 20 bits,
assuming the DAC covers the full tuning range of the oscillator?

Yes. There is a calculation mistake in there. I corrected it in
the next mail:
http://lists.febo.com/pipermail/time-nuts_lists.febo.com/2019-October/097963.html

		Attila Kinali

--
<JaberWorky> The bad part of Zurich is where the degenerates
throw DARK chocolate at you.

On Tue, 3 Mar 2020 12:14:37 -0500 Jim Harman <j99harman@gmail.com> wrote: > I don't understand why you say the DAC should have a resolution of 24-30 > bits. I can see that the loop time constant affects the precision needed in > the filter calculations, but what does the time constant have to do with > the needed DAC resolution? We don't have to wait for the whole time > constant before changing the DAC, we can update the filter calculations and > look at its output every second and adjust the DAC whenever the PI filtered > phase error is one DAC step or more. You do wait the whole time before updating the DAC value.. kind of ish. The control loop's time constant is exactly that: The time it takes the control loop for a change in the input to affect the output (very loosely speaking). Yes, the sample rate at which the loop runs is much higher, but that doesn't change the fact that the loop is slow to react. And you want it to be slow to react, as otherwise the high noise of GPS degrades the performance of your OCXO. > If the OCXO has a tuning range of 1 ppm and we want frequency control > of 1e-12, wouldn't that require a DAC with 1e6 steps or 20 bits, > assuming the DAC covers the full tuning range of the oscillator? Yes. There is a calculation mistake in there. I corrected it in the next mail: http://lists.febo.com/pipermail/time-nuts_lists.febo.com/2019-October/097963.html Attila Kinali -- <JaberWorky> The bad part of Zurich is where the degenerates throw DARK chocolate at you.
AK
Attila Kinali
Tue, Mar 3, 2020 5:41 PM

On Tue, 03 Mar 2020 14:42:49 +0100
Matthias Welwarsky time-nuts@welwarsky.de wrote:

In the meantime, I'm thinking of another modification to make: getting rid of
the HC390 ripple counter. I think I might be able to use the STM32 as a
frequency divider. I just have to figure out how to program the timers. What
might work is the following:

  • Feed the 10MHz clock into the external trigger input for the timer,
    configure the timer to count the trigger pulses instead of the internal
    clock  source.

Better idea: feed the 10MHz input directly into the clock input
RCC_OSC_IN and let the STM32 derive its internal clock from that.
Doing that, the clock of your timer unit will be phase locked to
the 10MHz signal. Then you can use the timer for both capturing
the incomming PPS and for generating the 250kHz. The capturing
will solve the issue with aliasing. The timer output should have
a jitter in the low ps range. There is a bit more going on than
you would want in the STM32 for a low noise signal, but most
likely not so much as to degrade the output enough to matter.
If you are worried about that, you can still add a 7474, with
D connected to the STM32 timer output and the CLK to the 10MHz
to clean the jitter. But as I said, that's probably not necessary
in this case.

If you want to create a stabilized output PPS from the STM32,
you will need to do some software trickery to align the PPS,
as you cannot hope to shift the phase of the Rb in a reasonable
time to match up.

		Attila Kinali

--
<JaberWorky> The bad part of Zurich is where the degenerates
throw DARK chocolate at you.

On Tue, 03 Mar 2020 14:42:49 +0100 Matthias Welwarsky <time-nuts@welwarsky.de> wrote: > In the meantime, I'm thinking of another modification to make: getting rid of > the HC390 ripple counter. I think I might be able to use the STM32 as a > frequency divider. I just have to figure out how to program the timers. What > might work is the following: > > - Feed the 10MHz clock into the external trigger input for the timer, > configure the timer to count the trigger pulses instead of the internal > clock source. Better idea: feed the 10MHz input directly into the clock input RCC_OSC_IN and let the STM32 derive its internal clock from that. Doing that, the clock of your timer unit will be phase locked to the 10MHz signal. Then you can use the timer for both capturing the incomming PPS and for generating the 250kHz. The capturing will solve the issue with aliasing. The timer output should have a jitter in the low ps range. There is a bit more going on than you would want in the STM32 for a low noise signal, but most likely not so much as to degrade the output enough to matter. If you are worried about that, you can still add a 7474, with D connected to the STM32 timer output and the CLK to the 10MHz to clean the jitter. But as I said, that's probably not necessary in this case. If you want to create a stabilized output PPS from the STM32, you will need to do some software trickery to align the PPS, as you cannot hope to shift the phase of the Rb in a reasonable time to match up. Attila Kinali -- <JaberWorky> The bad part of Zurich is where the degenerates throw DARK chocolate at you.
MW
Matthias Welwarsky
Tue, Mar 3, 2020 8:57 PM

On Dienstag, 3. März 2020 18:41:43 CET Attila Kinali wrote:

On Tue, 03 Mar 2020 14:42:49 +0100

Matthias Welwarsky time-nuts@welwarsky.de wrote:

In the meantime, I'm thinking of another modification to make: getting rid
of the HC390 ripple counter. I think I might be able to use the STM32 as
a frequency divider. I just have to figure out how to program the timers.
What might work is the following:

  • Feed the 10MHz clock into the external trigger input for the timer,
    configure the timer to count the trigger pulses instead of the internal
    clock  source.

Better idea: feed the 10MHz input directly into the clock input
RCC_OSC_IN and let the STM32 derive its internal clock from that.
Doing that, the clock of your timer unit will be phase locked to
the 10MHz signal. Then you can use the timer for both capturing
the incomming PPS and for generating the 250kHz. The capturing
will solve the issue with aliasing. The timer output should have
a jitter in the low ps range. There is a bit more going on than
you would want in the STM32 for a low noise signal, but most
likely not so much as to degrade the output enough to matter.
If you are worried about that, you can still add a 7474, with
D connected to the STM32 timer output and the CLK to the 10MHz
to clean the jitter. But as I said, that's probably not necessary
in this case.

I have an STM32F042 without FPU and I'm doing a lot of double precision math.
I'm not sure I can spare the 4/5th of the cycles.

If you want to create a stabilized output PPS from the STM32,
you will need to do some software trickery to align the PPS,
as you cannot hope to shift the phase of the Rb in a reasonable
time to match up.

That's not very high on my laundry list.

		Attila Kinali
On Dienstag, 3. März 2020 18:41:43 CET Attila Kinali wrote: > On Tue, 03 Mar 2020 14:42:49 +0100 > > Matthias Welwarsky <time-nuts@welwarsky.de> wrote: > > In the meantime, I'm thinking of another modification to make: getting rid > > of the HC390 ripple counter. I think I might be able to use the STM32 as > > a frequency divider. I just have to figure out how to program the timers. > > What might work is the following: > > > > - Feed the 10MHz clock into the external trigger input for the timer, > > configure the timer to count the trigger pulses instead of the internal > > clock source. > > Better idea: feed the 10MHz input directly into the clock input > RCC_OSC_IN and let the STM32 derive its internal clock from that. > Doing that, the clock of your timer unit will be phase locked to > the 10MHz signal. Then you can use the timer for both capturing > the incomming PPS and for generating the 250kHz. The capturing > will solve the issue with aliasing. The timer output should have > a jitter in the low ps range. There is a bit more going on than > you would want in the STM32 for a low noise signal, but most > likely not so much as to degrade the output enough to matter. > If you are worried about that, you can still add a 7474, with > D connected to the STM32 timer output and the CLK to the 10MHz > to clean the jitter. But as I said, that's probably not necessary > in this case. I have an STM32F042 without FPU and I'm doing a lot of double precision math. I'm not sure I can spare the 4/5th of the cycles. > > If you want to create a stabilized output PPS from the STM32, > you will need to do some software trickery to align the PPS, > as you cannot hope to shift the phase of the Rb in a reasonable > time to match up. That's not very high on my laundry list. > > Attila Kinali
GC
Gilles Clement
Sat, Mar 7, 2020 10:07 AM

Hi,
How do you optimally tune the control loop time constant ?
(Mine gets quite unstable when the update rate is slow - and the amplitude of the change step low - enough not to degrade the OCXO performance )
Is there a method described somewhere (like the Ziegler–Nichols method for PID) ?
Thx,
Gilles.

Le 3 mars 2020 à 18:28, Attila Kinali attila@kinali.ch a écrit :

On Tue, 3 Mar 2020 12:14:37 -0500
Jim Harman j99harman@gmail.com wrote:

I don't understand why you say the DAC should have a resolution of 24-30
bits. I can see that the loop time constant affects the precision needed in
the filter calculations, but what does the time constant have to do with
the needed DAC resolution? We don't have to wait for the whole time
constant before changing the DAC, we can update the filter calculations and
look at its output every second and adjust the DAC whenever the PI filtered
phase error is one DAC step or more.

You do wait the whole time before updating the DAC value.. kind of ish.
The control loop's time constant is exactly that: The time it takes
the control loop for a change in the input to affect the output (very
loosely speaking). Yes, the sample rate at which the loop runs is
much higher, but that doesn't change the fact that the loop is slow
to react. And you want it to be slow to react, as otherwise the high
noise of GPS degrades the performance of your OCXO.

If the OCXO has a tuning range of 1 ppm and we want frequency control
of 1e-12, wouldn't that require a DAC with 1e6 steps or 20 bits,
assuming the DAC covers the full tuning range of the oscillator?

Yes. There is a calculation mistake in there. I corrected it in
the next mail:
http://lists.febo.com/pipermail/time-nuts_lists.febo.com/2019-October/097963.html

		Attila Kinali

--
<JaberWorky> The bad part of Zurich is where the degenerates
throw DARK chocolate at you.


time-nuts mailing list -- time-nuts@lists.febo.com
To unsubscribe, go to http://lists.febo.com/mailman/listinfo/time-nuts_lists.febo.com
and follow the instructions there.

Hi, How do you optimally tune the control loop time constant ? (Mine gets quite unstable when the update rate is slow - and the amplitude of the change step low - enough not to degrade the OCXO performance ) Is there a method described somewhere (like the Ziegler–Nichols method for PID) ? Thx, Gilles. > Le 3 mars 2020 à 18:28, Attila Kinali <attila@kinali.ch> a écrit : > > On Tue, 3 Mar 2020 12:14:37 -0500 > Jim Harman <j99harman@gmail.com> wrote: > >> I don't understand why you say the DAC should have a resolution of 24-30 >> bits. I can see that the loop time constant affects the precision needed in >> the filter calculations, but what does the time constant have to do with >> the needed DAC resolution? We don't have to wait for the whole time >> constant before changing the DAC, we can update the filter calculations and >> look at its output every second and adjust the DAC whenever the PI filtered >> phase error is one DAC step or more. > > You do wait the whole time before updating the DAC value.. kind of ish. > The control loop's time constant is exactly that: The time it takes > the control loop for a change in the input to affect the output (very > loosely speaking). Yes, the sample rate at which the loop runs is > much higher, but that doesn't change the fact that the loop is slow > to react. And you want it to be slow to react, as otherwise the high > noise of GPS degrades the performance of your OCXO. > >> If the OCXO has a tuning range of 1 ppm and we want frequency control >> of 1e-12, wouldn't that require a DAC with 1e6 steps or 20 bits, >> assuming the DAC covers the full tuning range of the oscillator? > > Yes. There is a calculation mistake in there. I corrected it in > the next mail: > http://lists.febo.com/pipermail/time-nuts_lists.febo.com/2019-October/097963.html > > Attila Kinali > > -- > <JaberWorky> The bad part of Zurich is where the degenerates > throw DARK chocolate at you. > > _______________________________________________ > time-nuts mailing list -- time-nuts@lists.febo.com > To unsubscribe, go to http://lists.febo.com/mailman/listinfo/time-nuts_lists.febo.com > and follow the instructions there.
BK
Bob kb8tq
Sat, Mar 7, 2020 1:58 PM

Hi

As far as I know there is no “closed form” solution to tuning a GPSDO.
It is very much a measure / tweak / measure / tweak sort of thing.

That said, there are a lot of basic design constraints that are pretty
well known. Your DAC needs to have a pretty small LSB. Updates
are normally done once a second ( = each time the PPS is measured).

Bob

On Mar 7, 2020, at 5:07 AM, Gilles Clement clemgill@gmail.com wrote:

Hi,
How do you optimally tune the control loop time constant ?
(Mine gets quite unstable when the update rate is slow - and the amplitude of the change step low - enough not to degrade the OCXO performance )
Is there a method described somewhere (like the Ziegler–Nichols method for PID) ?
Thx,
Gilles.

Le 3 mars 2020 à 18:28, Attila Kinali attila@kinali.ch a écrit :

On Tue, 3 Mar 2020 12:14:37 -0500
Jim Harman j99harman@gmail.com wrote:

I don't understand why you say the DAC should have a resolution of 24-30
bits. I can see that the loop time constant affects the precision needed in
the filter calculations, but what does the time constant have to do with
the needed DAC resolution? We don't have to wait for the whole time
constant before changing the DAC, we can update the filter calculations and
look at its output every second and adjust the DAC whenever the PI filtered
phase error is one DAC step or more.

You do wait the whole time before updating the DAC value.. kind of ish.
The control loop's time constant is exactly that: The time it takes
the control loop for a change in the input to affect the output (very
loosely speaking). Yes, the sample rate at which the loop runs is
much higher, but that doesn't change the fact that the loop is slow
to react. And you want it to be slow to react, as otherwise the high
noise of GPS degrades the performance of your OCXO.

If the OCXO has a tuning range of 1 ppm and we want frequency control
of 1e-12, wouldn't that require a DAC with 1e6 steps or 20 bits,
assuming the DAC covers the full tuning range of the oscillator?

Yes. There is a calculation mistake in there. I corrected it in
the next mail:
http://lists.febo.com/pipermail/time-nuts_lists.febo.com/2019-October/097963.html

		Attila Kinali

--
<JaberWorky> The bad part of Zurich is where the degenerates
throw DARK chocolate at you.


time-nuts mailing list -- time-nuts@lists.febo.com
To unsubscribe, go to http://lists.febo.com/mailman/listinfo/time-nuts_lists.febo.com
and follow the instructions there.


time-nuts mailing list -- time-nuts@lists.febo.com
To unsubscribe, go to http://lists.febo.com/mailman/listinfo/time-nuts_lists.febo.com
and follow the instructions there.

Hi As far as I know there is no “closed form” solution to tuning a GPSDO. It is very much a measure / tweak / measure / tweak sort of thing. That said, there are a lot of basic design constraints that are pretty well known. Your DAC needs to have a pretty small LSB. Updates are normally done once a second ( = each time the PPS is measured). Bob > On Mar 7, 2020, at 5:07 AM, Gilles Clement <clemgill@gmail.com> wrote: > > Hi, > How do you optimally tune the control loop time constant ? > (Mine gets quite unstable when the update rate is slow - and the amplitude of the change step low - enough not to degrade the OCXO performance ) > Is there a method described somewhere (like the Ziegler–Nichols method for PID) ? > Thx, > Gilles. > >> Le 3 mars 2020 à 18:28, Attila Kinali <attila@kinali.ch> a écrit : >> >> On Tue, 3 Mar 2020 12:14:37 -0500 >> Jim Harman <j99harman@gmail.com> wrote: >> >>> I don't understand why you say the DAC should have a resolution of 24-30 >>> bits. I can see that the loop time constant affects the precision needed in >>> the filter calculations, but what does the time constant have to do with >>> the needed DAC resolution? We don't have to wait for the whole time >>> constant before changing the DAC, we can update the filter calculations and >>> look at its output every second and adjust the DAC whenever the PI filtered >>> phase error is one DAC step or more. >> >> You do wait the whole time before updating the DAC value.. kind of ish. >> The control loop's time constant is exactly that: The time it takes >> the control loop for a change in the input to affect the output (very >> loosely speaking). Yes, the sample rate at which the loop runs is >> much higher, but that doesn't change the fact that the loop is slow >> to react. And you want it to be slow to react, as otherwise the high >> noise of GPS degrades the performance of your OCXO. >> >>> If the OCXO has a tuning range of 1 ppm and we want frequency control >>> of 1e-12, wouldn't that require a DAC with 1e6 steps or 20 bits, >>> assuming the DAC covers the full tuning range of the oscillator? >> >> Yes. There is a calculation mistake in there. I corrected it in >> the next mail: >> http://lists.febo.com/pipermail/time-nuts_lists.febo.com/2019-October/097963.html >> >> Attila Kinali >> >> -- >> <JaberWorky> The bad part of Zurich is where the degenerates >> throw DARK chocolate at you. >> >> _______________________________________________ >> time-nuts mailing list -- time-nuts@lists.febo.com >> To unsubscribe, go to http://lists.febo.com/mailman/listinfo/time-nuts_lists.febo.com >> and follow the instructions there. > > _______________________________________________ > time-nuts mailing list -- time-nuts@lists.febo.com > To unsubscribe, go to http://lists.febo.com/mailman/listinfo/time-nuts_lists.febo.com > and follow the instructions there.
TP
Tobias Pluess
Sat, Mar 7, 2020 2:35 PM

Hi,
I am sure it is theoretically possible to find an optimal control loop
design if you have accurate models of the OCXO and for the behaviour of the
1PPS pulse.
TvB has written a GPSDO simulator which allows to code different PLL and
control algorithms. I have implemented something similar in Matlab.
Basically, if you know the VCO tuning characteristics and the phase
detector constant, then you can use procedures as described in the PLL
books that are out there (I have ond from R. Best).

But I agree that it is perhaps a very difficult problem -  you cannot
simply try out different algorithms because each time it takes days to wait
until everything has settled and stabilised, then you need to record that
data etc.

Maybe the easiest way is indeed using the GPSDO simulator.
If there is some interest, I could perhaps post my Matlab code. It plots
nicely the calculated EFC voltage and simumates the OCXOs frequency
variation as the EFC is varied.

Best
Tobias
HB9FSX

On Sat., 7 Mar. 2020, 12:36 Gilles Clement, clemgill@gmail.com wrote:

Hi,
How do you optimally tune the control loop time constant ?
(Mine gets quite unstable when the update rate is slow - and the amplitude
of the change step low - enough not to degrade the OCXO performance )
Is there a method described somewhere (like the Ziegler–Nichols method for
PID) ?
Thx,
Gilles.

Le 3 mars 2020 à 18:28, Attila Kinali attila@kinali.ch a écrit :

On Tue, 3 Mar 2020 12:14:37 -0500
Jim Harman j99harman@gmail.com wrote:

I don't understand why you say the DAC should have a resolution of 24-30
bits. I can see that the loop time constant affects the precision

needed in

the filter calculations, but what does the time constant have to do with
the needed DAC resolution? We don't have to wait for the whole time
constant before changing the DAC, we can update the filter calculations

and

look at its output every second and adjust the DAC whenever the PI

filtered

phase error is one DAC step or more.

You do wait the whole time before updating the DAC value.. kind of ish.
The control loop's time constant is exactly that: The time it takes
the control loop for a change in the input to affect the output (very
loosely speaking). Yes, the sample rate at which the loop runs is
much higher, but that doesn't change the fact that the loop is slow
to react. And you want it to be slow to react, as otherwise the high
noise of GPS degrades the performance of your OCXO.

If the OCXO has a tuning range of 1 ppm and we want frequency control
of 1e-12, wouldn't that require a DAC with 1e6 steps or 20 bits,
assuming the DAC covers the full tuning range of the oscillator?

Yes. There is a calculation mistake in there. I corrected it in
the next mail:

                   Attila Kinali

--
<JaberWorky>  The bad part of Zurich is where the degenerates
throw DARK chocolate at you.


time-nuts mailing list -- time-nuts@lists.febo.com
To unsubscribe, go to

and follow the instructions there.


time-nuts mailing list -- time-nuts@lists.febo.com
To unsubscribe, go to
http://lists.febo.com/mailman/listinfo/time-nuts_lists.febo.com
and follow the instructions there.

Hi, I am sure it is theoretically possible to find an optimal control loop design if you have accurate models of the OCXO and for the behaviour of the 1PPS pulse. TvB has written a GPSDO simulator which allows to code different PLL and control algorithms. I have implemented something similar in Matlab. Basically, if you know the VCO tuning characteristics and the phase detector constant, then you can use procedures as described in the PLL books that are out there (I have ond from R. Best). But I agree that it is perhaps a very difficult problem - you cannot simply try out different algorithms because each time it takes days to wait until everything has settled and stabilised, then you need to record that data etc. Maybe the easiest way is indeed using the GPSDO simulator. If there is some interest, I could perhaps post my Matlab code. It plots nicely the calculated EFC voltage and simumates the OCXOs frequency variation as the EFC is varied. Best Tobias HB9FSX On Sat., 7 Mar. 2020, 12:36 Gilles Clement, <clemgill@gmail.com> wrote: > Hi, > How do you optimally tune the control loop time constant ? > (Mine gets quite unstable when the update rate is slow - and the amplitude > of the change step low - enough not to degrade the OCXO performance ) > Is there a method described somewhere (like the Ziegler–Nichols method for > PID) ? > Thx, > Gilles. > > > Le 3 mars 2020 à 18:28, Attila Kinali <attila@kinali.ch> a écrit : > > > > On Tue, 3 Mar 2020 12:14:37 -0500 > > Jim Harman <j99harman@gmail.com> wrote: > > > >> I don't understand why you say the DAC should have a resolution of 24-30 > >> bits. I can see that the loop time constant affects the precision > needed in > >> the filter calculations, but what does the time constant have to do with > >> the needed DAC resolution? We don't have to wait for the whole time > >> constant before changing the DAC, we can update the filter calculations > and > >> look at its output every second and adjust the DAC whenever the PI > filtered > >> phase error is one DAC step or more. > > > > You do wait the whole time before updating the DAC value.. kind of ish. > > The control loop's time constant is exactly that: The time it takes > > the control loop for a change in the input to affect the output (very > > loosely speaking). Yes, the sample rate at which the loop runs is > > much higher, but that doesn't change the fact that the loop is slow > > to react. And you want it to be slow to react, as otherwise the high > > noise of GPS degrades the performance of your OCXO. > > > >> If the OCXO has a tuning range of 1 ppm and we want frequency control > >> of 1e-12, wouldn't that require a DAC with 1e6 steps or 20 bits, > >> assuming the DAC covers the full tuning range of the oscillator? > > > > Yes. There is a calculation mistake in there. I corrected it in > > the next mail: > > > http://lists.febo.com/pipermail/time-nuts_lists.febo.com/2019-October/097963.html > > > > Attila Kinali > > > > -- > > <JaberWorky> The bad part of Zurich is where the degenerates > > throw DARK chocolate at you. > > > > _______________________________________________ > > time-nuts mailing list -- time-nuts@lists.febo.com > > To unsubscribe, go to > http://lists.febo.com/mailman/listinfo/time-nuts_lists.febo.com > > and follow the instructions there. > > _______________________________________________ > time-nuts mailing list -- time-nuts@lists.febo.com > To unsubscribe, go to > http://lists.febo.com/mailman/listinfo/time-nuts_lists.febo.com > and follow the instructions there. >
MW
Matthias Welwarsky
Mon, Mar 9, 2020 2:04 PM

On Samstag, 7. März 2020 15:35:22 CET Tobias Pluess wrote:

Hi,
I am sure it is theoretically possible to find an optimal control loop
design if you have accurate models of the OCXO and for the behaviour of the
1PPS pulse.
TvB has written a GPSDO simulator which allows to code different PLL and
control algorithms. I have implemented something similar in Matlab.
Basically, if you know the VCO tuning characteristics and the phase
detector constant, then you can use procedures as described in the PLL
books that are out there (I have ond from R. Best).

Funny, that was also my approach. I have no idea about control theory or PLL
design so I'm not able to apply any prior knowledge here, but converting
"gpsim1.c" to Matlab (or Octave, in my case) was pretty much straight forward
and having a math toolkit under the bonnet is much more versatile than a C
compiler and runtime.

Maybe the easiest way is indeed using the GPSDO simulator.
If there is some interest, I could perhaps post my Matlab code. It plots
nicely the calculated EFC voltage and simumates the OCXOs frequency
variation as the EFC is varied.

The GPSDO simulator is fine for sanity-checking certain design parameters,
like, if the width of your DAC is sufficient for the LO you're targeting. The
question of "how many bits" you need can be visualized nicely with the
simulator. However, you'll need model data for the GPS and the LO and you have
to be aware that whatever optimal filter and control loop design and
parameters you work out, will have to work outside the limited space your
model data presents.

BR,
Matthias

Best
Tobias
HB9FSX

On Sat., 7 Mar. 2020, 12:36 Gilles Clement, clemgill@gmail.com wrote:

Hi,
How do you optimally tune the control loop time constant ?
(Mine gets quite unstable when the update rate is slow - and the amplitude
of the change step low - enough not to degrade the OCXO performance )
Is there a method described somewhere (like the Ziegler–Nichols method for
PID) ?
Thx,
Gilles.

Le 3 mars 2020 à 18:28, Attila Kinali attila@kinali.ch a écrit :

On Tue, 3 Mar 2020 12:14:37 -0500

Jim Harman j99harman@gmail.com wrote:

I don't understand why you say the DAC should have a resolution of
24-30
bits. I can see that the loop time constant affects the precision

needed in

the filter calculations, but what does the time constant have to do
with
the needed DAC resolution? We don't have to wait for the whole time
constant before changing the DAC, we can update the filter calculations

and

look at its output every second and adjust the DAC whenever the PI

filtered

phase error is one DAC step or more.

You do wait the whole time before updating the DAC value.. kind of ish.
The control loop's time constant is exactly that: The time it takes
the control loop for a change in the input to affect the output (very
loosely speaking). Yes, the sample rate at which the loop runs is
much higher, but that doesn't change the fact that the loop is slow
to react. And you want it to be slow to react, as otherwise the high
noise of GPS degrades the performance of your OCXO.

If the OCXO has a tuning range of 1 ppm and we want frequency control
of 1e-12, wouldn't that require a DAC with 1e6 steps or 20 bits,
assuming the DAC covers the full tuning range of the oscillator?

Yes. There is a calculation mistake in there. I corrected it in

the next mail:

                   Attila Kinali

--
<JaberWorky>  The bad part of Zurich is where the degenerates

            throw DARK chocolate at you.

time-nuts mailing list -- time-nuts@lists.febo.com
To unsubscribe, go to

and follow the instructions there.


time-nuts mailing list -- time-nuts@lists.febo.com
To unsubscribe, go to
http://lists.febo.com/mailman/listinfo/time-nuts_lists.febo.com
and follow the instructions there.


time-nuts mailing list -- time-nuts@lists.febo.com
To unsubscribe, go to
http://lists.febo.com/mailman/listinfo/time-nuts_lists.febo.com and follow
the instructions there.

On Samstag, 7. März 2020 15:35:22 CET Tobias Pluess wrote: > Hi, > I am sure it is theoretically possible to find an optimal control loop > design if you have accurate models of the OCXO and for the behaviour of the > 1PPS pulse. > TvB has written a GPSDO simulator which allows to code different PLL and > control algorithms. I have implemented something similar in Matlab. > Basically, if you know the VCO tuning characteristics and the phase > detector constant, then you can use procedures as described in the PLL > books that are out there (I have ond from R. Best). Funny, that was also my approach. I have no idea about control theory or PLL design so I'm not able to apply any prior knowledge here, but converting "gpsim1.c" to Matlab (or Octave, in my case) was pretty much straight forward and having a math toolkit under the bonnet is much more versatile than a C compiler and runtime. > Maybe the easiest way is indeed using the GPSDO simulator. > If there is some interest, I could perhaps post my Matlab code. It plots > nicely the calculated EFC voltage and simumates the OCXOs frequency > variation as the EFC is varied. The GPSDO simulator is fine for sanity-checking certain design parameters, like, if the width of your DAC is sufficient for the LO you're targeting. The question of "how many bits" you need can be visualized nicely with the simulator. However, you'll need model data for the GPS and the LO and you have to be aware that whatever optimal filter and control loop design and parameters you work out, will have to work outside the limited space your model data presents. BR, Matthias > > Best > Tobias > HB9FSX > > On Sat., 7 Mar. 2020, 12:36 Gilles Clement, <clemgill@gmail.com> wrote: > > Hi, > > How do you optimally tune the control loop time constant ? > > (Mine gets quite unstable when the update rate is slow - and the amplitude > > of the change step low - enough not to degrade the OCXO performance ) > > Is there a method described somewhere (like the Ziegler–Nichols method for > > PID) ? > > Thx, > > Gilles. > > > > > Le 3 mars 2020 à 18:28, Attila Kinali <attila@kinali.ch> a écrit : > > > > > > On Tue, 3 Mar 2020 12:14:37 -0500 > > > > > > Jim Harman <j99harman@gmail.com> wrote: > > >> I don't understand why you say the DAC should have a resolution of > > >> 24-30 > > >> bits. I can see that the loop time constant affects the precision > > > > needed in > > > > >> the filter calculations, but what does the time constant have to do > > >> with > > >> the needed DAC resolution? We don't have to wait for the whole time > > >> constant before changing the DAC, we can update the filter calculations > > > > and > > > > >> look at its output every second and adjust the DAC whenever the PI > > > > filtered > > > > >> phase error is one DAC step or more. > > > > > > You do wait the whole time before updating the DAC value.. kind of ish. > > > The control loop's time constant is exactly that: The time it takes > > > the control loop for a change in the input to affect the output (very > > > loosely speaking). Yes, the sample rate at which the loop runs is > > > much higher, but that doesn't change the fact that the loop is slow > > > to react. And you want it to be slow to react, as otherwise the high > > > noise of GPS degrades the performance of your OCXO. > > > > > >> If the OCXO has a tuning range of 1 ppm and we want frequency control > > >> of 1e-12, wouldn't that require a DAC with 1e6 steps or 20 bits, > > >> assuming the DAC covers the full tuning range of the oscillator? > > > > > > Yes. There is a calculation mistake in there. I corrected it in > > > > > the next mail: > > http://lists.febo.com/pipermail/time-nuts_lists.febo.com/2019-October/0979 > > 63.html> > > > Attila Kinali > > > > > > -- > > > <JaberWorky> The bad part of Zurich is where the degenerates > > > > > > throw DARK chocolate at you. > > > > > > _______________________________________________ > > > time-nuts mailing list -- time-nuts@lists.febo.com > > > To unsubscribe, go to > > > > http://lists.febo.com/mailman/listinfo/time-nuts_lists.febo.com > > > > > and follow the instructions there. > > > > _______________________________________________ > > time-nuts mailing list -- time-nuts@lists.febo.com > > To unsubscribe, go to > > http://lists.febo.com/mailman/listinfo/time-nuts_lists.febo.com > > and follow the instructions there. > > _______________________________________________ > time-nuts mailing list -- time-nuts@lists.febo.com > To unsubscribe, go to > http://lists.febo.com/mailman/listinfo/time-nuts_lists.febo.com and follow > the instructions there.