Reply by John Sampson September 28, 20042004-09-28
see_my_signature_for_my_real_address@hotmail.com (Dr. David Kirkby) wrote in message news:<c99d2c79.0409280456.690f3b60@posting.google.com>...
> "Clay Turner" <physics@bellsouth.net> wrote in message news:<4TV5d.190$bq6.7@bignews1.bellsouth.net>... > > Hello David, > > > > You actually gave a very important piece of info in the last post. Namely > > you state there is only one frequency source in the system. > > Okay, that is out of the way > > > So basically you > > are taking your source signal and feeding it into a box/device and this > > device adds a phase shift to the origianal signal. You just now wish to find > > that phase shift. Since the system is coherent, then you can integrate over > > vary long periods of time without worry about the allen variance of the > > frequency source. That is what some of the other posters were trying to get > > at. Since the spectral spreading is narrow, then just band pass your noisey > > signal and use a pair of radios (having a common reference oscillator) to > > mix both the original and phase shifted sine waves down to a low frequency > > like 25 kHz. At this low frequency you can sample the two signals and simply > > calculate a relative phase shift.While not immediately obvious, the > > heterodyne process preserves the phase shift info. You can show this with a > > little trig. > > > > IHTH, > > Clay > > I know what you mean - at least I think I do! > > We have built systems like this before using analogue components. If > you mean what I think you mean, there is an example in my PhD thesis > in figure 1.16 on page 64. > > (see page 35, in the pdf file of just chapter 1). > > http://www.medphys.ucl.ac.uk/research/borl/homepages/davek/phd/chapter1.pdf > > Is that what you mean? That certainly works, but there has always been > some problems with cross talk between the amplitude and phase of the > signal, so the phase you measure depends on the ampllitude too. > Although this would not be so for an ideal mixer, it is in practice. > > An even simpler way is just to feed the two signals diretly into an IQ > demondulator. But that is inherently not very stable, drifting with > temperature somewhat. I expect its possible to build an IQ demodulator > using a DSP, but the undersampling issue is bothering me, since I will > be unable to sample at twice the frequency of the signal, but I can > easily sample at twice the bandwidth of the signal. > > The aim of this reserach project is to attempt the phase measurment by > direct sampling of the RF signal. This may or may not be better than > other methods, but it is the plan here, to investigate that. We have > investigated other techniques, and are aware of their limitions, so > wish to look at a fully digitial system, with no analogue mixers. > > > Dr. David Kirkby. > > > > > > > > > > > "Dr. David Kirkby" <see_my_signature_for_my_real_address@hotmail.com> wrote > > in message news:c99d2c79.0409250141.7efafb@posting.google.com... > > > Steve Underwood <steveu@dis.org> wrote in message > news:<cj083o$4lp$1@home.itg.ti.com>... > > > > Hi David, > > > > > > > > It seems like you still haven't really defined the problem. What are you > > > > really trying to measure? > > > > > > Okay, I have a clean sine wave > > > > > > S1 = A + B * sin(2*pi*70*1e6 t ) > > > > > > which is my reference signal. After various bits of electronics and my > > > device under tests, I end up with a singnal > > > > > > S2 = C + D * sin(2*pi*70*1e6 t - phi) > > > > > > phi can be anyhere between 0 and 360 degrees, but it will never vary > > > by more than about 5 degrees from one device under test to another. So > > > by adjusting the lengths of a cable once, I can always get phi to be > > > some sensible value, that will never cross quadrants. > > > > > > > > > > Just saying phase difference is a bit vague. I > > > > assume the reference signal is a rock solid, fairly clean, signal. > > > > > > The reference will be directly from a high spec signal generator. > > > > > > > How > > > > much different is the frequency of the other signal? > > > > > > Since the two signals come from the one source, they should be at the > > > same frequency. For now at least, I will assume there is no spectral > > > spread due to the device under test occuring. > > > > > > > Is the noise causing significant spectral spread > > > > (i.e. is it phase modulating the signal to any extent, or is the noise > > > > purely additive?) > > > There are 3 answers to this one - a short answer, long answer and a > > > very long answer. I won't bother with the last !! > > > > > > SHORT ANSWER - The noise is very signiificant, so ideally I do want an > > > algorithm that is as robust to noise as possible. > > > > > > > > > LONG ANSWER - To describe the reasons, effects, cures for this would > > > take forever, but it was covered in some depth on the thread 'How can > > > you tell if a system is oscillating?' which I started some time back > > > on sci.electronics.design. > > > > > > > http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&threadm=c99d2c79.0409141618.510b730b%40posting.google.com&rnum=1&prev=/groups%3Fq%3Dkirkby%2Boscillating%26hl%3Den%26lr%3D%26ie%3DUTF-8%26selm%3Dc99d2c79.0409141618.510b730b%2540posting.google.com%26rnum%3D1 > > > > > > If I look on a 100 MHz oscilloscope, I can't even see the signal - it > > > is below the noise. > > > > > > But if I look on a specutrum analyser, and narrow the scan down to 10 > > > kHz (say looking at 69.995 to 70.005 MHz), using a filter bandwidth of > > > about 100 Hz, the signal is some 20 dB or 30 dB above the noise floor > > > of the spectrum analyser. (I'm taking all these numbers off the top of > > > my head as my lab books are at work). > > > > > > Essentailly, the scope is looking at some of filtered noise (centre = > > > 70 MHz, bandwidth = 30 MHz) in addition to my signal at precisely > > > 70.0000000 MHz. Whereas the spectrum analyser is looking only over a > > > narrow bandwidth, so does not see anywhere near as much noise. > > > > > > I could replace the 30 MHz width LC band-pass filter and replce it > > > with a crystal filter that is 3 KHz wide and reduce the noise by some > > > 40 dB. Whether or not that is benificinal or not obvious. Since all it > > > will do is remove noise at frequencies where my signal does not exist, > > > and will have no effect on the S/N at the frequency of interest. > > > > > > > What is the close in phase noise performance of your > > > > reference like? > > > > > > Don't know off hand, but it will be a high spec osciallator. > > > > > > > More generally, how spectrally pure is either signal? > > > > Most importantly, what precision do you need in your answers, and how > > > > rapidly must they update? > > > > > > See notes above about signal. I need answers about every 10 s, and > > > ideally to 0.1 degree. > > > > > > > As others have said, quick rough and ready answers are not hard to > > > > achieve. If you want responsiveness and great precision it becomes a > > > > rather different problem. > > > > > > Responsiveness is not important. Perhaps later there might be some > > > point in collecting data every 10 ms, but for now, making a on-off > > > measurment in 10 s will do. > > > > > > Dr. David Kirkby. > > > > > > > Regards, > > > > Steve > > > > > > > > > > > > Dr. David Kirkby wrote: > > > > > > > > >r.lyons@_BOGUS_ieee.org (Rick Lyons) wrote in message > news:<414ee168.397898125@news.sf.sbcglobal.net>... > > > > > > > > > > > > > > >>On 20 Sep 2004 04:56:21 -0700, > > > > >>see_my_signature_for_my_real_address@hotmail.com (Dr. David Kirkby) > > > > >>wrote: > > > > >> > > > > >> > > > > >> > > > > >>>I have two 70 MHz signals (one a clean reference sine wave, the other > > > > >>>a lot less so), but wish to find the phase difference between these > > > > >>>two signals. > > > > >>> > > > > >>>The A/D, the AD9226: > > > > >>> > > > > >>>http://www.analog.com/UploadedFiles/Data_Sheets/394988775AD9226_b.pdf > > > > >>> > > > > >>>has a maximum sampling rate of 65 MSPS, but is rated for a maximum > of > > > > >>>200 MHz input. Hence the A/D is suitable for use in undersampling > > > > >>>applications. > > > > >>> > > > > >>>Has anyone any experience of, or references to, measuring phase with > > > > >>>such a system -i.e. where the signal is undersampled? > > > > >>>Dr. David Kirkby > > > > >>> > > > > >>> > > > > >>Hi Dr. Kirkby, > > > > >> > > > > >> uh oh, ... this problem may be much more difficult > > > > >>than it first appears. > > > > >> > > > > >> > > > > > > > > > >Just what I did not want to hear!! > > > > > > > > > > > > > > > > > > > >>Here are my two cents: > > > > >>I wouldn't use the FFT. The phase difference between > > > > >>your two signals will be a time-dependent function. > > > > >> > > > > >> > > > > > > > > > >I assume you mean since the sample rate is not the same as the signal > > > > >frequency? > > > > > > > > > > > > > > > > > > > >>Using the FFT results in a horrifying lose of > > > > >>time resolution. My guess is that your processing > > > > >>should be strictly time-domain processing. > > > > >> > > > > >> > > > > > > > > > >Okay. I was starging to wonder this myself. > > > > > > > > > > > > > > > > > > > >>What occurs to me is that you can perform the > > > > >>Hilbert transform on your two discrete > > > > >>signals, and create two "analytic (I/Q) versions > > > > >>of your two signals. In their analytic form, you > > > > >>can then estimate their instantaneous phases. > > > > >> > > > > >> > > > > > > > > > >Can you elaborate a bit more - maths never was my strongest subject. > > > > >One problem is now do you get an analytic function from a sampled data > > > > >set? > > > > > > > > > > > > > > > > > > > >>Finally, you can compute the instantaneous difference > > > > >>between the two phase signals. > > > > >> > > > > >> > > > > > > > > > > > > > > > > > > > >>The problem is, accurately estimating the > > > > >>instantaneous phase of an analytic signal requires > > > > >>us to perform that dog-gonned > > > > >>(computationally costly) arctangent operation. > > > > >> > > > > >> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >>Now if your phase difference need not be too > > > > >>accurate (like say, a 4-degree error), there > > > > >>may be computationally-simple ways to estimate > > > > >>instantaneous phase. > > > > >> > > > > >> > > > > > > > > > >It does need to be accurate. > > > > > > > > > > > > > > > > > > > >>Hey wait a second! I just had another thought. > > > > >>Perhaps the "Sliding DFT" might be useful to > > > > >>you. That DFT allows you to compute > > > > >>single-bin DFT samples. The nice part is that > > > > >>upon arrival of a new time sample, the new single-bin > > > > >>DFT sample can be computed with (roughly) > > > > >>a half dozen arithmetic operations. > > > > >> > > > > >> > > > > > > > > > >Em, something else for me to look into. I don't know anything about > > > > >the sliding DFT. > > > > > > > > > > > > > > > > > > > >>It's quite possible that someone else here > > > > >>can give you a simpler way to measure the phase > > > > >>difference between your two signals. > > > > >> > > > > >> > > > > > > > > > >If they can, it would be appreciated. I was led to belive this would > > > > >be easy using the FFT, but now I am not so sure, since as you say, the > > > > >phase will be a time varying function of time. > > > > > > > > > > > > > > > > > > > >>Good Luck, > > > > >>[-Rick-] > > > > >> > > > > >>
If it can be arranged that the ADC sample clock reference is coherent with the RF reference and the test signal, the drift problem can be totally eliminated, and the digital frequency of the test signal is known exactly. Then it should be possible to use an FFT to determine the phase shift of the test signal directly. Or, if you prefer, the frequency of interest can be mixed down to DC while applying a filter and decimator (basically a digital downconversion process, see www.graychip.com). This can be done in software. Then a smaller complex FFT can be used to zero in on the phase of the test signal, which will lie in the center of a bin. The impact of undersampling is to increase the phase noise on the signal beyond that which is inherent in the reference. The extra noise is a function of the aperture jitter of the ADC and the analog frequency of the test signal. This occurs even without undersampling, but it isn't as bad because the test signal changes more slowly in a sample period. If the RF electronics use a PLL to generate a local oscillator that is coherent with the reference, then there can be a phase ambiguity depending on which zero crossing the PLL locks onto. John
Reply by Dr. David Kirkby September 28, 20042004-09-28
"Clay Turner" <physics@bellsouth.net> wrote in message news:<4TV5d.190$bq6.7@bignews1.bellsouth.net>...
> Hello David, > > You actually gave a very important piece of info in the last post. Namely > you state there is only one frequency source in the system.
Okay, that is out of the way
> So basically you > are taking your source signal and feeding it into a box/device and this > device adds a phase shift to the origianal signal. You just now wish to find > that phase shift. Since the system is coherent, then you can integrate over > vary long periods of time without worry about the allen variance of the > frequency source. That is what some of the other posters were trying to get > at. Since the spectral spreading is narrow, then just band pass your noisey > signal and use a pair of radios (having a common reference oscillator) to > mix both the original and phase shifted sine waves down to a low frequency > like 25 kHz. At this low frequency you can sample the two signals and simply > calculate a relative phase shift.While not immediately obvious, the > heterodyne process preserves the phase shift info. You can show this with a > little trig. > > IHTH, > Clay
I know what you mean - at least I think I do! We have built systems like this before using analogue components. If you mean what I think you mean, there is an example in my PhD thesis in figure 1.16 on page 64. (see page 35, in the pdf file of just chapter 1). http://www.medphys.ucl.ac.uk/research/borl/homepages/davek/phd/chapter1.pdf Is that what you mean? That certainly works, but there has always been some problems with cross talk between the amplitude and phase of the signal, so the phase you measure depends on the ampllitude too. Although this would not be so for an ideal mixer, it is in practice. An even simpler way is just to feed the two signals diretly into an IQ demondulator. But that is inherently not very stable, drifting with temperature somewhat. I expect its possible to build an IQ demodulator using a DSP, but the undersampling issue is bothering me, since I will be unable to sample at twice the frequency of the signal, but I can easily sample at twice the bandwidth of the signal. The aim of this reserach project is to attempt the phase measurment by direct sampling of the RF signal. This may or may not be better than other methods, but it is the plan here, to investigate that. We have investigated other techniques, and are aware of their limitions, so wish to look at a fully digitial system, with no analogue mixers. Dr. David Kirkby.
> > > > > "Dr. David Kirkby" <see_my_signature_for_my_real_address@hotmail.com> wrote > in message news:c99d2c79.0409250141.7efafb@posting.google.com... > > Steve Underwood <steveu@dis.org> wrote in message > news:<cj083o$4lp$1@home.itg.ti.com>... > > > Hi David, > > > > > > It seems like you still haven't really defined the problem. What are you > > > really trying to measure? > > > > Okay, I have a clean sine wave > > > > S1 = A + B * sin(2*pi*70*1e6 t ) > > > > which is my reference signal. After various bits of electronics and my > > device under tests, I end up with a singnal > > > > S2 = C + D * sin(2*pi*70*1e6 t - phi) > > > > phi can be anyhere between 0 and 360 degrees, but it will never vary > > by more than about 5 degrees from one device under test to another. So > > by adjusting the lengths of a cable once, I can always get phi to be > > some sensible value, that will never cross quadrants. > > > > > > > Just saying phase difference is a bit vague. I > > > assume the reference signal is a rock solid, fairly clean, signal. > > > > The reference will be directly from a high spec signal generator. > > > > > How > > > much different is the frequency of the other signal? > > > > Since the two signals come from the one source, they should be at the > > same frequency. For now at least, I will assume there is no spectral > > spread due to the device under test occuring. > > > > > Is the noise causing significant spectral spread > > > (i.e. is it phase modulating the signal to any extent, or is the noise > > > purely additive?) > > There are 3 answers to this one - a short answer, long answer and a > > very long answer. I won't bother with the last !! > > > > SHORT ANSWER - The noise is very signiificant, so ideally I do want an > > algorithm that is as robust to noise as possible. > > > > > > LONG ANSWER - To describe the reasons, effects, cures for this would > > take forever, but it was covered in some depth on the thread 'How can > > you tell if a system is oscillating?' which I started some time back > > on sci.electronics.design. > > > > > http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&threadm=c99d2c79.0409141618.510b730b%40posting.google.com&rnum=1&prev=/groups%3Fq%3Dkirkby%2Boscillating%26hl%3Den%26lr%3D%26ie%3DUTF-8%26selm%3Dc99d2c79.0409141618.510b730b%2540posting.google.com%26rnum%3D1 > > > > If I look on a 100 MHz oscilloscope, I can't even see the signal - it > > is below the noise. > > > > But if I look on a specutrum analyser, and narrow the scan down to 10 > > kHz (say looking at 69.995 to 70.005 MHz), using a filter bandwidth of > > about 100 Hz, the signal is some 20 dB or 30 dB above the noise floor > > of the spectrum analyser. (I'm taking all these numbers off the top of > > my head as my lab books are at work). > > > > Essentailly, the scope is looking at some of filtered noise (centre = > > 70 MHz, bandwidth = 30 MHz) in addition to my signal at precisely > > 70.0000000 MHz. Whereas the spectrum analyser is looking only over a > > narrow bandwidth, so does not see anywhere near as much noise. > > > > I could replace the 30 MHz width LC band-pass filter and replce it > > with a crystal filter that is 3 KHz wide and reduce the noise by some > > 40 dB. Whether or not that is benificinal or not obvious. Since all it > > will do is remove noise at frequencies where my signal does not exist, > > and will have no effect on the S/N at the frequency of interest. > > > > > What is the close in phase noise performance of your > > > reference like? > > > > Don't know off hand, but it will be a high spec osciallator. > > > > > More generally, how spectrally pure is either signal? > > > Most importantly, what precision do you need in your answers, and how > > > rapidly must they update? > > > > See notes above about signal. I need answers about every 10 s, and > > ideally to 0.1 degree. > > > > > As others have said, quick rough and ready answers are not hard to > > > achieve. If you want responsiveness and great precision it becomes a > > > rather different problem. > > > > Responsiveness is not important. Perhaps later there might be some > > point in collecting data every 10 ms, but for now, making a on-off > > measurment in 10 s will do. > > > > Dr. David Kirkby. > > > > > Regards, > > > Steve > > > > > > > > > Dr. David Kirkby wrote: > > > > > > >r.lyons@_BOGUS_ieee.org (Rick Lyons) wrote in message > news:<414ee168.397898125@news.sf.sbcglobal.net>... > > > > > > > > > > > >>On 20 Sep 2004 04:56:21 -0700, > > > >>see_my_signature_for_my_real_address@hotmail.com (Dr. David Kirkby) > > > >>wrote: > > > >> > > > >> > > > >> > > > >>>I have two 70 MHz signals (one a clean reference sine wave, the other > > > >>>a lot less so), but wish to find the phase difference between these > > > >>>two signals. > > > >>> > > > >>>The A/D, the AD9226: > > > >>> > > > >>>http://www.analog.com/UploadedFiles/Data_Sheets/394988775AD9226_b.pdf > > > >>> > > > >>>has a maximum sampling rate of 65 MSPS, but is rated for a maximum > of > > > >>>200 MHz input. Hence the A/D is suitable for use in undersampling > > > >>>applications. > > > >>> > > > >>>Has anyone any experience of, or references to, measuring phase with > > > >>>such a system -i.e. where the signal is undersampled? > > > >>>Dr. David Kirkby > > > >>> > > > >>> > > > >>Hi Dr. Kirkby, > > > >> > > > >> uh oh, ... this problem may be much more difficult > > > >>than it first appears. > > > >> > > > >> > > > > > > > >Just what I did not want to hear!! > > > > > > > > > > > > > > > >>Here are my two cents: > > > >>I wouldn't use the FFT. The phase difference between > > > >>your two signals will be a time-dependent function. > > > >> > > > >> > > > > > > > >I assume you mean since the sample rate is not the same as the signal > > > >frequency? > > > > > > > > > > > > > > > >>Using the FFT results in a horrifying lose of > > > >>time resolution. My guess is that your processing > > > >>should be strictly time-domain processing. > > > >> > > > >> > > > > > > > >Okay. I was starging to wonder this myself. > > > > > > > > > > > > > > > >>What occurs to me is that you can perform the > > > >>Hilbert transform on your two discrete > > > >>signals, and create two "analytic (I/Q) versions > > > >>of your two signals. In their analytic form, you > > > >>can then estimate their instantaneous phases. > > > >> > > > >> > > > > > > > >Can you elaborate a bit more - maths never was my strongest subject. > > > >One problem is now do you get an analytic function from a sampled data > > > >set? > > > > > > > > > > > > > > > >>Finally, you can compute the instantaneous difference > > > >>between the two phase signals. > > > >> > > > >> > > > > > > > > > > > > > > > >>The problem is, accurately estimating the > > > >>instantaneous phase of an analytic signal requires > > > >>us to perform that dog-gonned > > > >>(computationally costly) arctangent operation. > > > >> > > > >> > > > > > > > > > > > > > > > > > > > > > > > >>Now if your phase difference need not be too > > > >>accurate (like say, a 4-degree error), there > > > >>may be computationally-simple ways to estimate > > > >>instantaneous phase. > > > >> > > > >> > > > > > > > >It does need to be accurate. > > > > > > > > > > > > > > > >>Hey wait a second! I just had another thought. > > > >>Perhaps the "Sliding DFT" might be useful to > > > >>you. That DFT allows you to compute > > > >>single-bin DFT samples. The nice part is that > > > >>upon arrival of a new time sample, the new single-bin > > > >>DFT sample can be computed with (roughly) > > > >>a half dozen arithmetic operations. > > > >> > > > >> > > > > > > > >Em, something else for me to look into. I don't know anything about > > > >the sliding DFT. > > > > > > > > > > > > > > > >>It's quite possible that someone else here > > > >>can give you a simpler way to measure the phase > > > >>difference between your two signals. > > > >> > > > >> > > > > > > > >If they can, it would be appreciated. I was led to belive this would > > > >be easy using the FFT, but now I am not so sure, since as you say, the > > > >phase will be a time varying function of time. > > > > > > > > > > > > > > > >>Good Luck, > > > >>[-Rick-] > > > >> > > > >>
Reply by Clay Turner September 27, 20042004-09-27
Hello David,

You actually gave a very important piece of info in the last post. Namely
you state there is only one frequency source in the system. So basically you
are taking your source signal and feeding it into a box/device and this
device adds a phase shift to the origianal signal. You just now wish to find
that phase shift. Since the system is coherent, then you can integrate over
vary long periods of time without worry about the allen variance of the
frequency source. That is what some of the other posters were trying to get
at. Since the spectral spreading is narrow, then just band pass your noisey
signal and use a pair of radios (having a common reference oscillator) to
mix both the original and phase shifted sine waves down to a low frequency
like 25 kHz. At this low frequency you can sample the two signals and simply
calculate a relative phase shift.While not immediately obvious, the
heterodyne process preserves the phase shift info. You can show this with a
little trig.

IHTH,
Clay







"Dr. David Kirkby" <see_my_signature_for_my_real_address@hotmail.com> wrote
in message news:c99d2c79.0409250141.7efafb@posting.google.com...
> Steve Underwood <steveu@dis.org> wrote in message
news:<cj083o$4lp$1@home.itg.ti.com>...
> > Hi David, > > > > It seems like you still haven't really defined the problem. What are you > > really trying to measure? > > Okay, I have a clean sine wave > > S1 = A + B * sin(2*pi*70*1e6 t ) > > which is my reference signal. After various bits of electronics and my > device under tests, I end up with a singnal > > S2 = C + D * sin(2*pi*70*1e6 t - phi) > > phi can be anyhere between 0 and 360 degrees, but it will never vary > by more than about 5 degrees from one device under test to another. So > by adjusting the lengths of a cable once, I can always get phi to be > some sensible value, that will never cross quadrants. > > > > Just saying phase difference is a bit vague. I > > assume the reference signal is a rock solid, fairly clean, signal. > > The reference will be directly from a high spec signal generator. > > > How > > much different is the frequency of the other signal? > > Since the two signals come from the one source, they should be at the > same frequency. For now at least, I will assume there is no spectral > spread due to the device under test occuring. > > > Is the noise causing significant spectral spread > > (i.e. is it phase modulating the signal to any extent, or is the noise > > purely additive?) > There are 3 answers to this one - a short answer, long answer and a > very long answer. I won't bother with the last !! > > SHORT ANSWER - The noise is very signiificant, so ideally I do want an > algorithm that is as robust to noise as possible. > > > LONG ANSWER - To describe the reasons, effects, cures for this would > take forever, but it was covered in some depth on the thread 'How can > you tell if a system is oscillating?' which I started some time back > on sci.electronics.design. > >
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&threadm=c99d2c79.0409141618.510b730b%40posting.google.com&rnum=1&prev=/groups%3Fq%3Dkirkby%2Boscillating%26hl%3Den%26lr%3D%26ie%3DUTF-8%26selm%3Dc99d2c79.0409141618.510b730b%2540posting.google.com%26rnum%3D1
> > If I look on a 100 MHz oscilloscope, I can't even see the signal - it > is below the noise. > > But if I look on a specutrum analyser, and narrow the scan down to 10 > kHz (say looking at 69.995 to 70.005 MHz), using a filter bandwidth of > about 100 Hz, the signal is some 20 dB or 30 dB above the noise floor > of the spectrum analyser. (I'm taking all these numbers off the top of > my head as my lab books are at work). > > Essentailly, the scope is looking at some of filtered noise (centre = > 70 MHz, bandwidth = 30 MHz) in addition to my signal at precisely > 70.0000000 MHz. Whereas the spectrum analyser is looking only over a > narrow bandwidth, so does not see anywhere near as much noise. > > I could replace the 30 MHz width LC band-pass filter and replce it > with a crystal filter that is 3 KHz wide and reduce the noise by some > 40 dB. Whether or not that is benificinal or not obvious. Since all it > will do is remove noise at frequencies where my signal does not exist, > and will have no effect on the S/N at the frequency of interest. > > > What is the close in phase noise performance of your > > reference like? > > Don't know off hand, but it will be a high spec osciallator. > > > More generally, how spectrally pure is either signal? > > Most importantly, what precision do you need in your answers, and how > > rapidly must they update? > > See notes above about signal. I need answers about every 10 s, and > ideally to 0.1 degree. > > > As others have said, quick rough and ready answers are not hard to > > achieve. If you want responsiveness and great precision it becomes a > > rather different problem. > > Responsiveness is not important. Perhaps later there might be some > point in collecting data every 10 ms, but for now, making a on-off > measurment in 10 s will do. > > Dr. David Kirkby. > > > Regards, > > Steve > > > > > > Dr. David Kirkby wrote: > > > > >r.lyons@_BOGUS_ieee.org (Rick Lyons) wrote in message
news:<414ee168.397898125@news.sf.sbcglobal.net>...
> > > > > > > > >>On 20 Sep 2004 04:56:21 -0700, > > >>see_my_signature_for_my_real_address@hotmail.com (Dr. David Kirkby) > > >>wrote: > > >> > > >> > > >> > > >>>I have two 70 MHz signals (one a clean reference sine wave, the other > > >>>a lot less so), but wish to find the phase difference between these > > >>>two signals. > > >>> > > >>>The A/D, the AD9226: > > >>> > > >>>http://www.analog.com/UploadedFiles/Data_Sheets/394988775AD9226_b.pdf > > >>> > > >>>has a maximum sampling rate of 65 MSPS, but is rated for a maximum
of
> > >>>200 MHz input. Hence the A/D is suitable for use in undersampling > > >>>applications. > > >>> > > >>>Has anyone any experience of, or references to, measuring phase with > > >>>such a system -i.e. where the signal is undersampled? > > >>>Dr. David Kirkby > > >>> > > >>> > > >>Hi Dr. Kirkby, > > >> > > >> uh oh, ... this problem may be much more difficult > > >>than it first appears. > > >> > > >> > > > > > >Just what I did not want to hear!! > > > > > > > > > > > >>Here are my two cents: > > >>I wouldn't use the FFT. The phase difference between > > >>your two signals will be a time-dependent function. > > >> > > >> > > > > > >I assume you mean since the sample rate is not the same as the signal > > >frequency? > > > > > > > > > > > >>Using the FFT results in a horrifying lose of > > >>time resolution. My guess is that your processing > > >>should be strictly time-domain processing. > > >> > > >> > > > > > >Okay. I was starging to wonder this myself. > > > > > > > > > > > >>What occurs to me is that you can perform the > > >>Hilbert transform on your two discrete > > >>signals, and create two "analytic (I/Q) versions > > >>of your two signals. In their analytic form, you > > >>can then estimate their instantaneous phases. > > >> > > >> > > > > > >Can you elaborate a bit more - maths never was my strongest subject. > > >One problem is now do you get an analytic function from a sampled data > > >set? > > > > > > > > > > > >>Finally, you can compute the instantaneous difference > > >>between the two phase signals. > > >> > > >> > > > > > > > > > > > >>The problem is, accurately estimating the > > >>instantaneous phase of an analytic signal requires > > >>us to perform that dog-gonned > > >>(computationally costly) arctangent operation. > > >> > > >> > > > > > > > > > > > > > > > > > >>Now if your phase difference need not be too > > >>accurate (like say, a 4-degree error), there > > >>may be computationally-simple ways to estimate > > >>instantaneous phase. > > >> > > >> > > > > > >It does need to be accurate. > > > > > > > > > > > >>Hey wait a second! I just had another thought. > > >>Perhaps the "Sliding DFT" might be useful to > > >>you. That DFT allows you to compute > > >>single-bin DFT samples. The nice part is that > > >>upon arrival of a new time sample, the new single-bin > > >>DFT sample can be computed with (roughly) > > >>a half dozen arithmetic operations. > > >> > > >> > > > > > >Em, something else for me to look into. I don't know anything about > > >the sliding DFT. > > > > > > > > > > > >>It's quite possible that someone else here > > >>can give you a simpler way to measure the phase > > >>difference between your two signals. > > >> > > >> > > > > > >If they can, it would be appreciated. I was led to belive this would > > >be easy using the FFT, but now I am not so sure, since as you say, the > > >phase will be a time varying function of time. > > > > > > > > > > > >>Good Luck, > > >>[-Rick-] > > >> > > >>
Reply by Dr. David Kirkby September 25, 20042004-09-25
Steve Underwood <steveu@dis.org> wrote in message news:<cj083o$4lp$1@home.itg.ti.com>...
> Hi David, > > It seems like you still haven't really defined the problem. What are you > really trying to measure?
Okay, I have a clean sine wave S1 = A + B * sin(2*pi*70*1e6 t ) which is my reference signal. After various bits of electronics and my device under tests, I end up with a singnal S2 = C + D * sin(2*pi*70*1e6 t - phi) phi can be anyhere between 0 and 360 degrees, but it will never vary by more than about 5 degrees from one device under test to another. So by adjusting the lengths of a cable once, I can always get phi to be some sensible value, that will never cross quadrants.
> Just saying phase difference is a bit vague. I > assume the reference signal is a rock solid, fairly clean, signal.
The reference will be directly from a high spec signal generator.
> How > much different is the frequency of the other signal?
Since the two signals come from the one source, they should be at the same frequency. For now at least, I will assume there is no spectral spread due to the device under test occuring.
> Is the noise causing significant spectral spread > (i.e. is it phase modulating the signal to any extent, or is the noise > purely additive?)
There are 3 answers to this one - a short answer, long answer and a very long answer. I won't bother with the last !! SHORT ANSWER - The noise is very signiificant, so ideally I do want an algorithm that is as robust to noise as possible. LONG ANSWER - To describe the reasons, effects, cures for this would take forever, but it was covered in some depth on the thread 'How can you tell if a system is oscillating?' which I started some time back on sci.electronics.design. http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&threadm=c99d2c79.0409141618.510b730b%40posting.google.com&rnum=1&prev=/groups%3Fq%3Dkirkby%2Boscillating%26hl%3Den%26lr%3D%26ie%3DUTF-8%26selm%3Dc99d2c79.0409141618.510b730b%2540posting.google.com%26rnum%3D1 If I look on a 100 MHz oscilloscope, I can't even see the signal - it is below the noise. But if I look on a specutrum analyser, and narrow the scan down to 10 kHz (say looking at 69.995 to 70.005 MHz), using a filter bandwidth of about 100 Hz, the signal is some 20 dB or 30 dB above the noise floor of the spectrum analyser. (I'm taking all these numbers off the top of my head as my lab books are at work). Essentailly, the scope is looking at some of filtered noise (centre = 70 MHz, bandwidth = 30 MHz) in addition to my signal at precisely 70.0000000 MHz. Whereas the spectrum analyser is looking only over a narrow bandwidth, so does not see anywhere near as much noise. I could replace the 30 MHz width LC band-pass filter and replce it with a crystal filter that is 3 KHz wide and reduce the noise by some 40 dB. Whether or not that is benificinal or not obvious. Since all it will do is remove noise at frequencies where my signal does not exist, and will have no effect on the S/N at the frequency of interest.
> What is the close in phase noise performance of your > reference like?
Don't know off hand, but it will be a high spec osciallator.
> More generally, how spectrally pure is either signal? > Most importantly, what precision do you need in your answers, and how > rapidly must they update?
See notes above about signal. I need answers about every 10 s, and ideally to 0.1 degree.
> As others have said, quick rough and ready answers are not hard to > achieve. If you want responsiveness and great precision it becomes a > rather different problem.
Responsiveness is not important. Perhaps later there might be some point in collecting data every 10 ms, but for now, making a on-off measurment in 10 s will do. Dr. David Kirkby.
> Regards, > Steve > > > Dr. David Kirkby wrote: > > >r.lyons@_BOGUS_ieee.org (Rick Lyons) wrote in message news:<414ee168.397898125@news.sf.sbcglobal.net>... > > > > > >>On 20 Sep 2004 04:56:21 -0700, > >>see_my_signature_for_my_real_address@hotmail.com (Dr. David Kirkby) > >>wrote: > >> > >> > >> > >>>I have two 70 MHz signals (one a clean reference sine wave, the other > >>>a lot less so), but wish to find the phase difference between these > >>>two signals. > >>> > >>>The A/D, the AD9226: > >>> > >>>http://www.analog.com/UploadedFiles/Data_Sheets/394988775AD9226_b.pdf > >>> > >>>has a maximum sampling rate of 65 MSPS, but is rated for a maximum of > >>>200 MHz input. Hence the A/D is suitable for use in undersampling > >>>applications. > >>> > >>>Has anyone any experience of, or references to, measuring phase with > >>>such a system -i.e. where the signal is undersampled? > >>>Dr. David Kirkby > >>> > >>> > >>Hi Dr. Kirkby, > >> > >> uh oh, ... this problem may be much more difficult > >>than it first appears. > >> > >> > > > >Just what I did not want to hear!! > > > > > > > >>Here are my two cents: > >>I wouldn't use the FFT. The phase difference between > >>your two signals will be a time-dependent function. > >> > >> > > > >I assume you mean since the sample rate is not the same as the signal > >frequency? > > > > > > > >>Using the FFT results in a horrifying lose of > >>time resolution. My guess is that your processing > >>should be strictly time-domain processing. > >> > >> > > > >Okay. I was starging to wonder this myself. > > > > > > > >>What occurs to me is that you can perform the > >>Hilbert transform on your two discrete > >>signals, and create two "analytic (I/Q) versions > >>of your two signals. In their analytic form, you > >>can then estimate their instantaneous phases. > >> > >> > > > >Can you elaborate a bit more - maths never was my strongest subject. > >One problem is now do you get an analytic function from a sampled data > >set? > > > > > > > >>Finally, you can compute the instantaneous difference > >>between the two phase signals. > >> > >> > > > > > > > >>The problem is, accurately estimating the > >>instantaneous phase of an analytic signal requires > >>us to perform that dog-gonned > >>(computationally costly) arctangent operation. > >> > >> > > > > > > > > > > > >>Now if your phase difference need not be too > >>accurate (like say, a 4-degree error), there > >>may be computationally-simple ways to estimate > >>instantaneous phase. > >> > >> > > > >It does need to be accurate. > > > > > > > >>Hey wait a second! I just had another thought. > >>Perhaps the "Sliding DFT" might be useful to > >>you. That DFT allows you to compute > >>single-bin DFT samples. The nice part is that > >>upon arrival of a new time sample, the new single-bin > >>DFT sample can be computed with (roughly) > >>a half dozen arithmetic operations. > >> > >> > > > >Em, something else for me to look into. I don't know anything about > >the sliding DFT. > > > > > > > >>It's quite possible that someone else here > >>can give you a simpler way to measure the phase > >>difference between your two signals. > >> > >> > > > >If they can, it would be appreciated. I was led to belive this would > >be easy using the FFT, but now I am not so sure, since as you say, the > >phase will be a time varying function of time. > > > > > > > >>Good Luck, > >>[-Rick-] > >> > >>
Reply by Dr. David Kirkby September 25, 20042004-09-25
Randy Yates <yates@ieee.org> wrote in message news:<isa4se4y.fsf@ieee.org>...
> see_my_signature_for_my_real_address@hotmail.com (Dr. David Kirkby) writes: > > > Randy Yates <yates@ieee.org> wrote in message news:<6569huul.fsf@ieee.org>... > >> r.lyons@_BOGUS_ieee.org (Rick Lyons) writes: > >> > [...] > >> > Now if your phase difference need not be too > >> > accurate (like say, a 4-degree error), there > >> > may be computationally-simple ways to estimate > >> > instantaneous phase. > >> > >> And you can get much better than 4 degrees with a variation on that > >> method that would probably be just fine for a C67x processor with lots > >> of RAM. > > > > Can you elaborate. I do need this to be as accurate as its possible to > > achieve. I might look at a hihger spec A/D to do this better, for for > > now, I just want some suggestions of how it can be done. > > Dr Kirkby, > > First I compute the quantity beta = (r-i)/(r+i) from Shima's paper > (http://home.earthlink.net/~yatescr/Digradio.pdf). This quantity > ranges from -1 to +1. If r and i are integers (fixed-point), perform a > fixed-point division to N bits (I used N=10). That essentially means > that you're quantizing the ideal, real value beta to an N-bit > number. So if you divvy up the range -1 to +1 into 2^N sections and > perform the mapping on the result to angle theta (in degrees), you'll > find that the peak difference between any two adjacent steps is as > small as you like (for N=10 it's at most 0.15 degrees). > > What I actually do in software is take my 10-bit division result and > use that to index into a table of 1024 values, each being the exact > (well, to 16-bit accuracy, where the quantization error is around > pi/2^(15) or better) mapping from beta to angle theta. I generated the > table values using Matlab so they're pretty accurate. This differs > from Shima's technique in which he takes the computed value of beta > and does a power series approximation to the function that yields > angle from beta. > > The actual details are a bit more involved since I do some quadrant > mapping. Because of this, I think the accuracy is even better than > what I am stating - I'm just too lazy to drag out the code and get > the exact values. But it should be AT MOST 0.15 degrees error > worst-case. > > In fact you could easily make this better if you have more memory > by simply increasing the length of the division and the corresponding > table length. The "inner loop" of this technique is the division, > which will require 10 cycles - pretty efficient. And 1024 words is > very reasonable on the new DSPs like the TMS320C5510, which have > 32K words of data memory and 128K words of program memory.
Thanks a lot for that. I will take a look at the paper you mention. I actually have a TMSC6701 DSP, which has floating point support, although perhaps doing this in integera and using a lookup table will be best. I don't have much experience with DSPs, but recall years ago when writing some code that needed sines on a Sun, it was quicker to have a lookup table than to compute sines, despite the fact the CPU had a floating point processor with a sin instruction. However, on later Suns this is not so, and using a lookup table actually slowed one down, rather than speed things up. But I realise DSPs are fast at doing some things (multiples, adds), but poor at others. Thanks for your input.
Reply by Steve Underwood September 24, 20042004-09-24
Hi David,

It seems like you still haven't really defined the problem. What are you 
really trying to measure? Just saying phase difference is a bit vague. I 
assume the reference signal is a rock solid, fairly clean, signal. How 
much different is the frequency of the other signal? How rapidly can it 
vary its frequency? Is the noise causing significant spectral spread 
(i.e. is it phase modulating the signal to any extent, or is the noise 
purely additive?) What is the close in phase noise performance of your 
reference like? More generally, how spectrally pure is either signal? 
Most importantly, what precision do you need in your answers, and how 
rapidly must they update?

As others have said, quick rough and ready answers are not hard to 
achieve. If you want responsiveness and great precision it becomes a 
rather different problem.

Regards,
Steve


Dr. David Kirkby wrote:

>r.lyons@_BOGUS_ieee.org (Rick Lyons) wrote in message news:<414ee168.397898125@news.sf.sbcglobal.net>... > > >>On 20 Sep 2004 04:56:21 -0700, >>see_my_signature_for_my_real_address@hotmail.com (Dr. David Kirkby) >>wrote: >> >> >> >>>I have two 70 MHz signals (one a clean reference sine wave, the other >>>a lot less so), but wish to find the phase difference between these >>>two signals. >>> >>>The A/D, the AD9226: >>> >>>http://www.analog.com/UploadedFiles/Data_Sheets/394988775AD9226_b.pdf >>> >>>has a maximum sampling rate of 65 MSPS, but is rated for a maximum of >>>200 MHz input. Hence the A/D is suitable for use in undersampling >>>applications. >>> >>>Has anyone any experience of, or references to, measuring phase with >>>such a system -i.e. where the signal is undersampled? >>>Dr. David Kirkby >>> >>> >>Hi Dr. Kirkby, >> >> uh oh, ... this problem may be much more difficult >>than it first appears. >> >> > >Just what I did not want to hear!! > > > >>Here are my two cents: >>I wouldn't use the FFT. The phase difference between >>your two signals will be a time-dependent function. >> >> > >I assume you mean since the sample rate is not the same as the signal >frequency? > > > >>Using the FFT results in a horrifying lose of >>time resolution. My guess is that your processing >>should be strictly time-domain processing. >> >> > >Okay. I was starging to wonder this myself. > > > >>What occurs to me is that you can perform the >>Hilbert transform on your two discrete >>signals, and create two "analytic (I/Q) versions >>of your two signals. In their analytic form, you >>can then estimate their instantaneous phases. >> >> > >Can you elaborate a bit more - maths never was my strongest subject. >One problem is now do you get an analytic function from a sampled data >set? > > > >>Finally, you can compute the instantaneous difference >>between the two phase signals. >> >> > > > >>The problem is, accurately estimating the >>instantaneous phase of an analytic signal requires >>us to perform that dog-gonned >>(computationally costly) arctangent operation. >> >> > > > > > >>Now if your phase difference need not be too >>accurate (like say, a 4-degree error), there >>may be computationally-simple ways to estimate >>instantaneous phase. >> >> > >It does need to be accurate. > > > >>Hey wait a second! I just had another thought. >>Perhaps the "Sliding DFT" might be useful to >>you. That DFT allows you to compute >>single-bin DFT samples. The nice part is that >>upon arrival of a new time sample, the new single-bin >>DFT sample can be computed with (roughly) >>a half dozen arithmetic operations. >> >> > >Em, something else for me to look into. I don't know anything about >the sliding DFT. > > > >>It's quite possible that someone else here >>can give you a simpler way to measure the phase >>difference between your two signals. >> >> > >If they can, it would be appreciated. I was led to belive this would >be easy using the FFT, but now I am not so sure, since as you say, the >phase will be a time varying function of time. > > > >>Good Luck, >>[-Rick-] >> >>
Reply by Randy Yates September 23, 20042004-09-23
see_my_signature_for_my_real_address@hotmail.com (Dr. David Kirkby) writes:

> Randy Yates <yates@ieee.org> wrote in message news:<6569huul.fsf@ieee.org>... >> r.lyons@_BOGUS_ieee.org (Rick Lyons) writes: >> > [...] >> > Now if your phase difference need not be too >> > accurate (like say, a 4-degree error), there >> > may be computationally-simple ways to estimate >> > instantaneous phase. >> >> And you can get much better than 4 degrees with a variation on that >> method that would probably be just fine for a C67x processor with lots >> of RAM. > > Can you elaborate. I do need this to be as accurate as its possible to > achieve. I might look at a hihger spec A/D to do this better, for for > now, I just want some suggestions of how it can be done.
Dr Kirkby, First I compute the quantity beta = (r-i)/(r+i) from Shima's paper (http://home.earthlink.net/~yatescr/Digradio.pdf). This quantity ranges from -1 to +1. If r and i are integers (fixed-point), perform a fixed-point division to N bits (I used N=10). That essentially means that you're quantizing the ideal, real value beta to an N-bit number. So if you divvy up the range -1 to +1 into 2^N sections and perform the mapping on the result to angle theta (in degrees), you'll find that the peak difference between any two adjacent steps is as small as you like (for N=10 it's at most 0.15 degrees). What I actually do in software is take my 10-bit division result and use that to index into a table of 1024 values, each being the exact (well, to 16-bit accuracy, where the quantization error is around pi/2^(15) or better) mapping from beta to angle theta. I generated the table values using Matlab so they're pretty accurate. This differs from Shima's technique in which he takes the computed value of beta and does a power series approximation to the function that yields angle from beta. The actual details are a bit more involved since I do some quadrant mapping. Because of this, I think the accuracy is even better than what I am stating - I'm just too lazy to drag out the code and get the exact values. But it should be AT MOST 0.15 degrees error worst-case. In fact you could easily make this better if you have more memory by simply increasing the length of the division and the corresponding table length. The "inner loop" of this technique is the division, which will require 10 cycles - pretty efficient. And 1024 words is very reasonable on the new DSPs like the TMS320C5510, which have 32K words of data memory and 128K words of program memory. -- % Randy Yates % "Rollin' and riding and slippin' and %% Fuquay-Varina, NC % sliding, it's magic." %%% 919-577-9882 % %%%% <yates@ieee.org> % 'Living' Thing', *A New World Record*, ELO http://home.earthlink.net/~yatescr
Reply by Rick Lyons September 23, 20042004-09-23
On 23 Sep 2004 03:26:41 -0700,
see_my_signature_for_my_real_address@hotmail.com (Dr. David Kirkby)
wrote:

>r.lyons@_BOGUS_ieee.org (Rick Lyons) wrote in message news:<414ee168.397898125@news.sf.sbcglobal.net>... >> On 20 Sep 2004 04:56:21 -0700, >> see_my_signature_for_my_real_address@hotmail.com (Dr. David Kirkby) >> wrote: >> >> >I have two 70 MHz signals (one a clean reference sine wave, the other >> >a lot less so), but wish to find the phase difference between these >> >two signals. >> > >> >The A/D, the AD9226: >> > >> >http://www.analog.com/UploadedFiles/Data_Sheets/394988775AD9226_b.pdf >> > >> >has a maximum sampling rate of 65 MSPS, but is rated for a maximum of >> >200 MHz input. Hence the A/D is suitable for use in undersampling >> >applications. >> > >> >Has anyone any experience of, or references to, measuring phase with >> >such a system -i.e. where the signal is undersampled? >> >Dr. David Kirkby >> >> Hi Dr. Kirkby, >> >> uh oh, ... this problem may be much more difficult >> than it first appears. > >Just what I did not want to hear!!
Hi, well, don't give up hope just yet.
> >> Here are my two cents: >> I wouldn't use the FFT. The phase difference between >> your two signals will be a time-dependent function. > >I assume you mean since the sample rate is not the same as the signal >frequency?
No, that's not what I had in mind. I was thinking (perhaps wrongly) that you want to measure the phase difference between a 70 Mhz sinusoid, Signal# 1, and another (perhaps noisy) 70 MHz sinusoid, Signal# 2. I was guessing that Signal# 2's frequency might be drifting relative to Signal# 1's frequency, Sometimes Sig# 2's freq would be slightly higher than Sig# 1's frequency, and sometimes Sig# 2's freq would be slightly lower than Sig# 1's frequency. If that assumption is true, then the phase difference between Sig# 1 & Sig# 2 would be some sort of oscillating signal. (The signal you're trying to estimate.) Now if you performed 1024-point FFTs on Sig# 1 & Sig# 2, you'd obtain a single value that represented, in some way, that oscillating "phase difference" signal. Well, what if the "phase difference" signal oscillated ten times (or twenty times) over that 1024 time-sample periods? You wouldn't be able to tell what the time-domain shape of the "phase difference" signal is during that 1024 time-sample period. Sheece, I hope that explanation made some sort of sense.
> >> Using the FFT results in a horrifying lose of >> time resolution. My guess is that your processing >> should be strictly time-domain processing. > >Okay. I was starging to wonder this myself. > >> What occurs to me is that you can perform the >> Hilbert transform on your two discrete >> signals, and create two "analytic (I/Q) versions >> of your two signals. In their analytic form, you >> can then estimate their instantaneous phases. > >Can you elaborate a bit more - maths never was my strongest subject. >One problem is now do you get an analytic function from a sampled data >set?
Well, I don't know about that, but please know that my math skills are "nothing to write home about". This topic is a bit too involved for me to type in all the details here, that I had in mind right now. Let me say that creating an "analytic" signal from a "real-only" signal is covered in the typical college DSP textbooks. I cover the subject in a fair amount of detail in my DSP book (the 2nd Edition, that is). Sorry to say, but I don't have any magazine references, or tutorial webpages, off hand to which I can refer you. Actually, if you have access to IEEE publications, you might take a look at the paper: "Analytic signal generation---tips and traps, IEEE Transactions on Signal Processing, no. 11, vol. 42, Nov. 1994, pp. 3241-3245, by Andrew Reilly and Gordon Frazer and Boualem Boashash. (Andrew posts here, now-n-then.) Another option is to get ahold of a copy of the 2nd edition of my DSP book, "Understanding Digital Signal Processing, 2/E". (MY PUBLISHER MADE ME SAY THAT!)
>> Finally, you can compute the instantaneous difference >> between the two phase signals. > >> The problem is, accurately estimating the >> instantaneous phase of an analytic signal requires >> us to perform that dog-gonned >> (computationally costly) arctangent operation. > >> Now if your phase difference need not be too >> accurate (like say, a 4-degree error), there >> may be computationally-simple ways to estimate >> instantaneous phase. > >It does need to be accurate.
Ah. Well then Randy's post(s) are worth reviewing.
> >> Hey wait a second! I just had another thought. >> Perhaps the "Sliding DFT" might be useful to >> you. That DFT allows you to compute >> single-bin DFT samples. The nice part is that >> upon arrival of a new time sample, the new single-bin >> DFT sample can be computed with (roughly) >> a half dozen arithmetic operations. > >Em, something else for me to look into. I don't know anything about >the sliding DFT.
The best places to learn about the "Sliding DFT" are: "The Sliding DFT, an Update", IEEE Signal Processing Magazine, DSP Tips & Tricks column, Vol. 21, No. 1, Jan. 2004, by E.Jacobsen & R. Lyons "The Sliding DFT", IEEE Signal Processing Magazine, DSP Tips & Tricks column, Vol. 20, No. 2, March 2003, by E. Jacobsen & R. Lyons
>> It's quite possible that someone else here >> can give you a simpler way to measure the phase >> difference between your two signals. > >If they can, it would be appreciated. I was led to belive this would >be easy using the FFT, but now I am not so sure, since as you say, the >phase will be a time varying function of time.
Yep, if you collect 0.1 seconds worth of data on which you perform FFTs, you'll only obtain a single "phase difference" value every 0.1 seconds. Is that often enough to solve your problem? I don't know. The Sliding DFT will give you one "phase difference" value for each new input time-domain sample. That is, the Sliding DFT will give you a "phase difference" output value at a rate that's equal to your A/D sample rate. Not trying to make your life anymore complicated than it is now, I just remembered a vague notion that something called a "Costas Loop" is a method for measuring the phase difference between two sinusoids. I'm not a "communications" engineer so I can't shed any light on Costas Loops. I just mention them in passing as a topic that might deserve a little investigation. Good Luck, [-Rick-]
Reply by Dr. David Kirkby September 23, 20042004-09-23
Randy Yates <yates@ieee.org> wrote in message news:<6569huul.fsf@ieee.org>...
> r.lyons@_BOGUS_ieee.org (Rick Lyons) writes: > > [...] > > Now if your phase difference need not be too > > accurate (like say, a 4-degree error), there > > may be computationally-simple ways to estimate > > instantaneous phase. > > And you can get much better than 4 degrees with a variation on that > method that would probably be just fine for a C67x processor with lots > of RAM.
Can you elaborate. I do need this to be as accurate as its possible to achieve. I might look at a hihger spec A/D to do this better, for for now, I just want some suggestions of how it can be done.
Reply by Dr. David Kirkby September 23, 20042004-09-23
r.lyons@_BOGUS_ieee.org (Rick Lyons) wrote in message news:<414ee168.397898125@news.sf.sbcglobal.net>...
> On 20 Sep 2004 04:56:21 -0700, > see_my_signature_for_my_real_address@hotmail.com (Dr. David Kirkby) > wrote: > > >I have two 70 MHz signals (one a clean reference sine wave, the other > >a lot less so), but wish to find the phase difference between these > >two signals. > > > >The A/D, the AD9226: > > > >http://www.analog.com/UploadedFiles/Data_Sheets/394988775AD9226_b.pdf > > > >has a maximum sampling rate of 65 MSPS, but is rated for a maximum of > >200 MHz input. Hence the A/D is suitable for use in undersampling > >applications. > > > >Has anyone any experience of, or references to, measuring phase with > >such a system -i.e. where the signal is undersampled? > >Dr. David Kirkby > > Hi Dr. Kirkby, > > uh oh, ... this problem may be much more difficult > than it first appears.
Just what I did not want to hear!!
> Here are my two cents: > I wouldn't use the FFT. The phase difference between > your two signals will be a time-dependent function.
I assume you mean since the sample rate is not the same as the signal frequency?
> Using the FFT results in a horrifying lose of > time resolution. My guess is that your processing > should be strictly time-domain processing.
Okay. I was starging to wonder this myself.
> What occurs to me is that you can perform the > Hilbert transform on your two discrete > signals, and create two "analytic (I/Q) versions > of your two signals. In their analytic form, you > can then estimate their instantaneous phases.
Can you elaborate a bit more - maths never was my strongest subject. One problem is now do you get an analytic function from a sampled data set?
> Finally, you can compute the instantaneous difference > between the two phase signals.
> The problem is, accurately estimating the > instantaneous phase of an analytic signal requires > us to perform that dog-gonned > (computationally costly) arctangent operation.
> Now if your phase difference need not be too > accurate (like say, a 4-degree error), there > may be computationally-simple ways to estimate > instantaneous phase.
It does need to be accurate.
> Hey wait a second! I just had another thought. > Perhaps the "Sliding DFT" might be useful to > you. That DFT allows you to compute > single-bin DFT samples. The nice part is that > upon arrival of a new time sample, the new single-bin > DFT sample can be computed with (roughly) > a half dozen arithmetic operations.
Em, something else for me to look into. I don't know anything about the sliding DFT.
> It's quite possible that someone else here > can give you a simpler way to measure the phase > difference between your two signals.
If they can, it would be appreciated. I was led to belive this would be easy using the FFT, but now I am not so sure, since as you say, the phase will be a time varying function of time.
> Good Luck, > [-Rick-]