DSPRelated.com
Forums

Hilbert transform FIR size

Started by jungledmnc August 6, 2010
Hi,
I want to create a frequency shifter for audio. First I need to get an
analytical signal via a hilbert transformer. I started by checking out how
long the Hilbert FIR would be. Unfortunately I ended with 20ms, which seems
to be related to -3dB at 50Hz (1/0.02). Isn't there another way to do that?
I mean 20ms is a relatively long delay for realtime processing and also 800
taps would need relatively lots of CPU power.

Thanks.

jungledmnc wrote:

> Hi, > I want to create a frequency shifter for audio. First I need to get an > analytical signal via a hilbert transformer. I started by checking out how > long the Hilbert FIR would be. Unfortunately I ended with 20ms, which seems > to be related to -3dB at 50Hz (1/0.02). Isn't there another way to do that? > I mean 20ms is a relatively long delay for realtime processing and also 800 > taps would need relatively lots of CPU power.
Don't use Hilbert FIR. Use IIR allpass filter. Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com
Thanks. Could you please point me to some keywords to search for?

On 08/06/2010 03:24 PM, jungledmnc wrote:
> Thanks. Could you please point me to some keywords to search for?
"Allpass filter" is a good start. You have two options: an allpass network that gives a pretty good approximation to 90 degrees phase shift in the frequency range of interest, or a pair of allpass networks that have about 90 degrees phase shift between the two channels. Check back here if those keywords don't help. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com Do you need to implement control loops in software? "Applied Control Theory for Embedded Systems" was written for you. See details at http://www.wescottdesign.com/actfes/actfes.html
Thanks Tim. I was checking about the solution with 2 allpass networks. What
I don't understand is why do I have to use networks? I tried just for
curiosity to use 2 biquad allpasses, found some points where they were
around 90 degrees to each other, but the differences were quite big. Is
that why we have to use multiple sections? And how should I compute the
coefficients?

I read this text:
http://www.katjaas.nl/hilbert/hilbert.html

There were also "polyphase IIRs" mentioned. I quite don't understand how
they should work. First why is there some 1 sample delay on the second
channel? And again, how could I get the coefficients? There are some raw
numbers, but now explanation how to find them out.

jungledmnc wrote:
> Thanks. Could you please point me to some keywords to search for?
The keyword is DIY. A +/-45 degree IIR phase shifter is typical numeric optimization problem (minimizing error vector magnitude). For the audio purposes, you will likely need a filter of the order of 6...8. Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com
On 08/06/2010 05:53 PM, jungledmnc wrote:
> Thanks Tim. I was checking about the solution with 2 allpass networks. What > I don't understand is why do I have to use networks?
I said "network" when I should have said "filter".
> I tried just for > curiosity to use 2 biquad allpasses, found some points where they were > around 90 degrees to each other, but the differences were quite big. Is > that why we have to use multiple sections?
Yes. But hopefully you won't need nearly as many as you would for the Hilbert transform.
> And how should I compute the coefficients?
Good question! I dunno -- or at least I don't know any structured ways. If I needed to do his I'd search around on the web for a bit, then I'd fiddle around with Scilab to find a set of coefficients that really seemed to work.
> I read this text: > http://www.katjaas.nl/hilbert/hilbert.html > > There were also "polyphase IIRs" mentioned. I quite don't understand how > they should work. First why is there some 1 sample delay on the second > channel? And again, how could I get the coefficients? There are some raw > numbers, but now explanation how to find them out.
I don't know -- I'm not familiar with what the author's trying to say, and my brief perusal of the site didn't really make anything jump out at me. I _can_ say that his "Polyphase IIR" is not the same thing as the usual "polyphase filter" -- so don't get confused if you run across that term and it seems to be a different animal. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com Do you need to implement control loops in software? "Applied Control Theory for Embedded Systems" was written for you. See details at http://www.wescottdesign.com/actfes/actfes.html
On Aug 7, 9:33&#4294967295;am, "jungledmnc" <jungledmnc@n_o_s_p_a_m.gmail.com>
wrote:
> Hi, > I want to create a frequency shifter for audio. First I need to get an > analytical signal via a hilbert transformer. I started by checking out how > long the Hilbert FIR would be. Unfortunately I ended with 20ms, which seems > to be related to -3dB at 50Hz (1/0.02). Isn't there another way to do that? > I mean 20ms is a relatively long delay for realtime processing and also 800 > taps would need relatively lots of CPU power. > > Thanks.
Hmmm make sure your Hilbert transformer thingy has the right number of turns. Hardy
"jungledmnc" <jungledmnc@n_o_s_p_a_m.gmail.com> wrote in message 
news:KYidnQr0LLY8FsHRnZ2dnUVZ_rSdnZ2d@giganews.com...
> Thanks. Could you please point me to some keywords to search for?
Search for: csound hilbert (Not in quotes) VC
On Fri, 06 Aug 2010 16:33:13 -0500, "jungledmnc"
<jungledmnc@n_o_s_p_a_m.gmail.com> wrote:

>Hi, >I want to create a frequency shifter for audio. First I need to get an >analytical signal via a hilbert transformer. I started by checking out how >long the Hilbert FIR would be. Unfortunately I ended with 20ms, which seems >to be related to -3dB at 50Hz (1/0.02). Isn't there another way to do that? >I mean 20ms is a relatively long delay for realtime processing and also 800 >taps would need relatively lots of CPU power. > >Thanks.
Hello jungledmnc, I don't know if you have access to IEEE articles, but Clay Turner has an article titled: "An Efficient Analytic Signal Generator" in the "DSP Tips and Tricks" column of the July 2009 issue of the IEEE Signal Processing Magazine. Good Luck, [-Rick-]