From: steveu on
>On Apr 22, 3:49=A0am, John Monro <johnmo...(a)optusnet.com.au> wrote:
>> Robert Orban wrote:
>> > In article <Xs6dnbGFup7rZ1rWnZ2dnUVZ_t-dn...(a)giganews.com>,
>> > steveu(a)n_o_s_p_a_m.coppice.org says...
>>
>> >> Just a few terms for an FIR implementation of a Hilbert transform can
=
>give
>> >> you pretty close to 90 degrees over a large part of the band. Don't
ex=
>pect
>> >> a perfect brick wall transition from + to - 90 at DC, though. Its
the
>> >> amplitude response that is the greater problem. It takes a lot of
term=
>s to
>> >> get that close to flat at low and high frequencies.
>>
>> > IIRC, as long as the impulse response of the FIR is stictly
antimetric
>> > around the center tap, you will have an exact 90 degree phase shift (+
=
>a
>> > fixed delay) at all frequencies regardless of the number of taps. (A
>> > trivial example is a three-tap filter whose impulse response is -1, 0,
=
>+1.)
>> > The problem, as other posters have commented, is that for a given
ampli=
>tude
>> > passband bandwidth, low-order FIR filters have larger amounts of
amplit=
>ude
>> > ripple in the filter passband than higher-order filters and no filter
w=
>ith
>> > a finite number of taps can have an ampltude bandwidth extending from
D=
>C to
>> > fs/2.
>>
>> > It is possible to transform the filter structure such that the
amplitud=
>e
>> > response is flat but the phase shift error varies over the passband.
Wh=
>at
>> > is not possible with a finite number of taps is to obtain a flat
passba=
>nd
>> > from 0 to fs/2 Hz and a 90 degree phase shift (+ fixed delay)
>> > simultaneously.
>>
>> Usually the problem is not that you can't tolerate a little
>> gain variaton across the passband but that you need to match
>> closely the frequency response of the in-phase channel to
>> the frequency response of the quadrature channel.
>>
>> A common solution is to produce an in-phase signal that has
>> the same ripple as the quadrature signal. =A0This is done by
>> applying the original signal to a HP FIR filter that is a
>> symmetrical version of the Hilbert transformer.
>>
>> Regards,
>> John- Hide quoted text -
>>
>> - Show quoted text -
>
>Or you can simply design a 45 degree phase shift filter. Then simply
>pass your original signal through the filter and a copy of the
>original signal through a time reversed version of the filter. The
>difference between the two is 90 degrees and the amplitude responses
>are identical.

The first time I saw that idea I thought "Darn, I wish I'd thought of
that". :-)

Steve

From: Clay on
On Apr 22, 11:23 am, "steveu" <steveu(a)n_o_s_p_a_m.coppice.org> wrote:
> >On Apr 22, 3:49=A0am, John Monro <johnmo...(a)optusnet.com.au> wrote:
> >> Robert Orban wrote:
> >> > In article <Xs6dnbGFup7rZ1rWnZ2dnUVZ_t-dn...(a)giganews.com>,
> >> > steveu(a)n_o_s_p_a_m.coppice.org says...
>
> >> >> Just a few terms for an FIR implementation of a Hilbert transform can
> =
> >give
> >> >> you pretty close to 90 degrees over a large part of the band. Don't
> ex=
> >pect
> >> >> a perfect brick wall transition from + to - 90 at DC, though. Its
> the
> >> >> amplitude response that is the greater problem. It takes a lot of
> term=
> >s to
> >> >> get that close to flat at low and high frequencies.
>
> >> > IIRC, as long as the impulse response of the FIR is stictly
> antimetric
> >> > around the center tap, you will have an exact 90 degree phase shift (+
> =
> >a
> >> > fixed delay) at all frequencies regardless of the number of taps. (A
> >> > trivial example is a three-tap filter whose impulse response is -1, 0,
> =
> >+1.)
> >> > The problem, as other posters have commented, is that for a given
> ampli=
> >tude
> >> > passband bandwidth, low-order FIR filters have larger amounts of
> amplit=
> >ude
> >> > ripple in the filter passband than higher-order filters and no filter
> w=
> >ith
> >> > a finite number of taps can have an ampltude bandwidth extending from
> D=
> >C to
> >> > fs/2.
>
> >> > It is possible to transform the filter structure such that the
> amplitud=
> >e
> >> > response is flat but the phase shift error varies over the passband.
> Wh=
> >at
> >> > is not possible with a finite number of taps is to obtain a flat
> passba=
> >nd
> >> > from 0 to fs/2 Hz and a 90 degree phase shift (+ fixed delay)
> >> > simultaneously.
>
> >> Usually the problem is not that you can't tolerate a little
> >> gain variaton across the passband but that you need to match
> >> closely the frequency response of the in-phase channel to
> >> the frequency response of the quadrature channel.
>
> >> A common solution is to produce an in-phase signal that has
> >> the same ripple as the quadrature signal. =A0This is done by
> >> applying the original signal to a HP FIR filter that is a
> >> symmetrical version of the Hilbert transformer.
>
> >> Regards,
> >> John- Hide quoted text -
>
> >> - Show quoted text -
>
> >Or you can simply design a 45 degree phase shift filter. Then simply
> >pass your original signal through the filter and a copy of the
> >original signal through a time reversed version of the filter. The
> >difference between the two is 90 degrees and the amplitude responses
> >are identical.
>
> The first time I saw that idea I thought "Darn, I wish I'd thought of
> that". :-)
>
> Steve- Hide quoted text -
>
> - Show quoted text -

After my article came out, a very famous DSPer wrote me and said he
wished he had thought of it. It one of those things that after seeing
the solution seems so obvious.

Clay
From: Dirk Bell on
On Apr 16, 1:26 am, Jerry Avins <j...(a)ieee.org> wrote:
> On 4/16/2010 12:43 AM, cfy30 wrote:
>
>
>
>
>
> > Hi all,
>
> > I am a newbie to Hilbert transform. I found the follow definition from
> > textbook
>
> > H(f) = -j or -90degree, f>0
> > H(f) =  j or +90degree, f<0
> > H(f) =  0, f=0
>
> > But when I plot the phase out in Matlab, I saw that the phase is not
> > constant at -90 or +90degree across frequency. The code I have is as
> > follow
>
> > b = firpm(10,[.1 .9],[1 1],'Hilbert')
> > w = linspace(-pi, pi, 2^12);
> > h = freqz(b, 1, w);
> > plot(w, angle(h)*180/pi);
>
> > What do I miss?
>
> The phase is 90 degrees only over a limited band. All bets are off at
> Fs/2, and you can't include enough taps to get 90 degrees of delay at
> DC. What's more, there will be some amplitude ripple in the passband.
>
> Jerry
> --
> "It does me no injury for my neighbor to say there are 20 gods, or no
> God. It neither picks my pocket nor breaks my leg."
>           Thomas Jefferson to the Virginia House of Delegates in 1776.
> ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯- Hide quoted text -
>
> - Show quoted text -

Jerry,

The phase is not really 90 degrees only over a "limited" band. Try a
100K point FFT on the OP's filter (remove delay) and the only 2 values
that are not +-pi/2 with error magnitude <4*10^-13 radians are at 0
and pi radians where they are zero. The phase is essentially correct
over the whole band. The amplitude is another story.

Dirk

From: Jerry Avins on
On 4/22/2010 2:26 PM, Dirk Bell wrote:
> On Apr 16, 1:26 am, Jerry Avins<j...(a)ieee.org> wrote:
>> On 4/16/2010 12:43 AM, cfy30 wrote:
>>
>>
>>
>>
>>
>>> Hi all,
>>
>>> I am a newbie to Hilbert transform. I found the follow definition from
>>> textbook
>>
>>> H(f) = -j or -90degree, f>0
>>> H(f) = j or +90degree, f<0
>>> H(f) = 0, f=0
>>
>>> But when I plot the phase out in Matlab, I saw that the phase is not
>>> constant at -90 or +90degree across frequency. The code I have is as
>>> follow
>>
>>> b = firpm(10,[.1 .9],[1 1],'Hilbert')
>>> w = linspace(-pi, pi, 2^12);
>>> h = freqz(b, 1, w);
>>> plot(w, angle(h)*180/pi);
>>
>>> What do I miss?
>>
>> The phase is 90 degrees only over a limited band. All bets are off at
>> Fs/2, and you can't include enough taps to get 90 degrees of delay at
>> DC. What's more, there will be some amplitude ripple in the passband.


> Jerry,
>
> The phase is not really 90 degrees only over a "limited" band. Try a
> 100K point FFT on the OP's filter (remove delay) and the only 2 values
> that are not +-pi/2 with error magnitude<4*10^-13 radians are at 0
> and pi radians where they are zero. The phase is essentially correct
> over the whole band. The amplitude is another story.

Dirk,

Of course you're right. Antisymmetry assures that the phase be perfect
even with a balanced differentiator, [-1, 0, +1]. I had in mind the
implementation with parallel filters whose difference approximates 90
degrees over the bans of interest. Bad form!

Jerry
--
"It does me no injury for my neighbor to say there are 20 gods, or no
God. It neither picks my pocket nor breaks my leg."
Thomas Jefferson to the Virginia House of Delegates in 1776.
���������������������������������������������������������������������
From: Dirk Bell on
On Apr 22, 5:42 pm, Jerry Avins <j...(a)ieee.org> wrote:
> On 4/22/2010 2:26 PM, Dirk Bell wrote:
>
>
>
>
>
> > On Apr 16, 1:26 am, Jerry Avins<j...(a)ieee.org>  wrote:
> >> On 4/16/2010 12:43 AM, cfy30 wrote:
>
> >>> Hi all,
>
> >>> I am a newbie to Hilbert transform. I found the follow definition from
> >>> textbook
>
> >>> H(f) = -j or -90degree, f>0
> >>> H(f) =  j or +90degree, f<0
> >>> H(f) =  0, f=0
>
> >>> But when I plot the phase out in Matlab, I saw that the phase is not
> >>> constant at -90 or +90degree across frequency. The code I have is as
> >>> follow
>
> >>> b = firpm(10,[.1 .9],[1 1],'Hilbert')
> >>> w = linspace(-pi, pi, 2^12);
> >>> h = freqz(b, 1, w);
> >>> plot(w, angle(h)*180/pi);
>
> >>> What do I miss?
>
> >> The phase is 90 degrees only over a limited band. All bets are off at
> >> Fs/2, and you can't include enough taps to get 90 degrees of delay at
> >> DC. What's more, there will be some amplitude ripple in the passband.
> > Jerry,
>
> > The phase is not really 90 degrees only over a "limited" band.  Try a
> > 100K point FFT on the OP's filter (remove delay) and the only 2 values
> > that are not +-pi/2 with error magnitude<4*10^-13 radians are at 0
> > and pi radians where they are zero.  The phase is essentially correct
> > over the whole band.  The amplitude is another story.
>
> Dirk,
>
> Of course you're right. Antisymmetry assures that the phase be perfect
> even with a balanced differentiator, [-1, 0, +1]. I had in mind the
> implementation with parallel filters whose difference approximates 90
> degrees over the bans of interest. Bad form!
>
> Jerry
> --
> "It does me no injury for my neighbor to say there are 20 gods, or no
> God. It neither picks my pocket nor breaks my leg."
>           Thomas Jefferson to the Virginia House of Delegates in 1776.- Hide quoted text -
>
> - Show quoted text -

Hi Jerry,

I took my post down because I looked at later posts and thought it was
basically covered. However antisymmetry by itself is not enough to
guarantee perfect phase. For example [1 0 -1 0 1
0 -1] does not work.

I was curious about another comment somone here made. What is the
best way to design a 45 degree phase shifter?

Dirk
First  |  Prev  |  Next  |  Last
Pages: 1 2 3 4 5
Prev: T1CMPR and CMPR1
Next: MMSE & LMS Equalization Question