Author Topic: Any mathematicians in the house?  (Read 2002 times)

0 Members and 1 Guest are viewing this topic.

Offline purposeTopic starter

  • Frequent Contributor
  • **
  • Posts: 282
  • Country: gb
Any mathematicians in the house?
« on: June 24, 2021, 01:54:48 pm »
Afternoon all,

Mathematics is a language that I've never been able to master.

I'm trying to find the frequency difference between two 10MHz sine waves, without an accurate counter.
One is from my ghetto gpsdo and the other from one of those cheap Chinese pll gpsdos.

Triggering on the ghetto, the pll gpsdo is wandering one 50ns division on the scope in 120 seconds.
My tiny mind can't wrap my head around where to begin.

Any guesses, or formulas welcome.

Cheers
Peter
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21606
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Any mathematicians in the house?
« Reply #1 on: June 24, 2021, 02:03:21 pm »
So it's drifting 50ns/120s = 0.42 ppb, or times 10MHz, a difference of 4mHz?  Just simple ratios.  For such a small difference, it won't much matter which one is being measured, but you'll need to know which one is leading/lagging to find which one is higher/lower.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 
The following users thanked this post: purpose

Offline purposeTopic starter

  • Frequent Contributor
  • **
  • Posts: 282
  • Country: gb
Re: Any mathematicians in the house?
« Reply #2 on: June 24, 2021, 02:15:34 pm »
So it's drifting 50ns/120s = 0.42 ppb, or times 10MHz, a difference of 4mHz?  Just simple ratios.  For such a small difference, it won't much matter which one is being measured, but you'll need to know which one is leading/lagging to find which one is higher/lower.

Tim

Tim, many thanks and may you live for a thousand years.
4mHz I can live with. Had it been 5, I would have to abandon my project and take up knitting.
Which one is leading... A question for another time.

Cheers
Peter
 

Online radiolistener

  • Super Contributor
  • ***
  • Posts: 3281
  • Country: ua
Re: Any mathematicians in the house?
« Reply #3 on: June 25, 2021, 03:39:22 am »
I'm trying to find the frequency difference between two 10MHz sine waves, without an accurate counter.

What results do you need?

Value in Hz?

Or maybe analog voltage which indicate the difference between two sine waves from separate sources? Such way with voltage difference is used for a fine tuning low noise VCXO by a more stable reference clock. In such way you can use less noise oscillator and still keep frequency stability on it with help of stable but more noisy reference
« Last Edit: June 25, 2021, 03:44:35 am by radiolistener »
 
The following users thanked this post: purpose

Online radiolistener

  • Super Contributor
  • ***
  • Posts: 3281
  • Country: ua
Re: Any mathematicians in the house?
« Reply #4 on: June 25, 2021, 03:52:01 am »
Any guesses, or formulas welcome.

If you multiply two sources in a time domain on DSP it will be equals to a frequency shift in a frequency domain.

For example:

cos(2πf1t) ∙ cos(2πf2t) = 0.5 cos[2π(f2 − f1)t] + 0.5 cos[2π(f2 + f1)t]

where
f1 - frequency of source 1
f2 - frequency of source 2

you can use it to get the difference between two source.

The main issue here is that we have sum of two components f2-f1 and f2+f1 and they are mirrored from a 0 Hz, because there is no negative frequency in real world (no way to see the direction of vector rotation in quadrature if you have just a single projection on the axis) and negative frequencies are folded on positive.

This is why you can listen mirror channels on the receiver. But you can avoid such frequency mirrors agains 0 Hz border if you use multiplication for a signals represented in a quadrature because it allows to keep information about negative frequencies.

Read this article for details: https://www.dsprelated.com/showarticle/192.php
« Last Edit: June 25, 2021, 04:12:56 am by radiolistener »
 
The following users thanked this post: purpose

Offline sarbog

  • Contributor
  • Posts: 30
  • Country: us
Re: Any mathematicians in the house?
« Reply #5 on: June 25, 2021, 04:18:36 am »
From  Trigonometry  if you multiply two sine waves together you will get the sum  and  difference  frequency sine waves and  the original   but  they are all the  same.  What  are you trying  to  do?
 
The following users thanked this post: purpose

Offline purposeTopic starter

  • Frequent Contributor
  • **
  • Posts: 282
  • Country: gb
Re: Any mathematicians in the house?
« Reply #6 on: June 25, 2021, 11:30:35 am »
What results do you need?

Value in Hz?

Or maybe analog voltage which indicate the difference between two sine waves from separate sources? Such way with voltage difference is used for a fine tuning low noise VCXO by a more stable reference clock. In such way you can use less noise oscillator and still keep frequency stability on it with help of stable but more noisy reference

Mr. Radiolistener,
I wanted to know how frequency accurate my ghetto gpsdo (without expensive OCXO) was compared to something commercially available. Both sine waves were input to the scope and observed.
It turns out that 4mHz was the answer, even though clear skies (with two different antennas) improved the result to an almost perfect lock between the two.
As for using one to tune the other.... You're getting into the realms of making me use my brain. I haven't done that in years.

Many thanks
Peter
 

Offline purposeTopic starter

  • Frequent Contributor
  • **
  • Posts: 282
  • Country: gb
Re: Any mathematicians in the house?
« Reply #7 on: June 25, 2021, 11:35:26 am »

cos(2πf1t) ∙ cos(2πf2t) = 0.5 cos[2π(f2 − f1)t] + 0.5 cos[2π(f2 + f1)t]


Sir,
The title of this thread precludes me from even looking at that.
I know I asked for it, but you really didn't have to.

Confused
Peter
« Last Edit: June 25, 2021, 11:50:59 am by purpose »
 

Offline purposeTopic starter

  • Frequent Contributor
  • **
  • Posts: 282
  • Country: gb
Re: Any mathematicians in the house?
« Reply #8 on: June 25, 2021, 11:41:31 am »
From  Trigonometry  if you multiply two sine waves together you will get the sum  and  difference  frequency sine waves and  the original   but  they are all the  same.  What  are you trying  to  do?

Mr. Sarbog,

I would also like to avoid any kind of arithmetic.

I'm just trying to make a gpsdo without spending a fortune. Turns out that by spending a fortune, you can make something cheap.

Cheers
Peter
 

Offline ejeffrey

  • Super Contributor
  • ***
  • Posts: 3683
  • Country: us
Re: Any mathematicians in the house?
« Reply #9 on: June 25, 2021, 02:46:07 pm »
Make sure to observe it over time.  Very long term  two correctly functioning gpsdo should ideally have zero frequency offset.  They may wander quite a bit over shorter periods in either direction. You want to make sure your 0.4 ppb is representative
 
The following users thanked this post: purpose

Offline purposeTopic starter

  • Frequent Contributor
  • **
  • Posts: 282
  • Country: gb
Re: Any mathematicians in the house?
« Reply #10 on: June 25, 2021, 03:50:32 pm »
Make sure to observe it over time.  Very long term  two correctly functioning gpsdo should ideally have zero frequency offset.  They may wander quite a bit over shorter periods in either direction. You want to make sure your 0.4 ppb is representative

Thanks, Mr. ejeffrey.
From my observations so far, the clearer the sky, the less drift. Still minor when overcast.
I'm guessing that the pll gpsdo (with an ocxo from 2009) is the drifter, but I merely wanted to verify the accuracy of my ghetto contraption.
The ghetto has a LEA M8T gnss timing chip and the pll gpsdo purportedly has a NEO M7N. Both gnss capable, but getting info from the pll gpsdo does not appear to be straightforward.

Cheers
Peter

P.S. Right now it is taking about five minutes to transition 50ns.
« Last Edit: June 25, 2021, 04:09:54 pm by purpose »
 

Offline Miti

  • Super Contributor
  • ***
  • Posts: 1320
  • Country: ca
Re: Any mathematicians in the house?
« Reply #11 on: June 26, 2021, 09:26:01 pm »
If they drift relative to each other, you have one or two GPS and O but you’re missing the D in between the two.
Fear does not stop death, it stops life.
 

Offline purposeTopic starter

  • Frequent Contributor
  • **
  • Posts: 282
  • Country: gb
Re: Any mathematicians in the house?
« Reply #12 on: June 26, 2021, 10:23:46 pm »
The D fell into the carpet and disappeared.
 

Offline purposeTopic starter

  • Frequent Contributor
  • **
  • Posts: 282
  • Country: gb
Re: Any mathematicians in the house?
« Reply #13 on: June 26, 2021, 11:06:55 pm »
How about 2 ghettos...
Slight movement to and fro (roughly 15ns either side), but not continuously in one direction as with the pll.
Had to invert one waveform.

« Last Edit: June 26, 2021, 11:27:34 pm by purpose »
 

Offline Miti

  • Super Contributor
  • ***
  • Posts: 1320
  • Country: ca
Re: Any mathematicians in the house?
« Reply #14 on: June 27, 2021, 01:09:54 am »
Now you found the D in the GPSDO... :-DD
Fear does not stop death, it stops life.
 

Offline purposeTopic starter

  • Frequent Contributor
  • **
  • Posts: 282
  • Country: gb
Re: Any mathematicians in the house?
« Reply #15 on: June 27, 2021, 01:19:42 am »
Now you found the D in the GPSDO... :-DD

I did... It fell into the dog.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf