DSPRelated.com
Forums

Undersampling to measure phase.

Started by Dr. David Kirkby September 20, 2004
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-] > >> > >>
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-] > > >> > > >>
"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-] > > > >> > > > >>
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