DSPRelated.com
Forums

Ways of implementing a Hilbert Transform

Started by Michel Rouzic January 11, 2006
Jerry Avins wrote:
> Michel Rouzic wrote:
>> Plus, as for the FFTW result, it always worked right by >> considerintg the first part of the output real and the second >> half imaginary, the best evidence of it is that I can turn that >> output to polar form. So if it also says that the first half of >> the output is positive and the second is negative, the only >> expalaination I see is that negative frequencies==imaginary >> frequencies > > The correct explanation (the one you didn't see) is that you got > the wrong results and didn't know it.
Not necessarily, after taking note of Stephen's concurrent post, if Michel had real inputs in those cases which is not true this time (unless I've been sucked into the vortex as well...). Martin -- Quidquid latine scriptum sit, altum viditur.
On 15 Jan 2006 20:36:31 -0800, "Ajay" <mishraka@gmail.com> wrote:

>Hi All, > >I wonder how many times we have discussed this issue. There have been >numerous threads on Hilbert transform one of which was even initiated >by me. To avoid this problem repeat questions, I have got a suggestion >to make. > >1. There are quite a few generic topics similar to Hilber transfrom >which are posted too often. Let's perpare a complete tutorial on those >topics using all the relevant comments of the authors in the thread. >This will not only provide a complied and consolidated answer to >frequent questions but also save a lot of time of the busy people like >Rick. > >2. In that case, group will be able to concentrate on the customized >and specialised problems posted by the users. > >I can volunteer for the Job but only if you all agree and support me. ( >I am a PhD student and doing research in Computer vision area) > >Thanks >Ajay
Hi Ajay, that's a great idea. Like Jerry, I'm also willing to review your material, if you wish. (Perhaps it would be a good idea, if you started with a simple outline of the topics you intend to discuss. I have found outlines to be a very useful starting point.) If you follow through and finish this writing project, I suggest we ask our pal Al Clark (http://www.danvillesignal.com/) if he is willing to post your material on his web site. I say that because the www.dspguru website has been a "dead website" for years now. (Its creator, Grant Griffin, is no longer working on that web site. As far as I know, Grant is no longer involved in the DSP business.) Let's keep in touch on this Ajay, OK? [-Rick-]
On Mon, 16 Jan 2006 07:08:40 -0500, "John E. Hadstate"
<jh113355@hotmail.com> wrote:


Hi John,


>"Rick Lyons" <R.Lyons@_BOGUS_ieee.org> wrote in message >news:43cb0cf4.38331937@news.sf.sbcglobal.net... >> >> If we have a complex signal (the real part being some >> original real signal, and the imaginary part being >> the Hilbert xform of the original real part), >> we can perform FM demodulation in a fairly >> straightforward manor > >[manner ;-)]
"Fore years ago, I cudn't even spell 'ingeneer'; now I are one."
>> by taking the derivative of >> the instantaneous phase of the complex signal sequence. >> This, it seems to me, is easier than performing >> FM demod on real-only signals. > >I'm lost :-( > >Did you mean: > >1. Sample the RF signal (call it the real part).
Yep. Let's call it I(n).
>2. Create an imaginary "friend" for (1) by applying the HT >to (1).
Yes, but more than a "friend", it's a relative. Let's call the Hilbert xform of I(n) by the name "Q(n)". Q(n) has the same spectrum as I(n) but all of Q(n)'s spectral components are shifted 90 degrees in phase with respect to I(n)'s spectral components. Next let's put the I(n) and Q(n) sequences "together" and create a complex sequence C(n) = I(n) +j*Q(n). (C(n) is called an "analytic sequence".)
>3. Compute the "phase" at each point in the result of (2) >from atan2(realpart, imagpart)
Well, we compute a sequence which is the arctan of Q(n)/I(n). (The argument is: imag over the real). Let's call that arctan sequence "Phase(n)", and refer to it as the "instantaneous phase of C(n)".
> >4. Put the result of 3 through a digital differentiator.
Yes, perform digital differentiation on Phase(n), whose result will be the modulating signal assuming that the original I(n) was an FM (freq modulated) signal. As you know, the derivative of phase is frequency. (degrees/second, radians/second, cycles/second.)
> >I'm understanding that all steps are applied to the >time-domain signal. Is that correct?
It sure sounds to me like you're correct. The tough parts that drive everyone nuts in all of this are: (i) performing the Q(n)/I(n) division (division is NOT as simple as multiplication in binary math), and (ii) performing an accurate arctangent at high data rates. (Reasonably accurate arctangents require a fair amount of number crunching). Hope some of what I wrote makes sense. Best Regards, [-Rick-]
Martin Eisenberg wrote:
> Michel Rouzic wrote: > > > Martin Eisenberg wrote: > > >> Michel, I suggest you start a new thread with a title like > >> "Ways of handling a chirp" or whatever you find appropriate and > >> describe in detail the problem, not what you think is the > >> solution. > > > I already did that actually, it was mainly about discussing of > > how to make a bandpass filter that varies over time, because > > then I had absolutly no idea on how to do it. > > OK, but none of the respondents was clear about the fact that your > signal is complex and where you want to go, so I think it would help > to put all the bits and pieces you told throughout this thread in one > place. If you're talking about a former thread here, you might refer > to that. > > >> The FFTW manual says so in section 4.7.1. > > > > "this means that the positive frequencies are stored in the > > first half of the output and the negative frequencies are stored > > in backwards order in the second half of the output." > > > > Wow... wtf. I thought that the first half of the output was the > > real part, and the second half was the imaginary part backwards. > > All my certainities are collapsing. Now i'm in the most complete > > confusion. Does it mean that the imaginary part == the negative > > frequencies? > > Not at all. The output is an array of complex numbers (pairs of > doubles) each of wich holds the real and imaginary part of one > frequency bin. See section 4.1.1. Have you read Rick's Appendix C?
Not for me. I use the real to real interface, so I don't have to bother with FFTW's complex number format (plus, at the time I implemented it I didn't even know yet what complex numbers were) so all I get is an array of real numbers representing the real and imaginary part of one frequency bin, on two bins. that's why i'm confused about negative frequencies, because I don't have them represented with the r2r interface.
Michel Rouzic wrote:

   ...

> I use the real to real interface, so I don't have to bother > with FFTW's complex number format (plus, at the time I implemented it I > didn't even know yet what complex numbers were) so all I get is an > array of real numbers representing the real and imaginary part of one > frequency bin, on two bins. that's why i'm confused about negative > frequencies, because I don't have them represented with the r2r > interface.
How do you guarantee that your particular input to the FFT will produce a real output? That is a special situation that requires certain symmetry conditions. Do you meet them? FFTW has a version that accepts real inputs, and a version to use when you expect real output, but they are not, as far as I know the same version. I hope someone will correct me if I'm wrong. 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;
R.Lyons@_BOGUS_ieee.org (Rick Lyons) wrote in news:43d18101.461262875
@news.sf.sbcglobal.net:

> On 15 Jan 2006 20:36:31 -0800, "Ajay" <mishraka@gmail.com> wrote: > >>Hi All, >> >>I wonder how many times we have discussed this issue. There have been >>numerous threads on Hilbert transform one of which was even initiated >>by me. To avoid this problem repeat questions, I have got a suggestion >>to make. >> >>1. There are quite a few generic topics similar to Hilber transfrom >>which are posted too often. Let's perpare a complete tutorial on those >>topics using all the relevant comments of the authors in the thread. >>This will not only provide a complied and consolidated answer to >>frequent questions but also save a lot of time of the busy people like >>Rick. >> >>2. In that case, group will be able to concentrate on the customized >>and specialised problems posted by the users. >> >>I can volunteer for the Job but only if you all agree and support me. ( >>I am a PhD student and doing research in Computer vision area) >> >>Thanks >>Ajay > > Hi Ajay, > > that's a great idea. > > Like Jerry, I'm also willing to review your material, > if you wish. (Perhaps it would be a good idea, if you > started with a simple outline of the topics you intend > to discuss. I have found outlines to be a very useful > starting point.) > > If you follow through and finish this writing project, > I suggest we ask our pal Al Clark > (http://www.danvillesignal.com/) if he is willing to post > your material on his web site. I say that because the > www.dspguru website has been a "dead website" for years now. > (Its creator, Grant Griffin, is no longer working on > that web site. As far as I know, Grant is no longer > involved in the DSP business.)
I have discussed with Rick, the idea of creating a new "dspguru" site since Grant is long gone. In addition to general topics, I am also specificly interested in creating a new SHARC resource similar to the old Whygee SHARC site. I realize that my company is a bit partisan, but we don't plan to disappear. This means than a resource like dspguru may have become stale. Thoughts? Al
> > Let's keep in touch on this Ajay, OK? > [-Rick-] >
-- Al Clark Danville Signal Processing, Inc. -------------------------------------------------------------------- Purveyors of Fine DSP Hardware and other Cool Stuff Available at http://www.danvillesignal.com
"Rick Lyons" <R.Lyons@_BOGUS_ieee.org> wrote in message 
news:43d191ee.465595437@news.sf.sbcglobal.net...

> > Hope some of what I wrote makes sense.
Everything you wrote makes sense. You've convinced me that I need to buy your book. ;-) Thanks again.
Al Clark wrote:

   ...

> I have discussed with Rick, the idea of creating a new "dspguru" site > since Grant is long gone. In addition to general topics, I am also > specificly interested in creating a new SHARC resource similar to the old > Whygee SHARC site. > > I realize that my company is a bit partisan, but we don't plan to > disappear. This means than a resource like dspguru may have become stale.
I don't see why you shouldn't wear two hats as long as they're clearly distinguished. The same goes for politicians. I have no problem with potential conflicts of interest that are they're fully disclosed and the voters are OK with. We know who you are and what you do. You're OK by me! 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;
Al Clark <dsp@danvillesignal.com> writes:

> R.Lyons@_BOGUS_ieee.org (Rick Lyons) wrote in news:43d18101.461262875 > @news.sf.sbcglobal.net: > >> On 15 Jan 2006 20:36:31 -0800, "Ajay" <mishraka@gmail.com> wrote: >> >>>Hi All, >>> >>>I wonder how many times we have discussed this issue. There have been >>>numerous threads on Hilbert transform one of which was even initiated >>>by me. To avoid this problem repeat questions, I have got a suggestion >>>to make. >>> >>>1. There are quite a few generic topics similar to Hilber transfrom >>>which are posted too often. Let's perpare a complete tutorial on those >>>topics using all the relevant comments of the authors in the thread. >>>This will not only provide a complied and consolidated answer to >>>frequent questions but also save a lot of time of the busy people like >>>Rick. >>> >>>2. In that case, group will be able to concentrate on the customized >>>and specialised problems posted by the users. >>> >>>I can volunteer for the Job but only if you all agree and support me. ( >>>I am a PhD student and doing research in Computer vision area) >>> >>>Thanks >>>Ajay >> >> Hi Ajay, >> >> that's a great idea. >> >> Like Jerry, I'm also willing to review your material, >> if you wish. (Perhaps it would be a good idea, if you >> started with a simple outline of the topics you intend >> to discuss. I have found outlines to be a very useful >> starting point.) >> >> If you follow through and finish this writing project, >> I suggest we ask our pal Al Clark >> (http://www.danvillesignal.com/) if he is willing to post >> your material on his web site. I say that because the >> www.dspguru website has been a "dead website" for years now. >> (Its creator, Grant Griffin, is no longer working on >> that web site. As far as I know, Grant is no longer >> involved in the DSP business.) > > I have discussed with Rick, the idea of creating a new "dspguru" site > since Grant is long gone. In addition to general topics, I am also > specificly interested in creating a new SHARC resource similar to the old > Whygee SHARC site. > > I realize that my company is a bit partisan, but we don't plan to > disappear. This means than a resource like dspguru may have become stale. > > Thoughts?
Yeah. How about we create a "comp.dsp" site? The hosting service I use, hub.org, http://www.hub.org/ offers a basic plan for $120/year for 1GB of space and 8GB of traffic per month. If ten of us regulars get together, that's only $12/year. -- % Randy Yates % "Watching all the days go by... %% Fuquay-Varina, NC % Who are you and who am I?" %%% 919-577-9882 % 'Mission (A World Record)', %%%% <yates@ieee.org> % *A New World Record*, ELO http://home.earthlink.net/~yatescr
On Sat, 21 Jan 2006 13:49:04 -0500, "John E. Hadstate"
<jh113355@hotmail.com> wrote:

> >"Rick Lyons" <R.Lyons@_BOGUS_ieee.org> wrote in message >news:43d191ee.465595437@news.sf.sbcglobal.net... > >> >> Hope some of what I wrote makes sense. > >Everything you wrote makes sense. You've convinced me that >I need to buy your book. ;-)
Hi John, Great. Then I'd be able to buy milk and bread for my starving children. (If ya' do buy a copy, let me know so I can send you the errata.) By the way, I left out an important issue in Step# 2 of my last post. (Ha, no one caught me!) The steps that I wrote will work but if the C(n) = I(n) +j*Q(n) signal is not centered at zero Hz, the FM demod output will be riding on a DC bias. To avoid that, we should freq translate C(n) down so it's centered at DC before we perform the arctan operation. Another powerful reason to have C(n) centered at zero Hz is that computationally-simple differentiators work much better for low-frequency signals.
> >Thanks again.
You are most welcome. See Ya, [-Rick-], a guy who grew up in a city that was part "chocolate" & part "vanilla". Ha ha ha ha ha