DSPRelated.com
Forums

Basics of Frequency Shifting

Started by Mason November 5, 2008
On Nov 6, 10:11&#4294967295;am, "Mason" <plsnos...@plsnospam.net> wrote:
> Understood. &#4294967295;My goal is to measure relative circuit time delay. &#4294967295;I can > compare the input and output phases to/from the two circuits. &#4294967295;This > information is available at the measurement location via independent paths. > But both relative phase measurements have to be done at the same time > because the frequencies are different. &#4294967295;Making simultaneous measurements is > hard. &#4294967295;To reduce the dependency on time of measurement I am proposing to > shift the signals to exactly the same frequency, and my question is will > doing this destroy their relative phase relationship that I am trying to > measure in order to determine relative circuit delay time?
You realize that changing the frequency will change the phase at every point except one, thus distorting any relative phase comparison except at that one reference point. Why not make the one point where the phase doesn't change to be your measurement location? Because then you will already know the result of your measurement and don't need to change the rest of the waveform to match that same value. IMHO. YMMV.
Ron N. wrote:
> On Nov 6, 10:11 am, "Mason" <plsnos...@plsnospam.net> wrote: >> Understood. My goal is to measure relative circuit time delay. I can >> compare the input and output phases to/from the two circuits. This >> information is available at the measurement location via independent paths. >> But both relative phase measurements have to be done at the same time >> because the frequencies are different. Making simultaneous measurements is >> hard. To reduce the dependency on time of measurement I am proposing to >> shift the signals to exactly the same frequency, and my question is will >> doing this destroy their relative phase relationship that I am trying to >> measure in order to determine relative circuit delay time? > > You realize that changing the frequency will change the phase at > every point except one, thus distorting any relative phase comparison > except at that one reference point. Why not make the one point > where the phase doesn't change to be your measurement location? > Because then you will already know the result of your measurement > and don't need to change the rest of the waveform to match that > same value.
If the path delay is unknown, then even that approach fails. If the path delay is known, then no measurements are needed. Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
On Thu, 6 Nov 2008 08:02:39 -0800, Mason <plsnospam@plsnospam.net> wrote:
> The problem is unusual in that I don't have physical access to either the > sources or the circuit inputs. They are remote. I am stuck with having two > independent sources at slightly different frequencies arriving via > independent circuits with different delays. What I do know is the relative > signal phases at the sources at a specific time. > > So one way to determine differential circuit delay is to measure relative > phase of the arriving signals at the same time when the relative phases are > known at the sources. However this is subject to errors in measurement > time. > > I'm trying to reduce or eliminate sensitivity to time of measurement by > shifting both received signals to a common frequency. The shifting process > may alter the signal phases, but it should do the same to both circuits > thereby not affecting the relative received phases that I want to measure. > Conceptually is there a flaw in this approach?
Mason, I seem to have missed the start of this thread, so if this question has already been asked, please feel free to ignore it. One way of determining relative delays between two signals would be to track the zero-crossings of both and compare them. If they're complex waveforms (e.g. not simple sines), in theory you could match them by shape as well; that could mean a lot of computation, depending on the waveform complexity, but do-able. That would give you something like (using ^ and + for the zero-crossings): S1: ...xxxx^xxxxxxxxxx^xxxxxxxxxx^xxxxxxxxxx^xxxxxxxxxx^xxx... S2: ...xxxx+xxxxxxxxx+xxxxxxxxx+xxxxxxxxx+xxxxxxxxx+xxx... Assuming you know the sampling frequency, and can detect the zero-crossings, you can determine the frequencies of S1 and S2 as well as their "relative time of arrival" in some sense. Since you've probably already considered this and rejected it, what exactly beyond this information is it that you are seeking? Or, to put it another way, why is this approach inappropriate for what you're attempting to achieve? Frank McKenney -- Recessions are the market's way of teaching Americans economics. -- Frank McKenney, McKenney Associates Richmond, Virginia / (804) 320-4887 Munged E-mail: frank uscore mckenney ayut mined spring dawt cahm (y'all)
On Wed, 05 Nov 2008 21:28:09 -0500, Jerry Avins wrote:

> Mason wrote: > > ... > >> The application is to determine the difference in phase shift through >> two circuits driven by separate oscillators. Since the oscillators >> have slightly different frequencies I first need to normalize the >> frequencies then measure the phase difference between the signals. > > Give up. Frequency can be looked at as rate of change of phase. You > can't measure phase shift of signals at different frequencies.Arrange to > use a single oscillator, even if it seems too complicated. > > Jerry
That pretty much sums it up. Any pair of oscillators that aren't coupled will have independent phases, even if their frequencies are very close. So the only way that you could measure the phase shift imposed by two different circuits driven by two different oscillators, or even the difference in that phase shift, would be to measure the circuits' outputs' phases against the oscillators' phases, i.e. you'd need to take four measurements. So unless you use one oscillator, or two locked oscillator, you're out of luck. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com Do you need to implement control loops in software? "Applied Control Theory for Embedded Systems" gives you just what it says. See details at http://www.wescottdesign.com/actfes/actfes.html
Mason wrote:

> I have no control over the sources. The two sines are correlated in that I > know their relative phase at a specific time at the sources. They are at > slightly different frequencies and arriving through two circuits with > different delays. I'm measuring the difference in time between selected > events in the two sines - ie, waveform maxima - to determine the difference > in the circuit delays, and I'm making that measurement at about the same > time when I know their relative phase at the sources.
> The problem is, errors in the time of measurement cause inaccurate > measurement results because the waveforms are moving relative to each other > vs. time as a result of their different frequencies.
Look at what Radio-Astronomy people do, which is very similar to what you say. They receive a signal at different places around the world and combine them, including phase, to reconstruct as if received by an earth-sized antenna. That works if the signals are the same source with different delay, as it now sounds like you have. -- glen
On Nov 8, 12:22&#4294967295;am, Glen Herrmannsfeldt <g...@ugcs.caltech.edu> wrote:
> Mason wrote: > > I have no control over the sources. &#4294967295;The two sines are correlated in that I > > know their relative phase at a specific time at the sources. &#4294967295;They are at > > slightly different frequencies and arriving through two circuits with > > different delays. &#4294967295;I'm measuring the difference in time between selected > > events in the two sines - ie, waveform maxima - to determine the difference > > in the circuit delays, and I'm making that measurement at about the same > > time when I know their relative phase at the sources. > > The problem is, errors in the time of measurement cause inaccurate > > measurement results because the waveforms are moving relative to each other > > vs. time as a result of their different frequencies. > > Look at what Radio-Astronomy people do, which is very similar to > what you say. &#4294967295;They receive a signal at different places around the > world and combine them, including phase, to reconstruct as if received > by an earth-sized antenna. > > That works if the signals are the same source with different delay, > as it now sounds like you have. > > -- glen
Write the 2 inputs at 2 different frequencies as cos(w1*t) and cos(w2*t + ipo) where w1 and w2 are the source frequencies and ipo stands for "initial phase offset" (phase offset valid at time 0). Now add 2 different delay terms d1 and d2 out1 = cos(w1*(t - d1)) out2 = cos(w2*(t - d2) + ipo) Lets assume you can measure w1 and w2 exactly at the output (there are some problems here, aslo, but I'll ignore those for now). So you have 2 equations and 3 unknowns (d1, d2, ipo). If there was a "time 0" event where you knew the sources started at a known phase (so "ipo" becomes known), then you could solve these equations for d1 and d2 by making a measurement at a known time t, but you would have the furthur problem that ANY drift of w1 or w2 relative (starting from time 0), or any measurement error of w1 and w2, would cause an accumulating error over time that would eventually become significant. Bob Adams
Glen Herrmannsfeldt wrote:

   ...

> That works if the signals are the same source with different delay, > as it now sounds like you have.
If the frequencies of the sources differ, how can they be the *same* source? Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
On Sat, 08 Nov 2008 11:08:19 -0500, Jerry Avins <jya@ieee.org> wrote:

>Glen Herrmannsfeldt wrote: > > ... > >> That works if the signals are the same source with different delay, >> as it now sounds like you have. > >If the frequencies of the sources differ, how can they be the *same* source? > >Jerry
Different doppler? In the radio astronomy case I could see that the earth's rotation could create a situation where one antenna is moving toward the emitter and one away. The emitted frequency is the same. But if there's no Doppler, then, yeah...?? Eric Jacobsen Minister of Algorithms Abineau Communications http://www.ericjacobsen.org Blog: http://www.dsprelated.com/blogs-1/hf/Eric_Jacobsen.php
Jerry Avins wrote:
> Glen Herrmannsfeldt wrote:
>> That works if the signals are the same source with different delay, >> as it now sounds like you have.
> If the frequencies of the sources differ, how can they be the *same* > source?
The OP isn't giving the details, but it sounds like it might be one signal with variable delay. If the frequency of the source varies with time, then delayed versions can have different frequencies (at the time they arrive). -- glen
Glen Herrmannsfeldt wrote:
> Jerry Avins wrote: >> Glen Herrmannsfeldt wrote: > >>> That works if the signals are the same source with different delay, >>> as it now sounds like you have. > >> If the frequencies of the sources differ, how can they be the *same* >> source? > > The OP isn't giving the details, but it sounds like it might > be one signal with variable delay. If the frequency of the source > varies with time, then delayed versions can have different frequencies > (at the time they arrive).
He wrote that independent oscillators are in different locations. I don't see how to attach more than arm-waving significance to "phase comparison". Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;