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: Tue, 19 Nov 2002 00:35:00 -0000
References: <email@example.com> <firstname.lastname@example.org>
NNTP-Posting-Date: 19 Nov 2002 00:23:35 GMT
X-Newsreader: Microsoft Outlook Express 5.00.2615.200
Tom Bruhns wrote in message
> "John Jardine" wrote in message
> > Tom Bruhns wrote in message
> > news:email@example.com...
> > > Very simple circuit: digitizer, feeding a processor. In the
> > > processor, do a DFT (e.g. Goertzel algorithm) on the frequency you're
> > > interested in. If you run the algorithm on two inputs at the same
> > > time, you can easily get the (apparent) phase difference; you can
> > > pretty easily account for non-simultaneous sampling if you want. I'd
> > > guess pretty much any processor with a hardware multiply could do the
> > > task for audio frequencies, one freq at a time. If you do an FFT
> > > instead of DFT, you can have a whole band of freqs. Depending on the
> > > accuracy you need and the speed, even a built-in 8-bit ADC could be
> > > enough, making for very few parts. Lots of options for the display.
> > Looks interesting. I'd seen (a suggestion of) Goertzel's use wrt
> > LRC meters final phase extraction but had thought the Goertel was just a
> > sharp bandpass filter?. Using say alternate, 'zig zag' sampled signals,
> > does the phase info' present itself?.
> So...there are several questions in there, I guess. First off: you
> can think of the DFT as a filter, and the FFT as a bank of those
> filters at evenly spaced center frequencies. The Goertzel algorithm
> is simply a way to do a DFT which divides the processing up so that
> it's easy to do incrementally as the samples come in; it can look just
> like an IIR biquad section that starts with zero initial conditions.
> So, they are filters that implement a single complex pole pair. The
> poles happen to be exactly on the z-domain unit circle...so they
> effectively have infinite Q. They start at zero energy in the filter,
> and after the appropriate number of samples, you look at the filter
> state and from that you can get an amplitude and phase. Just how you
> interpret the filter state depends on the exact configuration of the
> filter biquad; you could use a "canonical" biquad, but I've found that
> other configurations work better if the input frequency is a small
> fraction of the sample rate. If you have two input waveforms and you
> use a ping-pong sampler, you just need to account for the phase
> difference between samples, in addition to the indicated phase
> difference from the DFT output.
> The "infinite Q" thing is a bit misleading, perhaps. Because you're
> dealing with an input waveform which might be sinusoidal, but is
> chopped off before sample 0 and after sample n-1, the filter has
> effectively added a modulation and thus responds significantly to a
> range of input frequencies, and in fact will have a sin(x)/x spectral
> behavior: the transform of the rectangular modulation.
> I realize there are a lot of details left out. If you do a bit of
> reading about the Goertzel algorithm, you should find that you can
> implement one in a few minutes in a spreadsheet like Excel, to play
> with, so you can test your math. That's what I did before I tried to
> program one in DSP assembly language. Rapidly learned that I needed
> to be sure the filter state variables could hold large enough values!
Tom, thanks for the supporting info.
Just recently I've tried a number of methods for the (precise) extraction of
the phase difference between two signals and from what you have said I think
it's worth giving the Goertzel a 'go'. Yes, the Goertzel routine looks quite
small and it's going to be easy enough to simply programme the thing in
Basic (floating point to start with) and trying out some different
implementations and variables (data sets, sample rates etc) and simply
examine the ensuing numbers.
I've generally found that most of the digital methods out there all seem to
offer some kind of theoretical perfection but when it gets down to the nitty
gritty they start falling apart at the seams due to bedevilment by non
infinite sample rates, imperfect S/N ratios or as you mention, sensitivity
to sample set start/stop points.
I have though had results far better better using digital methods than
anything in the analogue area. I've also found no outright digital winner so
it's simply?! a question of finding an optimum (whole system) method that
does not break my bank.
I've seen the algorithm used in commercial phase modulated modems so in one
sense it has proved itself to be quite effective. The Goertzel may be the
Go Back To The Cyber-Spy.Com
Usenet Web Archive Index Of
The sci.electronics.design Newsgroup