From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: border2.nntp.dca1.giganews.com!Xl.tags.giganews.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!nntp.earthlink.com!news.earthlink.com.POSTED!not-for-mail NNTP-Posting-Date: Tue, 18 Nov 2014 20:28:54 -0600 From: Dennis Lee Bieber Newsgroups: comp.lang.ada Subject: Re: how to analyze clock drift Date: Tue, 18 Nov 2014 21:28:57 -0500 Organization: IISS Elusive Unicorn Message-ID: <6uun6alsp3jh1pob6g9qgcg85etqgenmd0@4ax.com> References: <87bno4gnuz.fsf@debian.uxu> X-Newsreader: Forte Agent 6.00/32.1186 X-No-Archive: YES MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Usenet-Provider: http://www.giganews.com NNTP-Posting-Host: 108.79.216.34 X-Trace: sv3-VkoVTRroe1ryAhEPeuq+a+JaM9PslEKQ03MLB+yQ32Sy+jCsjwIHMDBUh9t8mLQlMMZY602hwySt5GD!ZACt6XRKD8rarMP1JcqCVXHCM6AySq67isKdLFhhMkDKW8o6KaNaG/Ozjq/o7lSrZmw8ujTGJVcZ!uk7L9mzKyYEsGazO9kiFhmXGgd4= X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 4089 Xref: number.nntp.giganews.com comp.lang.ada:190840 Date: 2014-11-18T21:28:57-05:00 List-Id: On Tue, 18 Nov 2014 23:12:04 +0100, Emanuel Berg declaimed the following: >I have a long list of samples of clock readings. It >"should" be periodical, by 1 ms, but of course it >isn't. The data is in nanoseconds. > By what criteria? That is, how are the readings being produced? An interrupt handler with an external millisecond clock source? A multi-tasking system with variable load, round-robin scheduling? >Anyone knows how I can apply some math/stat method to >find out the average drift, and/or if the drift will >average out, or just about any conclusions you can get >out of the material? > Feed the data to "R" and play around with various commands? (Maybe the ones that run cyclic differences... compare deltas of each pair, each third, etc.) >Also, do you know of any rule-of-thumb how many >readings I will need to make it "good science"? I will >of course tell how many readings were used in the >examination, but what would you say is a good >benchmark were patterns will (almost foolproof) be >visible? > Other than "as many as you can get"... I've never understood how polls work out their "margin of error". >If you know of some tool that'd be great, or some As mentioned - the R system is just made for statistical operations. >The file with the readings looks like this: What defines "truth" -- I see a significant delta between the first two, but small change between 2&3... > >85033101286784 >85033108461718 >85033109544537 >85033110621490 >85033111714366 >85033112794112 >85033113871903 >85033114934049 >85033116009605 >85033117089909 >85033118169656 >85033119256945 >85033120336411 >85033121409174 > >and so on. > >Hope to hear from you Ada real-time experts :) Just some games with Excel... Column 2 is the difference between each original row. Subsequent columns are differences skipping the appropriate number of items. The bottom row is the mean, ignoring the extreme (first difference of the column) 85033101286784 85033108461718 7174934 85033109544537 1082819 -6092115 85033110621490 1076953 -5866 -6097981 85033111714366 1092876 15923 10057 -6082058 85033112794112 1079746 -13130 2793 -3073 -6095188 85033113871903 1077791 -1955 -15085 838 -5028 -6097143 85033114934049 1062146 -15645 -17600 -30730 -14807 -20673 -6112788 85033116009605 1075556 13410 -2235 -4190 -17320 -1397 -7263 -6099378 85033117089909 1080304 4748 18158 2513 558 -12572 3351 -2515 -6094630 85033118169656 1079747 -557 4191 17601 1956 1 -13129 2794 -3072 85033119256945 1087289 7542 6985 11733 25143 9498 7543 -5587 10336 85033120336411 1079466 -7823 -281 -838 3910 17320 1675 -280 -13410 85033121409174 1072763 -6703 -14526 -6984 -7541 -2793 10617 -5028 -6983 1078955 -914 -754 -1459 -1641 -1517 466 -2123 -3282 -- Wulfraed Dennis Lee Bieber AF6VN wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/