Return-Path: Received: (qmail 25826 invoked from network); 14 Feb 2001 20:05:06 -0000 Received: from unknown (HELO murphys-inbound.servers.plus.net) (212.159.14.225) by excalibur.plus.net with SMTP; 14 Feb 2001 20:05:06 -0000 Received: (qmail 20159 invoked from network); 14 Feb 2001 20:05:00 -0000 Content-Transfer-Encoding: 8bit Received: from unknown (HELO post.thorcom.com) (212.172.148.70) by murphys with SMTP; 14 Feb 2001 20:05:00 -0000 X-Priority: 3 X-MSMail-Priority: Normal Received: from majordom by post.thorcom.com with local (Exim 3.16 #1) id 14T84e-0003r1-00 for rsgb_lf_group-outgoing@blacksheep.org; Wed, 14 Feb 2001 19:58:48 +0000 Received: from indyweb.cgocable.ca ([205.151.69.200]) by post.thorcom.com with esmtp (Exim 3.16 #1) id 14T84c-0003qw-00 for rsgb_lf_group@blacksheep.org; Wed, 14 Feb 2001 19:58:47 +0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Received: from 220-176.lr.cgocable.ca (220-176.lr.cgocable.ca [24.226.220.176]) by indyweb.cgocable.ca (8.9.3 (MessagingDirect 1.0.4)/8.9.3) with SMTP id OAA11121645 for ; Wed, 14 Feb 2001 14:58:28 -0500 (EST) Message-ID: <200102141958.OAA11121645@indyweb.cgocable.ca> X-Sender: bill1@cgocable.ca X-Mailer: Windows Eudora Light Version 1.5.2 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Date: Wed, 14 Feb 2001 14:58:28 -0500 To: rsgb_lf_group@blacksheep.org From: "Bill de Carle" Subject: Re: LF: Re: GPS-Disciplined BPSK Precedence: bulk Reply-To: rsgb_lf_group@blacksheep.org X-Listname: rsgb_lf_group Sender: At 05:28 PM 2/14/01 +0100, you wrote: >Bill de Carle wrote: > >> >> When removing jitter from a signal that's accurate over the long term, >> we can do better than just averaging. By letting a counter run (e.g. >> from the oscillator we're trying to discipline) and latching it with the >> 1 PPS signal, we get the number of oscillations that have occurred from >> one second to the next. One approach would be to simply average up a >> bunch of these and say that's the best answer. But if we don't clear >> the counter after each 1PPS latching signal - if we just let the counter >> continue running upwards, then we can use least squares to solve for the >> *slope* of the line. Over any given time period that least squares slope >> solution will give a significantly better result than averaging alone. >> Try it if you don't believe it. >> > >Isn't that a variant of Kalman filtering ? Probably, but I don't know enough about Kalman filtering to be able to state just what the relationship is. My tendency is to try to understand complicated things by comparing them to simpler things, not the other way around :-) Another analogy could be a frequency counter - Say we have an input frequency, f, being counted over a 1-second time window that produces an error in the frequency count of e due to the jitter in the duration of the window. Over 1 second the measured frequency will be f +/- e. If we average up a bunch of these reading the errors will tend to iron out and our answer improves according to the square root of the number of samples averaged. Now let's say we open the gate for 10 seconds. Clearly there will only be one error to deal with and its expected value will still be e. The resulting count will be 10*f +e. Dividing this sum by 10 gives f + e/10. I.e. the error diminishes in direct proportion to the length of the count window. The third approach is to measure the slope of the line by least squares, using 10 equally spaced samples over that 10-second window. We will be processing more data; we have more information; statistically the answer will be closer to the true value than with either of the other methods. Method 2 essentially measures the "slope" by taking only the last reading and dividing by the total elapsed time; any error in that reading gets divided by 10 and appears in the answer. The least squares approach minimizes the sum of the squared errors over the entire line - so the actual value of the error at the end (the last reading) doesn't hurt us as much as it otherwise might. The errors are averaged out. It's easy to check this out on a computer - just use fixed frequency and a random number generator to add a certain amount of "noise" (jitter) to each sample. Make many trials using each of the 3 methods and you will see the least squares regression line method gives the best answers. Bill VE2IQ