Sign in

username:

password:



Not a member?

Search compdsp



Search tips

comp.dsp by Keywords

Adaptive Filter | ADPCM | ADSP | ADSP-2181 | Aliasing | AMR | Anti-Aliasing | ARMA | Autocorrelation | AutoCovariance | Beamforming | Bessel | Blackfin | Butterworth | C6713 | CCS | Chebyshev | CIC Filter | Circular Convolution | Code Composer Studio | Comb Filter | Compression | Convolution | Cross Correlation | DCT | Decimation | Deconvolution | Demodulation | DM642 | DSP Boards | DSP/BIOS | DTMF | Echo Cancellation | Equalization | Equalizer | ETSI | EZLITE (Ez-kit Lite) | FFT | FFTW | FIR Filter | Fixed Point | FSK | G.711 | G.723 | G.729 | Gaussian Noise | Goertzel | GPIO | Hilbert Transform | IFFT | IIR Filter | Interpolation | Invariance | JTAG | Kalman | Laplace Transform | Levinson | LPC | McBSP | MIPS | Modulation | MPEG | Multirate | Notch Filter | Nyquist | OFDM | Oversampling | Pink Noise | Pitch | PLL | Polyphase | QAM | QDMA | Quantization | Quantizer | Radar | Random Noise | Reed Solomon | Remez | Resampling | RTDX | Sampling | Sharc | TI C6711 | Undersampling | Viterbi | Wavelets | White Noise | Wiener Filter | Windowing | XDS510PP | Z Transform


Discussion Groups

Free Online Books

See Also

Embedded SystemsFPGAElectronics

Discussion Groups | Comp.DSP | Guidance in determining phase difference between two sinusoidal signals needed

There are 37 messages in this thread.

You are currently looking at messages 0 to 10.


Guidance in determining phase difference between two sinusoidal signals needed - Frandsen - 2004-05-22 15:16:00

Hi,

I need some guidance in the selection of an algorithm to solve a specific
problem. My problem consists of determining the phase difference between two
150Hz (range within 1 Hz) sinusoidal signal with correlated noise between
signals but with good signal-to-noise ratio. The estimation must be very
precise (within 1x10(-7) rad if possible) and use a limited number of
samples to keep latency low - an online algorithm could be the way to go as
phase shifts happens slowly. I have been looking at high resolution sub
space methods but I'm not sure this is the answer to my problem. My overview
of algorithms available is limited, so I hope any of you gurus can guide me
in which direction to look. No algorithm I have seen seems to exploit the
fact that I know the frequency within a limited range. Can I really not use
this information?



I know my signal specification could be a lot more precise but as I have
just started exploring, any input is welcome.



Thanks.



-Otto


______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: Guidance in determining phase difference between two sinusoidal signals needed - Fred Marshall - 2004-05-23 12:38:00



"Frandsen" <f...@kampsax.dtu.dk> wrote in message
news:40afa714$0$231$e...@dread12.news.tele.dk...
> Hi,
>
> I need some guidance in the selection of an algorithm to solve a specific
> problem. My problem consists of determining the phase difference between
two
> 150Hz (range within 1 Hz) sinusoidal signal with correlated noise between
> signals but with good signal-to-noise ratio. The estimation must be very
> precise (within 1x10(-7) rad if possible) and use a limited number of
> samples to keep latency low - an online algorithm could be the way to go
as
> phase shifts happens slowly. I have been looking at high resolution sub
> space methods but I'm not sure this is the answer to my problem. My
overview
> of algorithms available is limited, so I hope any of you gurus can guide
me
> in which direction to look. No algorithm I have seen seems to exploit the
> fact that I know the frequency within a limited range. Can I really not
use
> this information?
> I know my signal specification could be a lot more precise but as I have
> just started exploring, any input is welcome.

What if the situation were noiseless such that you could determine the
zero-crossings rather exactly?
How many ways are there to estimate phase?
Difference between zero-crossing times is surely the fastest but probably
the noisiest process.  It has to be accompanied by some kind of frequency
normalization method so that it is insensitive to frequency.  You didn't say
you wanted the relative delay, rather, the relative phase.
XOR of a "0" and "1" saturated versions of the waveforms plus integration
of the XOR takes more time - multiple cycles.


You didn't say, so I assume that you don't know the amplitudes.
Also, it appears that this is a very narrow-band signal - essentially a
single sinusoid.
Let's assume that the noisy zero crossing method is used.  Then what is the
sample rate necessary to achieve 1.59x10^-8 fraction of a cycle maximum
error?  Since sin(x) approaches x for small angles, then maybe a reasonable
sample rate (you can calculate what it might be with a spreadsheet) plus
zero-crossing detection plus linear interpolation might be a reasonable
algorithm.  The latency would be driven by the maximum phase measurement.
With a little logic you might be able to limit the latency to <180 degrees
instead of the <360 degrees if one channel is always the reference.

I assume that you can compute the zero-crossing point in time much faster
than a small fraction of 1/150Hz = 6msec.  So, the latency in this regard is
entirely driven by waiting for the next zero crossing.
Let D be the time difference between channel to channel zero crossings.
But you still have to convert the delay to phase which requires knowing the
frequency.  This implies seeing two zero-crossings in one channel, which
drives the latency up to at least 180 degrees plus compute time.
Call the distance between two zero-crossings in the same channel T/2.
The phase is (D*pi/T) radians :: (seconds/(seconds per pi radians))

There may be a trick to get rid of the division but that's not obvious to me
right now - because of the linear interpolation there can't be an integer
number of samples per cycle.  Now, if you were to increase the sample rate
tremendously (to 100 million samples per cycle) then that might work -
that's only 150MHz - and you might get rid of the linear interpolation
entirely.  Then you might be able to count D as an integer and know that
it's a fraction of 10^8 yielding:
10^-8*D*pi radians.
Then I guess one would leave out the multiply by pi introducing a simple
scaling factor.

You didn't say that the two channels are exactly the same frequency.  In
some sense, measuring phase if they are not at the same frequency is
meaningless.  In a practical sense, if the frequencies are close and their
relative delays are fixed, then the apparent "phase" (distance between zero
crossings) will rotate at the difference frequency.  If this is the case
then measuring phase to 10^-7 radians 10^-8 of a cycle is questionable - but
maybe OK.  However, this does suggest that you are more interested in delay
than in phase and it would make the problem simpler.

The XOR method is closely related.  The integration over a number of cycles
takes care of the normalization issue - i.e. frequency dependence.  But, it
does take a number of cycles.

So much for the noiseless case.  Now, you might also ask: "what noise level
is tolerable if 10^-8 of a cycle accuracy is going to be achieved".  In this
you need to include both the signal noise and the clock jitter.  Assuming
that you can get the clock jitter down to a tolerable level, what about
signal noise?  Signal noise will perturb the zero crossing measurement by
moving the interpolated zero - quite possibly by multiple sample intervals.
The narrow band description of the signal suggests identical bandpass
filters in the channels ahead of phase detection - but these will introduce
latency.

In fact, that's a serious question you should be asking:
"How many cycles is it worth averaging over in order to reduce noise?"
You have a very stringent accuracy requirement
and
You have a stated latency requirement that appears to be less than one cycle
because you said "a limited number of samples to keep latency low".

It should be clear that these two requirements are in conflict.  This is due
to physics and not signal processing or algorithm design.  With proper
algorithm design you should be able to trade
1) accuracy in the presence of noise
for
2) latency.

In the end, it may be that you can't get as much accuracy as you want if the
method is fast enough / and if you get the method to be fast then you will
give up accuracy.

Fred









______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: Guidance in determining phase difference between two sinusoidal signals needed - Ulrich Bangert - 2004-05-24 01:38:00

Otto,

beneath the many correct comments that Fred did already make on your case,
you will find a very practical review of your problem of finding frequency,
amplitude and phase of a noisy signal (and phase difference between two of
them)  in

http://tda.jpl.nasa.gov/progress_report/42-121/121G.pdf

However, i am not sure whether this solution satisfies the low latency that
you apparently need. May i ask what you are working on?

Best regards

Ulrich Bangert

"Frandsen" <f...@kampsax.dtu.dk> schrieb im Newsbeitrag
news:40afa714$0$231$e...@dread12.news.tele.dk...
> Hi,
>
> I need some guidance in the selection of an algorithm to solve a specific
> problem. My problem consists of determining the phase difference between
two
> 150Hz (range within 1 Hz) sinusoidal signal with correlated noise between
> signals but with good signal-to-noise ratio. The estimation must be very
> precise (within 1x10(-7) rad if possible) and use a limited number of
> samples to keep latency low - an online algorithm could be the way to go
as
> phase shifts happens slowly. I have been looking at high resolution sub
> space methods but I'm not sure this is the answer to my problem. My
overview
> of algorithms available is limited, so I hope any of you gurus can guide
me
> in which direction to look. No algorithm I have seen seems to exploit the
> fact that I know the frequency within a limited range. Can I really not
use
> this information?
>
>
>
> I know my signal specification could be a lot more precise but as I have
> just started exploring, any input is welcome.
>
>
>
> Thanks.
>
>
>
> -Otto
>
>


______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: Guidance in determining phase difference between two sinusoidal signals needed - Frandsen - 2004-05-25 17:12:00

First:

 Thank you the both of you. Any input is welcome.

Second:

Yes, I'm aware of the trade off between accurate estimation and the window
size of data used in the algorithm. I liked the simplicity of your XOR
algorithm, and I can verify that it is a very narrow band signal and that
frequency in steady state is the same for the two measured signals but they
will of cause divert form each other momentarily when the phase changes.
(This happens very slowly though). The amplitude of the signals is
identical, and it is only the relative phase I'm interested in - not the
delay between signals. I guess it is not necessary to obey the Nyquist rate,
as I know roughly know the frequency and those the theoretical limited
necessary could be squished to half a wave period.

I was thinking of making "two state" algorithm phase detection - one for
when system stabilizes (quick estimate but not accurate) and another for
when the system is in steady state (more accurate but slow as estimation is
based on more data). It would be nice that could satisfy my specification in
both cases. Computational power is not the main issue in this project, so
doing some additional filtering will only slightly increase system
latency -nothing more.

About AD-conversion: Is the use of 2nd order sigma-delta converters to
suppress quantisation noise and other high frequency noise the way to go?
This also has the benefit of increasing the data rate so I avoid using ultra
fast AD converters.

About the calculating the relative phase: One way to calculate the phase if
you have a complex representation (S1 and S2) at a given frequency is this:

Relative phase estmation = Arctan [Im(S1xS2*)/Re(S1xS2*)]

But how do I obtain the presicion needed. I'll need a lot of samples or zero
pad the sample window to decrease the freqvency bins. Is there any other
way? Properly I also have to shift the frequency band down like they do in
paper Ulrich Bangert referred to. The measurement system is for coriolis
flow meter, Ulrick J

I would like to know if there is any other easier/accurate way to estimate
the relative phase. Is there anybody who can advise me about subspace
methods which I know very little about. Can it be applied here and what
problem would it involve? I think I need higher resolution than what you can
get from a conventional/practical use of FFT.

/Otto



"Ulrich Bangert" <d...@ulrich-bangert.de> wrote in message
news:c8s1f0$ard$03$1...@news.t-online.com...
> Otto,
>
> beneath the many correct comments that Fred did already make on your case,
> you will find a very practical review of your problem of finding
frequency,
> amplitude and phase of a noisy signal (and phase difference between two of
> them)  in
>
> http://tda.jpl.nasa.gov/progress_report/42-121/121G.pdf
>
> However, i am not sure whether this solution satisfies the low latency
that
> you apparently need. May i ask what you are working on?
>
> Best regards
>
> Ulrich Bangert
>
> "Frandsen" <f...@kampsax.dtu.dk> schrieb im Newsbeitrag
> news:40afa714$0$231$e...@dread12.news.tele.dk...
> > Hi,
> >
> > I need some guidance in the selection of an algorithm to solve a
specific
> > problem. My problem consists of determining the phase difference between
> two
> > 150Hz (range within 1 Hz) sinusoidal signal with correlated noise
between
> > signals but with good signal-to-noise ratio. The estimation must be very
> > precise (within 1x10(-7) rad if possible) and use a limited number of
> > samples to keep latency low - an online algorithm could be the way to go
> as
> > phase shifts happens slowly. I have been looking at high resolution sub
> > space methods but I'm not sure this is the answer to my problem. My
> overview
> > of algorithms available is limited, so I hope any of you gurus can guide
> me
> > in which direction to look. No algorithm I have seen seems to exploit
the
> > fact that I know the frequency within a limited range. Can I really not
> use
> > this information?
> >
> >
> >
> > I know my signal specification could be a lot more precise but as I have
> > just started exploring, any input is welcome.
> >
> >
> >
> > Thanks.
> >
> >
> >
> > -Otto
> >
> >
>
>


______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: Guidance in determining phase difference between two sinusoidal signals needed - Jerry Avins - 2004-05-25 18:02:00

Frandsen wrote:

   ...

>   ... it is only the relative phase I'm interested in - not the
> delay between signals. 

   ...

You lost me. Delay between the signals has everything to do with the
phase. How not?

Jerry
-- 
Engineering is the art of making what you want from things you can get.
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: Guidance in determining phase difference between two sinusoidal signals needed - Wolfgang - 2004-05-26 02:37:00

Hello Jerry,

Imagine a thing you can get is an old oscilloscope where the timebase is unknown.
Imagine you want to know the phase between two signals.
Hence you are an engineer knowing the phase without knowing the delay ...
What I want to say:
Possibly there are algorithms calculating phase disregarding frequency (and hence delay time correspondence).
But your're right that in most of the systems you take a look at frequencies you inherently have a timebase.

             Not wanting you lost, Wolfgang

P.S.: A funny thing came up my mind: In a new digital oscilloscope you even can determine the phase
when you set the scope to a completly wrong timebase making undersampling.
(O.k. you miss the sign, you would only get 0°-180° beeing possibly -180°-0°
ignoring the case that the oscilloscope runs synchron to the sinus waves :-)


"Jerry Avins" <j...@ieee.org> schrieb im Newsbeitrag news:40b3c26c$0$3112$6...@news.rcn.com...
> Frandsen wrote:
>
>    ...
>
> >   ... it is only the relative phase I'm interested in - not the
> > delay between signals.
>
>    ...
>
> You lost me. Delay between the signals has everything to do with the
> phase. How not?
>
> Jerry
> --
> Engineering is the art of making what you want from things you can get.
> ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
>

______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: Guidance in determining phase difference between two sinusoidal signals needed - Jerry Avins - 2004-05-26 11:00:00

Wolfgang wrote:

> Hello Jerry,
> 
> Imagine a thing you can get is an old oscilloscope where the timebase is unknown.
> Imagine you want to know the phase between two signals.
> Hence you are an engineer knowing the phase without knowing the delay ...
> What I want to say:
> Possibly there are algorithms calculating phase disregarding frequency (and hence delay time correspondence).
> But your're right that in most of the systems you take a look at frequencies you inherently have a timebase.
> 
>              Not wanting you lost, Wolfgang
> 
> P.S.: A funny thing came up my mind: In a new digital oscilloscope you even can determine the phase
> when you set the scope to a completly wrong timebase making undersampling.
> (O.k. you miss the sign, you would only get 0°-180° beeing possibly -180°-0°
> ignoring the case that the oscilloscope runs synchron to the sinus waves :-)

I use an oscilloscope to measure phase in either of two ways.

1) With a dual-trace scope, I display both traces and compare the times
of their zero crossings. With only a single trace but with a separate
sync input I apply one of the signals to the sync and also look at it to
see the displayed phase. Then, with the first signal still providing the
sync, I look at the second. The difference between the two displayed
phases tells me what I need to know.

2) I apply one signal to the vertical amplifier in the usual way, and
apply the second to the horizontal amplifier instead of a sweep. The
slant of the resulting ellipse (or the locations of the axis crossings)
indicates phase.

Both methods indicate the relative phase at the oscilloscope terminals.
If the signals are differently delayed from their sources, the
measurements say nothing about the relative phase at the sources. The
phase is the delay between the signals. What you say seems to be the
same as not caring how much my oscilloscope costs, all you want to know
is its price.

Jerry
-- 
Engineering is the art of making what you want from things you can get.
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: Guidance in determining phase difference between two sinusoidal signals needed - Fred Marshall - 2004-05-26 12:44:00

"Jerry Avins" <j...@ieee.org> wrote in message
news:40b4b116$0$3111$6...@news.rcn.com...
> Wolfgang wrote:
>
> I use an oscilloscope to measure phase in either of two ways.
>
> 1) With a dual-trace scope, I display both traces and compare the times
> of their zero crossings. With only a single trace but with a separate
> sync input I apply one of the signals to the sync and also look at it to
> see the displayed phase. Then, with the first signal still providing the
> sync, I look at the second. The difference between the two displayed
> phases tells me what I need to know.

Jerry,

If I might humbly suggest that your terminology might be a bit "cleaner".
It's not "displayed phase" really is it?

I think you left a couple of important points out:

Dual trace:
If the time base is arbitrary then presumably you could tweak the time base
to display a single half-cycle between zero-crossings on one channel.  Then
the zero crossing of the second channel could be measured *relative* to the
first and the fractional difference converted to degrees or radians.

Single trace:
I can see two ways to do it.  Display the signal that is also used for the
sync and modify the time base to display one half cycle.  Then, keeping this
as the sync, display the other signal and measure the time delay to the zero
crossing.  Same conversion as above.

Otherwise, if the time base is not adjustable, then you would only be
measuring time delay without knowing frequency so you can't get phase,
right?  So, this requires that you measure the temporal length of a half
cycle first (which really gives you frequency) and then you can convert the
time delay to the second channel zero crossing into phase.

Oh! I forgot you had that frequency counter sitting on the shelf so you
could convert time delay to phase..... :-)

Fred


______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: Guidance in determining phase difference between two sinusoidal signals needed - Fred Marshall - 2004-05-26 13:26:00

"Frandsen" <f...@kampsax.dtu.dk> wrote in message
news:40b3b6a6$0$267$e...@dread12.news.tele.dk...
> First:
>
>  Thank you the both of you. Any input is welcome.
>
> Second:
>
> Yes, I'm aware of the trade off between accurate estimation and the window
> size of data used in the algorithm. I liked the simplicity of your XOR
> algorithm, and I can verify that it is a very narrow band signal and that
> frequency in steady state is the same for the two measured signals but
they
> will of cause divert form each other momentarily when the phase changes.
> (This happens very slowly though). The amplitude of the signals is
> identical, and it is only the relative phase I'm interested in - not the
> delay between signals. I guess it is not necessary to obey the Nyquist
rate,
> as I know roughly know the frequency and those the theoretical limited
> necessary could be squished to half a wave period.

Frandsen,

Why would you suggest that the Nyquist rate isn't important?  Indeed,
because of your accuracy requirements the Nyquist rate is the least of your
worries.  If you sample at a higher rate then I guess you could say that you
have "obeyed" the Nyquist sampling criterion.  I'd prefer to use the term
"met" because the rule simply provides an unreachable limit.

Hope springs eternal.  I remain unconvinced that knowing the frequency
roughly ahead of time is going to help in making the measurement.  But, I
can see that it might help in some designs of an implementation.

Here's how you might think about using it:
Quadrature sample at the center frequency to generate I and Q samples, each
at the center frequency.  This brings the signals down to base band.
An interesting fact that I recall from long ago:
If you down-modulate a pair of sinusoids, their *phase* relationship is
preserved.
So now, the phase slope is reduced.  I don't see how that helps in the
presence of noise.  So, this process doesn't seem to help.
I wonder what would happen if you upsampled the data to get better
*apparent* resolution?  How is that different from interpolation?  Same
thing.

Nope, I think you have to sample at a very high rate to begin with - as I
suggested before.  Plain old FIR filter interpolation isn't what you need
thereafter.  I think you need to calculate the zero crossing time as
precisely as you can - not simply picking the nearest sample point in a
regularly-sampled data context.  Rather, computing the "exact" time of the
crossing using analytical methods - and I suggested straight line
interpolation if the sample rate is high enough to justify it.

Here is why knowing the rough frequency ahead of time is not helpful:
You need to know the phase to a very high degree of accuracy.  You are
really only able to measure temporal events - thus points in time and
differences between them.  To get phase, you have to know frequency - thus
the period.  Because the frequency isn't constant, you have to measure it in
real time to be coincident with the time measurements - because of your
accuracy requirement.  If you measure it at another time, or average it,
then the phase accuracy is diminished.

All the other methods involve averaging - which isn't necessarily the same
thing as "windowing".  By this I mean: you might window data for 10
milliseconds, calculate phase and then average the phase measurements for 1
second.  So there is a window and there is an averaging time.  Or, if you
wish, there is a window applied (10msec), a sample rate reduction method
applied (calculate a single phase value) and then a second window applied (1
second) and then filter.  Which is *the* window?  It depends on the context
of the discussion.  If the final filter is done on a continuous basis then
the length of the filter is the final window.  If the final filter is done
on contiguous blocks of data then there's a further data reduction.

You will note that I have refused to inject discussion of uncertainty.....
or associated principles.  Let us not go there, eh?

Fred





______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: Guidance in determining phase difference between two sinusoidal signals needed - Jerry Avins - 2004-05-26 13:26:00

Fred Marshall wrote:

> "Jerry Avins" <j...@ieee.org> wrote in message
> news:40b4b116$0$3111$6...@news.rcn.com...
> 
>>Wolfgang wrote:
>>
>>I use an oscilloscope to measure phase in either of two ways.
>>
>>1) With a dual-trace scope, I display both traces and compare the times
>>of their zero crossings. With only a single trace but with a separate
>>sync input I apply one of the signals to the sync and also look at it to
>>see the displayed phase. Then, with the first signal still providing the
>>sync, I look at the second. The difference between the two displayed
>>phases tells me what I need to know.
> 
> 
> Jerry,
> 
> If I might humbly suggest that your terminology might be a bit "cleaner".
> It's not "displayed phase" really is it?
> 
> I think you left a couple of important points out:
> 
> Dual trace:
> If the time base is arbitrary then presumably you could tweak the time base
> to display a single half-cycle between zero-crossings on one channel.  Then
> the zero crossing of the second channel could be measured *relative* to the
> first and the fractional difference converted to degrees or radians.
> 
> Single trace:
> I can see two ways to do it.  Display the signal that is also used for the
> sync and modify the time base to display one half cycle.  Then, keeping this
> as the sync, display the other signal and measure the time delay to the zero
> crossing.  Same conversion as above.
> 
> Otherwise, if the time base is not adjustable, then you would only be
> measuring time delay without knowing frequency so you can't get phase,
> right?  So, this requires that you measure the temporal length of a half
> cycle first (which really gives you frequency) and then you can convert the
> time delay to the second channel zero crossing into phase.
> 
> Oh! I forgot you had that frequency counter sitting on the shelf so you
> could convert time delay to phase..... :-)
> 
> Fred

Fred,

You know what I mean, so what difference does what I say make? :-)

OK, so I left a little out. You don't need to display a half cycle: more
will do, even less if there's a zero crossing. The most accurate method
with a simple scope is putting one signal on the vertical, the other on
the horizontal, and taking these two measurements after displaying a
continuous loop whose slant direction determines the quadrant:

1) The vertical extent of the trace with the horizontal gain set to
zero. When making this measurement, center the vertical line.

2) The vertical distance between the two nearly horizontal lines, read
off the center line of the graticule, with the horizontal gain set very
high.

You can check them against these and discover if harmonics are messing
up the measurement:

3) The horizontal extent of the trace with the vertical gain set to
zero. When making this measurement, center the horizontal line.

4) The horizontal distance between the two nearly vertical lines, read
off the center line of the graticule, with the vertical gain set very
high.

I'm sure the simple trig you do with these numbers will be clear to you.
With most scopes, you can read them accurately enough to get the phase
to slide-rule accuracy. With my dual-timebase scope, I sync on one
signal and display both by chopping, assuring time alignment, then use
the calibrated delay for the second time base to read out both the
period and the time between zero crossings.

All of that is neither here nor there. If one of the signals undergoes
an undetermined delay with respect to the other, it's impossible to
measure their original relative phase. At high frequencies, it may be
necessary to determine the differential phase shift introduced by the H
and V amplifiers, but that's not hard to do. (Exercise for the reader!)

Jerry
-- 
Engineering is the art of making what you want from things you can get.
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

| 1 | 2 | 3 | 4 | next