DSPRelated.com
Forums

Hilbert-Spectrum in Matlab

Started by joanna March 23, 2011
Hi everyboby,

I'm a matlab newbie and have problems with building a hilbert-spectrum in
matlab. Perhaps someone can help me.

I have two vectors: time vector t a the signal vector x. First I compute
the analytic signal z(t)=x(t)+i*y(t), where y(t) is the Hilbert Transform
of x(t). The  polar  coordinate form of z with amplitude and phase is: 
z(t)=amplitude(t)*exp(i*phase(t)). I compute the amplitude and the phase.
The instantaneous frequency as time-varying phase is defined as
dphase(t)/dt.

I calculated all that and now don't know how to combine it to build the
hilbert-spectrum. I hope somebody can help me.

PS: Sorry for possible spelling errors but english isnt my mother tongue.


Best regards
Joanna


On Mar 23, 7:37&nbsp;am, "joanna" <m_bator@n_o_s_p_a_m.gmx.de> wrote:
> Hi everyboby, > > I'm a matlab newbie and have problems with building a hilbert-spectrum in > matlab. Perhaps someone can help me. > > I have two vectors: time vector t a the signal vector x. First I compute > the analytic signal z(t)=x(t)+i*y(t), where y(t) is the Hilbert Transform > of x(t). The &nbsp;polar &nbsp;coordinate form of z with amplitude and phase is: > z(t)=amplitude(t)*exp(i*phase(t)). I compute the amplitude and the phase. > The instantaneous frequency as time-varying phase is de&#64257;ned as > dphase(t)/dt. > > I calculated all that and now don't know how to combine it to build the > hilbert-spectrum. I hope somebody can help me. > > PS: Sorry for possible spelling errors but english isnt my mother tongue. > > Best regards > Joanna
Hello Joanna, If you recall the spectrum of an analytic signal is one sided. So you can just find the fourier tranform of your original signal and zero out all of the components with nonpositive frequencies. That would be your hilbert spectrum. Likewise if you inverse fourier transform your one sided spectrum, then you get your analytic signal. Hopefully this helps. Clay
On Mar 23, 7:37&nbsp;am, "joanna" <m_bator@n_o_s_p_a_m.gmx.de> wrote:
> Hi everyboby, > > I'm a matlab newbie and have problems with building a hilbert-spectrum in > matlab. Perhaps someone can help me. > > I have two vectors: time vector t a the signal vector x. First I compute > the analytic signal z(t)=x(t)+i*y(t), where y(t) is the Hilbert Transform > of x(t). The &nbsp;polar &nbsp;coordinate form of z with amplitude and phase is: > z(t)=amplitude(t)*exp(i*phase(t)). I compute the amplitude and the phase. > The instantaneous frequency as time-varying phase is de&#64257;ned as > dphase(t)/dt. > > I calculated all that and now don't know how to combine it to build the > hilbert-spectrum. I hope somebody can help me. > > PS: Sorry for possible spelling errors but english isnt my mother tongue. > > Best regards > Joanna
It's not that simple For Hilbert spectrum to make any sense you will need to decompose your signal into intrinsic modes first This can be done using so-called Empirical Mode Decomposition Google "Hilbert-Huang Transform" Here is the link to the original paper http://keck.ucsf.edu/~schenk/Huang_etal98.pdf
On Mar 23, 11:33&nbsp;am, fatalist <simfid...@gmail.com> wrote:
> On Mar 23, 7:37&nbsp;am, "joanna" <m_bator@n_o_s_p_a_m.gmx.de> wrote: > > > > > > > Hi everyboby, > > > I'm a matlab newbie and have problems with building a hilbert-spectrum in > > matlab. Perhaps someone can help me. > > > I have two vectors: time vector t a the signal vector x. First I compute > > the analytic signal z(t)=x(t)+i*y(t), where y(t) is the Hilbert Transform > > of x(t). The &nbsp;polar &nbsp;coordinate form of z with amplitude and phase is: > > z(t)=amplitude(t)*exp(i*phase(t)). I compute the amplitude and the phase. > > The instantaneous frequency as time-varying phase is de&#64257;ned as > > dphase(t)/dt. > > > I calculated all that and now don't know how to combine it to build the > > hilbert-spectrum. I hope somebody can help me. > > > PS: Sorry for possible spelling errors but english isnt my mother tongue. > > > Best regards > > Joanna > > It's not that simple > > For Hilbert spectrum to make any sense you will need to decompose your > signal into intrinsic modes first > > This can be done using so-called Empirical Mode Decomposition > > Google "Hilbert-Huang Transform" > > Here is the link to the original paper > > http://keck.ucsf.edu/~schenk/Huang_etal98.pdf- Hide quoted text - > > - Show quoted text -
If we have the analytic signal z(t) = x(t) + jx'(t), where x'(t) is the Hilbert transform of x(t), x'(t) = conv(x(t), 1/(pi*t)), the convolution of x(t) and the reciprical of the product pi*t then the power spectral density will be the one-sided positive spectral density of x(t) with twice the amplitude. If this is what is being sought, then Clay is correct when he says just take the positive spectral density of the original signal. This, also is what I interpret as being sought from the description given by Joanna, and I agree with Clay. Since, with z(t) = x(t) + jx'(t), Szz(omega) = 2 Sxx(omega), where Szz(omega) is the power spectral density of the analytic signal, z(t), and Sxx(omega) is the power spectral density of the original signal. If Sx'x'(omega) is looked for (the spectral density of the Hilbert transform itself), Sx'x'(omega) = Sxx(omega). What I suspect is that Sx'x'(omega) is not what is being sought, but what really is being sought is Sx'x(omega), i.e., Sx'x(omega) = jSxx(omega) sgn(omega); sgn = sign of Then, the positive power spectral density is the same as the original, and the negative spectral density is the inverse of the original. Maurice Givens
On Mar 23, 2:38&nbsp;pm, maury <maury...@core.com> wrote:
> On Mar 23, 11:33&nbsp;am, fatalist <simfid...@gmail.com> wrote: > > > > > > > On Mar 23, 7:37&nbsp;am, "joanna" <m_bator@n_o_s_p_a_m.gmx.de> wrote: > > > > Hi everyboby, > > > > I'm a matlab newbie and have problems with building a hilbert-spectrum in > > > matlab. Perhaps someone can help me. > > > > I have two vectors: time vector t a the signal vector x. First I compute > > > the analytic signal z(t)=x(t)+i*y(t), where y(t) is the Hilbert Transform > > > of x(t). The &nbsp;polar &nbsp;coordinate form of z with amplitude and phase is: > > > z(t)=amplitude(t)*exp(i*phase(t)). I compute the amplitude and the phase. > > > The instantaneous frequency as time-varying phase is de&#64257;ned as > > > dphase(t)/dt. > > > > I calculated all that and now don't know how to combine it to build the > > > hilbert-spectrum. I hope somebody can help me. > > > > PS: Sorry for possible spelling errors but english isnt my mother tongue. > > > > Best regards > > > Joanna > > > It's not that simple > > > For Hilbert spectrum to make any sense you will need to decompose your > > signal into intrinsic modes first > > > This can be done using so-called Empirical Mode Decomposition > > > Google "Hilbert-Huang Transform" > > > Here is the link to the original paper > > >http://keck.ucsf.edu/~schenk/Huang_etal98.pdf-Hide quoted text - > > > - Show quoted text - > > If we have the analytic signal > > z(t) = x(t) + jx'(t), where x'(t) is the Hilbert transform of x(t), > > x'(t) = conv(x(t), 1/(pi*t)), the convolution of x(t) and the > reciprical of the product pi*t > > then the power spectral density will be the one-sided positive > spectral density of x(t) with twice the amplitude. If this is what is > being sought, then Clay is correct when he says just take the positive > spectral density of the original signal. This, also is what I > interpret as being sought from the description given by Joanna, and I > agree with Clay. > > Since, with > > z(t) = x(t) + jx'(t), > > Szz(omega) = 2 Sxx(omega), where Szz(omega) is the power spectral > density of the analytic signal, z(t), and Sxx(omega) is the power > spectral density of the original signal. > > If Sx'x'(omega) is looked for (the spectral density of the Hilbert > transform itself), Sx'x'(omega) = Sxx(omega). What I suspect is that > Sx'x'(omega) is not what is being sought, but what really is being > sought is Sx'x(omega), i.e., > > Sx'x(omega) = jSxx(omega) sgn(omega); sgn = sign of > > Then, the positive power spectral density is the same as the original, > and the negative spectral density is the inverse of the original. > > Maurice Givens- Hide quoted text - > > - Show quoted text -
The OP mentioned "instantaneous frequency" which is NOT the same as average frequency obtained from FFT Once "instantaneous frequency" gets mentioned it opens a whole can of warms as far as its interpretation for arbitrary signals is concerned I suggest reading Cohen's book "Time-Frequency Analysis" or at least this little writeup to get you started :-) http://www.math.ucdavis.edu/~saito/data/phase/loughlin-tacer-97.pdf
On Mar 23, 6:37&nbsp;am, "joanna" <m_bator@n_o_s_p_a_m.gmx.de> wrote:
> Hi everyboby, > > I'm a matlab newbie and have problems with building a hilbert-spectrum in > matlab. Perhaps someone can help me. > > I have two vectors: time vector t a the signal vector x. First I compute > the analytic signal z(t)=x(t)+i*y(t), where y(t) is the Hilbert Transform > of x(t). The &nbsp;polar &nbsp;coordinate form of z with amplitude and phase is: > z(t)=amplitude(t)*exp(i*phase(t)). I compute the amplitude and the phase. > The instantaneous frequency as time-varying phase is de&#64257;ned as > dphase(t)/dt. > > I calculated all that and now don't know how to combine it to build the > hilbert-spectrum. I hope somebody can help me. > > PS: Sorry for possible spelling errors but english isnt my mother tongue. > > Best regards > Joanna
Joanna, When you get it completed, come back and let us know what you did, and the results. Maurice Givens
On Mar 23, 7:37&nbsp;am, "joanna" <m_bator@n_o_s_p_a_m.gmx.de> wrote:
> Hi everyboby, > > I'm a matlab newbie and have problems with building a hilbert-spectrum in > matlab. Perhaps someone can help me. > > I have two vectors: time vector t a the signal vector x. First I compute > the analytic signal z(t)=x(t)+i*y(t), where y(t) is the Hilbert Transform > of x(t). The &nbsp;polar &nbsp;coordinate form of z with amplitude and phase is: > z(t)=amplitude(t)*exp(i*phase(t)). I compute the amplitude and the phase. > The instantaneous frequency as time-varying phase is de&#64257;ned as > dphase(t)/dt. > > I calculated all that and now don't know how to combine it to build the > hilbert-spectrum. I hope somebody can help me. > > PS: Sorry for possible spelling errors but english isnt my mother tongue. > > Best regards > Joanna
The direct answer to the OP's question is this: In a time-frequency plane an instantaneous frequency plotted as a function of time and color-coded as a function of instantaneous amplitude (or squared instantaneous amplitude) with produce so-called amplitude (or energy) Hilbert Spectrum Simple ? Maybe not :-)

fatalist wrote:

Hello Dmitry Terez. Are you saving the World again?

> The direct answer to the OP's question is this:
The direct answer to the OP's question is "stupidents and matlabi do their homeworks".
> In a time-frequency plane an instantaneous frequency plotted as a > function of time and color-coded as a function of instantaneous > amplitude (or squared instantaneous amplitude) with produce so-called > amplitude (or energy) Hilbert Spectrum > > Simple ? Maybe not :-)
What is it difficult in making a classic hilbert transformer and applying an elementary math to the output? No need for hilbert-huangs and other mumbo-jumbo. Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com
On Mar 24, 11:30&#4294967295;am, Vladimir Vassilevsky <nos...@nowhere.com> wrote:
> fatalist wrote: > > Hello Dmitry Terez. Are you saving the World again? > > > The direct answer to the OP's question is this: > > The direct answer to the OP's question is "stupidents and matlabi do > their homeworks". > > > In a time-frequency plane an instantaneous frequency plotted as a > > function of time and color-coded as a function of instantaneous > > amplitude (or squared instantaneous amplitude) with produce so-called > > amplitude (or energy) Hilbert Spectrum > > > Simple ? &#4294967295;Maybe not :-) > > What is it difficult in making a classic hilbert transformer and > applying an elementary math to the output? No need for hilbert-huangs > and other mumbo-jumbo. > > Vladimir Vassilevsky > DSP and Mixed Signal Design Consultanthttp://www.abvolt.com
Thank you for not renaming the thread to "STUPIDENT matlabi" Your infinite DSP wisdom coming from Kansas (formely Oklahoma) is always appreciated
>On Mar 23, 7:37=C2=A0am, "joanna" <m_bator@n_o_s_p_a_m.gmx.de> wrote: >> Hi everyboby, >> >> I'm a matlab newbie and have problems with building a hilbert-spectrum
in
>> matlab. Perhaps someone can help me. >> >> I have two vectors: time vector t a the signal vector x. First I
compute
>> the analytic signal z(t)=3Dx(t)+i*y(t), where y(t) is the Hilbert
Transfo=
>rm >> of x(t). The =C2=A0polar =C2=A0coordinate form of z with amplitude and
ph=
>ase is: >> z(t)=3Damplitude(t)*exp(i*phase(t)). I compute the amplitude and the
phas=
>e. >> The instantaneous frequency as time-varying phase is de=EF=AC=81ned as >> dphase(t)/dt. >> >> I calculated all that and now don't know how to combine it to build the >> hilbert-spectrum. I hope somebody can help me. >> >> PS: Sorry for possible spelling errors but english isnt my mother
tongue.
>> >> Best regards >> Joanna > >It's not that simple > >For Hilbert spectrum to make any sense you will need to decompose your >signal into intrinsic modes first > >This can be done using so-called Empirical Mode Decomposition > >Google "Hilbert-Huang Transform" > >Here is the link to the original paper > >http://keck.ucsf.edu/~schenk/Huang_etal98.pdf
________________________________________________________________________ Thank all of you for your responses. Many days have passed since I posted my last thread. In this time a have decompose my signal into intrinsic modes with the Empirical Mode Decomposition. But now I have another problem. When I use the Hilbert Transform to get the instantaneous frequency I also get negative frequency. I dont understand that. I thought that an analytic signal only yield positive frequency. Best regards joanna _________________________________________________________________________ I hope someone can explain that for me.