# Calculating instantaneous phase of a simple signal

Started by February 29, 2008
```maxplanck wrote:
> aha, what i'm trying to do is calculate the amplitude envelope, phase and
> instantaneous frequency of the signal on the left (the real signal).
>
> For this signal, I is simply the signal, and Q is the hilbert transform of
> the signal, correct?

That's right.

>    I think that this is correct because when I operate
> under this assumption, the amplitude envelope and phase that I calculate
> is correct (see image)
>
> http://www.studioprofessor.com/images/plot.jpg
>
>
> Can you elaborate on why the concept of phase does not apply to my signal?
>  It seems relevant to me, from looking at the above plot, and since the
> signal

This is the signal you want to deal with:

signal=(sin(2*%pi*77.7811 .* x) + .39*sin(2*%pi*74.7811 .* x) +
.34*sin(2*%pi*81.3811 .* x)).

There three frequencies in it. When you refer to "the phase", what
exactly do you have in mind?

> amplitude envelope * cos(phase)
>
> is identical to the original, real signal.

???

Jerry
--
Engineering is the art of making what you want from things you can get.
&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;
```
```maxplanck wrote:
> ok, after rereading these posts i'm going to try to clarify.
>
> What do you mean when you say that the instantaneous amplitude of the
> signal on the left is evaluated directly?
>
> Contrary (i think) to what you're saying, I'm able to calculate the
> instantaneous amplitude of the signal on the left by generating its
> complex representation (signal + j*hilbert(signal)) and then taking the
> magnitude of this complex representation (sqrt(signal^2 +
> hilbert(signal)^2)).
>
> This is illustrated here, you can see that it works:
> http://www.studioprofessor.com/images/plot.jpg

Direct calculation consists of picking a value of 't', evaluating the
equation, and the result is the instantaneous amplitude. If you move
back and forth along the 't' axis a bit you will discover a local
maximum; that is a part of the envelope*.

To avoid hunting along 't', you take the Hilbert transform, also
evaluate that, then take the square root of the the sum of its square
and the original square. If you recalculate using the value of 't' that
put the original signal on the envelope, the HT will evaluate to zero.

Jerry
_______________________________
* Strictly, the point of tangency of the waveform with the envelope is
not precisely at the peak of the waveform, but the difference is
exceedingly small.
--
Engineering is the art of making what you want from things you can get.
```
```"maxplanck" <erik.bowen@comcast.net> writes:
> [...]
> d/dx atan(Q/I) = (I*Q' - Q*I')/(I^2 + Q^2)
>
> = [(sin + sin + sin) .* (-cos'-cos'-cos') - (-cos -cos -cos) .* (sin'
> +sin' +sin')] / [(sin+sin+sin)^2 + (-cos-cos-cos)^2]

I don't see how you got from the previous step to the next step. This

> = [(sin + sin + sin) .* (sin + sin + sin) - (-cos -cos -cos) .* (cos +cos
> +cos)] / [(sin+sin+sin)^2 + (cos+cos+cos)^2]
--
%  Randy Yates                  % "Ticket to the moon, flight leaves here today
%% Fuquay-Varina, NC            %  from Satellite 2"
%%% 919-577-9882                % 'Ticket To The Moon'
%%%% <yates@ieee.org>           % *Time*, Electric Light Orchestra
http://www.digitalsignallabs.com
```
```On Feb 28, 11:17 pm, "maxplanck" <erik.bo...@comcast.net> wrote:

> The instantaneous phase as calculated above is meaningful, since the
> original signal can be generated using only the instantaneous amplitude
> and phase information derived from that signal.

Invertibility of a calculation is no proof of the utility of a
calculation.

> Whether the signal is simple or not is debatable i guess, but it's just
> the sum of 3 sine waves..

In the late 1990's there were a number of articles on the calculation
of instantaneous frequency of multiple component signals in the IEEE
Letters on Signal Processing. They explain that, in general, your
method does not produce a meaningful instantaneous frequency estimate
for multiple component signals. There are conditions where your method
works. For two component signals, the amplitudes must be equal. With
more components there are both amplitude and frequency symmetry
requirements that your signal does not meet. Fortunately, the
modulated forms for which this instantaneous frequency calculation
approach are suggested (an AM'd tone suggested by Lyons for example)
meet the symmetry requirements.

What are the problems with improper component characteristics?
Instantaneous frequency of signals consisting of components with
constant frequency content (such as your 3) should be constant.
Instantaneous frequency estimates should not fall outside the range of
the frequencies of the components. calculations that don't satify
these expectations are not meaningful instantaneous frequency
estimates.

Authors have proposed multivalued instantaneous frequency definitions
to deal with such multicomponent artifacts and other user expectations
of meaningfulness for instantaneous frequency definitions.

Dale B. Dalrymple
http://dbdimages.com
```
```OK, this is consistent with what i've been doing.  Thanks for explaining

>Direct calculation consists of picking a value of 't', evaluating the
>equation, and the result is the instantaneous amplitude. If you move
>back and forth along the 't' axis a bit you will discover a local
>maximum; that is a part of the envelope*.
>
>To avoid hunting along 't', you take the Hilbert transform, also
>evaluate that, then take the square root of the the sum of its square
>and the original square. If you recalculate using the value of 't' that
>put the original signal on the envelope, the HT will evaluate to zero.
>
>Jerry
>_______________________________
>* Strictly, the point of tangency of the waveform with the envelope is
>not precisely at the peak of the waveform, but the difference is
>exceedingly small.
>--
>Engineering is the art of making what you want from things you can get.
>
```
```The derivative of cos is -sin, the derivative of sin is cos.

d/dx is denoted by a ' at some places in what i posted

>"maxplanck" <erik.bowen@comcast.net> writes:
>> [...]
>> d/dx atan(Q/I) = (I*Q' - Q*I')/(I^2 + Q^2)
>>
>> = [(sin + sin + sin) .* (-cos'-cos'-cos') - (-cos -cos -cos) .* (sin'
>> +sin' +sin')] / [(sin+sin+sin)^2 + (-cos-cos-cos)^2]
>
>I don't see how you got from the previous step to the next step. This
>
>> = [(sin + sin + sin) .* (sin + sin + sin) - (-cos -cos -cos) .* (cos
+cos
>> +cos)] / [(sin+sin+sin)^2 + (cos+cos+cos)^2]
>--
>%  Randy Yates                  % "Ticket to the moon, flight leaves here
today
>%% Fuquay-Varina, NC            %  from Satellite 2"
>%%% 919-577-9882                % 'Ticket To The Moon'
>%%%% <yates@ieee.org>           % *Time*, Electric Light Orchestra
>http://www.digitalsignallabs.com
>
```
```Thanks for clarifying Dale.

I started searching through the IEEE database, and there are many articles
on instantaneous frequency calculation from the 90's.

Can anyone recommend what you think is the best method for calculating the
instantaneous frequency of this signal?  Dale confirmed that it will be
constant for the entire signal.

>In the late 1990's there were a number of articles on the calculation
>of instantaneous frequency of multiple component signals in the IEEE
>Letters on Signal Processing. They explain that, in general, your
>method does not produce a meaningful instantaneous frequency estimate
>for multiple component signals. There are conditions where your method
>works. For two component signals, the amplitudes must be equal. With
>more components there are both amplitude and frequency symmetry
>requirements that your signal does not meet. Fortunately, the
>modulated forms for which this instantaneous frequency calculation
>approach are suggested (an AM'd tone suggested by Lyons for example)
>meet the symmetry requirements.
>
>What are the problems with improper component characteristics?
>Instantaneous frequency of signals consisting of components with
>constant frequency content (such as your 3) should be constant.
>Instantaneous frequency estimates should not fall outside the range of
>the frequencies of the components. calculations that don't satify
>these expectations are not meaningful instantaneous frequency
>estimates.
>
>Authors have proposed multivalued instantaneous frequency definitions
>to deal with such multicomponent artifacts and other user expectations
>of meaningfulness for instantaneous frequency definitions.
>
>Dale B. Dalrymple
>http://dbdimages.com
>
```
```"maxplanck" <erik.bowen@comcast.net> writes:

> The derivative of cos is -sin, the derivative of sin is cos.
>
> d/dx is denoted by a ' at some places in what i posted

Doh. I was glossing over those.

--RY

>
>>"maxplanck" <erik.bowen@comcast.net> writes:
>>> [...]
>>> d/dx atan(Q/I) = (I*Q' - Q*I')/(I^2 + Q^2)
>>>
>>> = [(sin + sin + sin) .* (-cos'-cos'-cos') - (-cos -cos -cos) .* (sin'
>>> +sin' +sin')] / [(sin+sin+sin)^2 + (-cos-cos-cos)^2]
>>
>>I don't see how you got from the previous step to the next step. This
>>
>>> = [(sin + sin + sin) .* (sin + sin + sin) - (-cos -cos -cos) .* (cos
> +cos
>>> +cos)] / [(sin+sin+sin)^2 + (cos+cos+cos)^2]
>>--
>>%  Randy Yates                  % "Ticket to the moon, flight leaves here
> today
>>%% Fuquay-Varina, NC            %  from Satellite 2"
>>%%% 919-577-9882                % 'Ticket To The Moon'
>>%%%% <yates@ieee.org>           % *Time*, Electric Light Orchestra
>>http://www.digitalsignallabs.com
>>

--
%  Randy Yates                  % "Ticket to the moon, flight leaves here today
%% Fuquay-Varina, NC            %  from Satellite 2"
%%% 919-577-9882                % 'Ticket To The Moon'
%%%% <yates@ieee.org>           % *Time*, Electric Light Orchestra
http://www.digitalsignallabs.com
```
```"maxplanck" <erik.bowen@comcast.net> writes:

> Can anyone recommend what you think is the best method for calculating the
> instantaneous frequency of this signal?

Maybe it would help if you told us what you are trying to do and why you
would want to classify a signal composed of three frequencies as a
single frequency.
--
%  Randy Yates                  % "Ticket to the moon, flight leaves here today
%% Fuquay-Varina, NC            %  from Satellite 2"
%%% 919-577-9882                % 'Ticket To The Moon'
%%%% <yates@ieee.org>           % *Time*, Electric Light Orchestra
http://www.digitalsignallabs.com
```
```I have a signal composed of three sine waves added together, each sine wave
having constant frequency and amplitude.  Each sine wave's frequency and
amplitude is different from that of the other two.

I want to reproduce this signal using only ONE sine oscillator, of
variable amplitude and constant frequency.  I know that the desired signal
reproduction can be accomplished using only one sine wave of constant
frequency, because it can be derived that for a successful signal
reproduction using only one sine wave the frequency of this lone sine wave
MUST be constant.  What Dale said confirmed this as well.

I have already calculated the amplitude envelope that would need to be
applied to the lone sine wave.  Now all I need to do is calculate the
frequency that this lone sine wave would have to oscillate at in order for
it to equal the original "three summed sine wave" signal.

Thanks for responding

>> Can anyone recommend what you think is the best method for calculating
the
>> instantaneous frequency of this signal?
>
>Maybe it would help if you told us what you are trying to do and why you
>would want to classify a signal composed of three frequencies as a
>single frequency.
>--
>%  Randy Yates                  % "Ticket to the moon, flight leaves here
today
>%% Fuquay-Varina, NC            %  from Satellite 2"
>%%% 919-577-9882                % 'Ticket To The Moon'
>%%%% <yates@ieee.org>           % *Time*, Electric Light Orchestra
>http://www.digitalsignallabs.com
>
```