The Cyber-Spy.Com Usenet Archive Feeds Directly
From The Open And Publicly Available Newsgroup
This Group And Thousands Of Others Are Available
On Most IS NNTP News Servers On Port 119.
Cyber-Spy.Com Is NOT Responsible For Any Topic,
Opinions Or Content Posted To This Or Any Other
Newsgroup. This Web Archive Of The Newsgroup And
Posts Are For Informational Purposes Only.
From: "John Jardine"
Subject: Re: Audio Phase meter cct wanted
Date: Wed, 20 Nov 2002 02:33:39 -0000
References: <email@example.com> <firstname.lastname@example.org> <email@example.com>
NNTP-Posting-Date: 20 Nov 2002 02:22:11 GMT
X-Newsreader: Microsoft Outlook Express 5.00.2615.200
Tom Bruhns wrote in message
> So...now that I have you hooked on the basic idea, I'll toss out just
> a bit more info.
> First of all, if you generate your sine wave in the same processor, or
> at least locked to the same clock, you'll be ahead. That way, you can
> get the sine frequency exactly on the DFT's frequency. Interestingly,
> you can use the same algorithm to generate a sine wave; just
> initialize the state variables to values representing the phase and
> amplitude you want. It's possible for roundoff errors to cause the
> amplitude to increase or decay, or the frequency to be slightly off,
> but at least it's one way to do the job. If you have to measure the
> phase between two signals you don't generate, but which you know to be
> from the same original source and therefore the same frequency, then
> it would be helpful to lock the digitization clock to them.
> Next, it can be helpful to sample at exactly 4 times or 8 times the
> input frequency. If you use 4 times, for example, then the phase
> shift between successive samples is just exactly 90 degrees, and in a
> "canonical" biquad, the state variables will be samples of a sine wave
> 90 degrees out of phase. Then it becomes relatively easy to find the
> phase angle of that wave, just the arctangent of the ratio of the two
> state variables. You really start to get into trouble with finite
> precision arithmetic if the number of samples per cycle is large and
> you are using a canonical biquad.
> However, if the freq is low and you want to take more samples to get
> more data to include in your processing, you can set up a little
> different filter topology. One that has worked very well for me is to
> have each state variable be the output of a "digital integrator" which
> implements y(k+1)=c*u(k)+y(k)...just add the scaled input to the
> current value to get the next value. A cascade of two of those stages
> looks very similar to a cascade of two analog integrators, and that's
> the basis of an analog state variable filter. Then you arrange the
> feedback to get the complex pole pair on the unit circle in the
> z-plane...it all ends up looking very much like what you'd do with the
> analog state variable filter to do the same thing. Then the two state
> variables (the digital integrator outputs) are very nearly 90 degrees
> out of phase, for that case of lots of samples per cycle.
> Results: the instruments we build are general purpose vector spectral
> analysis instruments. They work by digitizing the input and
> performing FFTs. They are only digitizing to 14 or 16 bits, but I
> have no trouble displaying stable phase relations down to about a
> millidegree or so, if the inputs are reasonably "clean". So with only
> audio range signals, you can see the difference in length between
> cables feeding the "same" signal to two channels. 10 millidegrees at
> 20kHz, for example, is only about 1.4 nanoseconds. You can generally
> do things like swapping channels and averaging to remove the
> systematic error in the measuring instrument, if your inputs are
> stable. I would expect to be able to do as good at a single frequency
> with an inexpensive stereo delta-sigma ADC and a processor that can
> handle the math fast enough and to enough bits of precision. Guess
> that could all be a PC with a sound card. :-) Doesn't even have to
> be fast if you can do the processing after acquisition of the signal.
> You might even be able to do the math in Excel or Matlab or Scilab.
I feel *The man* himself is divulging here some crown jewels. Tom, you have
aquired massive status, sufficient to cause me to print out your words for
The mere mention of a stable millidegree or so, brings a small but perfectly
formed, tear of emotive pleasure to my eye. If only that life could be so
Yes. All my kit frequencies are locked to each other with a seperate locked
'sampling sync'. The I.F. frequencies (via 2 off DDS's) I am looking at are
a (sub-sampled also) *very* low audio so am taking a whole rake of samples.
Signal processing at the moment is via PC using floating point. I've about 4
FIR's in the signal paths at the moment so the addition of a sharp selector
should fit in the programming loops nicely.
You guys sound to have some lovely work. I'm envious!.
Go Back To The Cyber-Spy.Com
Usenet Web Archive Index Of
The sci.electronics.design Newsgroup