Gents, I have already pointed to this paper http://ipnpr.jpl.nasa.gov/progress_report/42-121/121G.pdf for a number of times but appearantly it is still too less known or too less understood. Its appendix explains completely the necessary signal processing for frequency and phase extraction from a sampled sine using ALL samples. While the paper itself addresses this algo to radio frequencies it naturally works as well at audio frequencies.
Those who are thinking of using a soundcard for serious time nuts applications, say as a phase detector in a double mixer system, may be warned: Not the math is the problem, even the soundcard's clock is easily locked to a stable reference and this even if the soundcard is not prepared for that. The real enemies are there where you won't expect them. If you have never seen the worse impact that even a > 100 dB damped channel to channel crosstalk (a very good value for semi-prof soundcards, bad ones may give you 60 dB or less) has on a tau sigma diagram then you won't believe. Been there, done that. A tau sigma diagram merciless reveals everything that is periodic in time and has a period > Tau0. The combined phase/amplitude modulation that results from sitting of a damped version of one channel's signal on top of the other channel's signal due to crosstalk may be small but the tau sigma diagram will reveal it with umpteen dBs up and down bumps in the graph where you otherwise would have expected a straight line. The position of the first bump is directly related to the beat frequency's period length. When I noticed these artefacts in my real-world measurements it took me quite a time to understand that it was due to crosstalk. In order to find out if crosstalk in such a small amounts could give this big impact I wrote me a piece of software where instead of sampling real world sines two sines were computed and where I could add noise and crosstalk to the signals just as I liked to do. When I set the noise level according to the value that the manufacturer of the soundcard would claim for his product and did the same for the crosstalk then I received EXACTLY the bad artefacts that I had seen in my real world measurements. I have even tried to improve the crosstalk by mathematics. In principle that is easy: If Crosstalk is merely ADDING one signal to another then remove the crosstalk by SUBTRACTING a damped copy of the other channel's signal. But as it is in life: Things that are easy in principle may be a problem in reality. As it turned out the level of the subtracted signal was very difficult to adjust to give a satisfying cancellation of added and subtracted signal. In addition it turned out that the signal due to the crosstalk had a phase delay against the signal in the producing channel. So I needed to construct me not only a damped version but also a phase delayed version of the sampled signal with damping AND phase delay freely setable. And it seemed as if these parameters were slightly changing in time, making necessary a permanent variation of the cancellation parameters. That increased the necessary processing power to a point where the software would not more run stable. Note that Greenhall's paper applies the algo offline to signals which you have been sampled into files while I was going to compute everything online to chunks of data worth one second of samples signals. Best regards Ulrich Bangert > -----Ursprungliche Nachricht----- > Von: time-nuts-boun...@febo.com > [mailto:time-nuts-boun...@febo.com] Im Auftrag von shali...@gmail.com > Gesendet: Donnerstag, 14. Oktober 2010 22:36 > An: Time-Nuts > Betreff: Re: [time-nuts] Question about SoundCard stability? > > > I think that's what Jim is saying. If you try to fit to the > signal using only the zero crossing, it will be hard unless > you have a lot of zero crossing, because you will have only > one point per period to fit to. If you fit 10 or 100 points > per period, you improve your fitting considerably. That > assumes the signal waveform is stable of course. > > Didier > > Sent from my Verizon Wireless BlackBerry > > -----Original Message----- > From: David McClain <d...@refined-audiometrics.com> > Sender: time-nuts-boun...@febo.com > Date: Thu, 14 Oct 2010 00:08:58 > To: Discussion of precise time and frequency > measurement<time-nuts@febo.com> > Reply-To: Discussion of precise time and frequency measurement > <time-nuts@febo.com> > Subject: Re: [time-nuts] Question about SoundCard stability? > > > Or, now that I think about it, it's similar to what we do when > > measuring ADEV.. you can do a crude "how many zero > crossings in the > > time window" or you can do a "fit a sinusoid to a series of ADC > > samples". One has an uncertainty of "one count/epoch", the other > > can be substantially better. > > > How could it be substantially better for the same analysis period? > Unless the frequency under test is an integral number of periods > during the analysis period, you will have a variation in the sine > fitting due to starting phase. > > OTOH, as admonished in Horowitz & Hill, if the frequency to be > counted is substantially below your counter timebase, then > you should > count zero crossings of the higher timebase frequency in the period > of the lower frequency under test. > > Dr. David McClain > Chief Technical Officer > Refined Audiometrics Laboratory > 4391 N. Camino Ferreo > Tucson, AZ 85750 > > email: d...@refined-audiometrics.com > phone: 1.520.390.3995 > web: http://refined-audiometrics.com > > > > On Oct 13, 2010, at 22:30, jimlux wrote: > > > Jim Lux wrote: > >> That's not precisely true. You can get a frequency estimate that > >> is substantially more precise than 1/T if the snr is high. > >> Consider super-resolution in an interferometer which is > >> mathematically similar. What you give up is ambiguity. Probably > >> one of the oldest techniques is that of Prony, but there are lots > >> of others > > > > Or, now that I think about it, it's similar to what we do when > > measuring ADEV.. you can do a crude "how many zero > crossings in the > > time window" or you can do a "fit a sinusoid to a series of ADC > > samples". One has an uncertainty of "one count/epoch", the other > > can be substantially better. > > > > > > _______________________________________________ > > time-nuts mailing list -- time-nuts@febo.com > > To unsubscribe, go to > https://www.febo.com/cgi-bin/mailman/listinfo/ > > time-nuts > > and follow the instructions there. > > > > _______________________________________________ > time-nuts mailing list -- time-nuts@febo.com > To unsubscribe, go to > https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts > and follow the instructions there. > _______________________________________________ > time-nuts mailing list -- time-nuts@febo.com > To unsubscribe, go to > https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts > and follow the instructions there. _______________________________________________ time-nuts mailing list -- time-nuts@febo.com To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts and follow the instructions there.