DSPRelated.com
Forums

Phase Question

Started by j26 June 14, 2011
Say I have a time series where the signal resembles a sinusoid of very
slow, but varying frequency.  How do I calculate the phase of the dominant
frequency at a given point in the time series?
j26 <ptd26@n_o_s_p_a_m.live.com> wrote:

> Say I have a time series where the signal resembles a sinusoid of > very slow, but varying frequency. How do I calculate the phase > of the dominant frequency at a given point in the time series?
How slowly varying (relative to the 'dominant frequency'? As far as I know, the usual solution is a PLL. (Phase-Locked loop). It will have to lock before you get the phase out, though. -- glen
On Jun 14, 12:49&#4294967295;pm, "j26" <ptd26@n_o_s_p_a_m.live.com> wrote:
> Say I have a time series where the signal resembles a sinusoid of very > slow, but varying frequency. &#4294967295;How do I calculate the phase of the dominant > frequency at a given point in the time series?
phase only has meaning when it is relative to something, what is that something?
On Jun 15, 5:47&#4294967295;am, glen herrmannsfeldt <g...@ugcs.caltech.edu> wrote:
> j26 <ptd26@n_o_s_p_a_m.live.com> wrote: > > Say I have a time series where the signal resembles a sinusoid of > > very slow, but varying frequency. &#4294967295;How do I calculate the phase > > of the dominant frequency at a given point in the time series? > > How slowly varying (relative to the 'dominant frequency'? > > As far as I know, the usual solution is a PLL. > (Phase-Locked loop). &#4294967295;It will have to lock before you get > the phase out, though. > > -- glen
Just multiply your time-series with a reference and filter. (carefully).
On Jun 14, 12:49&#4294967295;pm, "j26" <ptd26@n_o_s_p_a_m.live.com> wrote:
> Say I have a time series where the signal resembles a sinusoid of very > slow, but varying frequency. &#4294967295;How do I calculate the phase of the dominant > frequency at a given point in the time series?
Phase relative to what? Jerry -- Engineering is the art of making what you want from things you can get.
On 6/14/2011 9:49 AM, j26 wrote:
> Say I have a time series where the signal resembles a sinusoid of very > slow, but varying frequency. How do I calculate the phase of the dominant > frequency at a given point in the time series?
You've introduced the idea of "the dominant frequency" which may be taken to be "the average frequency" or the "median frequency" perhaps? Let's say it's the average. So you're going to have to spend some time figuring out what the average is and maybe that's OK ... there's a "setup time" to do this. Once you have it, then that becomes the reference signal and can be said to have zero phase. I'm assuming that you're doing this in software so that suggests two big steps: 1) determine the average frequency and generate a stable sinousoid or even a square wave with the same frequency. This will be the reference. 2) take samples of the incoming signal and compare them with the reference. This might be by measuring zero-crossing distances or integrating an XOR of the two at a suitably high clock rate. Either way there will be a "window" over which the calculation is made .. so it's not "at a given point". But judicious streaming of the calculation might give something like what you want if with some latency. Probably a good idea to make the two processes identical to preserve your notion of phase. As long as the average frequency remains constant then this should work. And if the average frequency of the signal in the window to be evaluated is a bit off then the output only grandually degrades. It's not just a PLL or PFD because you seem to need to derive the reference from the signal as a first step. Much left to implementation here.... Fred
On Jun 14, 6:49&#4294967295;pm, "j26" <ptd26@n_o_s_p_a_m.live.com> wrote:
> Say I have a time series where the signal resembles a sinusoid of very > slow, but varying frequency. &#4294967295;How do I calculate the phase of the dominant > frequency at a given point in the time series?
The problem as stated doesn't make sense. What is it you are trying to achieve? Why do you think you need the phase? What would you use it for, if you could get it (you can't)? Rune
This is just an idea.
There is a time-varying 'dominant frequency', let's call it f0(t). If
f0(t) varies slowly relative to your sample period, then it should be
possible to determine an analysis interval in which it can be assumed
that f0(t) is constant. Then e.g. a Fourier analysis could be used to
compute a phase estimate but possible there are simpler methods.
On Jun 15, 4:16&#4294967295;am, niarn <niar...@gmail.com> wrote:
> This is just an idea. > There is a time-varying 'dominant frequency', let's call it f0(t). If > f0(t) varies slowly relative to your sample period, then it should be > possible to determine an analysis interval in which it can be assumed > that f0(t) is constant. Then e.g. a Fourier analysis could be used to > compute a phase estimate but possible there are simpler methods.
Phase relative to what? Jerry -- Engineering is the art of making what you want from things you can get.
>Say I have a time series where the signal resembles a sinusoid of very >slow, but varying frequency. How do I calculate the phase of the
dominant
>frequency at a given point in the time series? >
How low is the frequency relative to the sample rate? Mark