DSPRelated.com
Forums

FIR Hilber Transformer

Started by I. R. Khan May 29, 2006
Could some one please help me in the following matter?

Given a set of tap-coefficients, how can it be found that the filter is 
a Hilbert transformer (HT) or not?

On a website (http://www-users.cs.york.ac.uk/~fisher/cgi-bin/mkfscript), 
the phase response of a designed HT is plotted and looks like magnitude 
response of a half band low pass filter. However when I design a HT in 
matlab using
b = remez(11,[0.1 0.9],[1 1], 'hilbert');
and plot the unwrapped angle using
freqz(b,1,'whole');
it looks like a straight line.

So, my question in other words is:
How can I plot a phase response of a HT in Matlab similar to one shown 
on the website?

PS: This is not a homework question, although it looks like one.
By simple inspection you can see if the phase repsonse matches that of
a Hilbert transformer. The coefs need to have odd symmetry. This is
necessary in order to have a 90 degree phase shift.

Clay

But odd symmetric coefficients do not necessarily make a HT. A 
differentiator also has odd symmetric coefficients.

Clay wrote:
> By simple inspection you can see if the phase repsonse matches that of > a Hilbert transformer. The coefs need to have odd symmetry. This is > necessary in order to have a 90 degree phase shift. > > Clay >
throws the communication out of order.
Top post is confusing because it

I. R. Khan wrote:

> But odd symmetric coefficients do not necessarily make a HT. A > differentiator also has odd symmetric coefficients. > > Clay wrote: > >> By simple inspection you can see if the phase repsonse matches that of >> a Hilbert transformer. The coefs need to have odd symmetry. This is >> necessary in order to have a 90 degree phase shift.
I assume you want the HT to occupy the widest bandwidth between DC and Fs/2. Number the coefficients c[n] according to their position from the center, negative for one side, positive. For an odd number of coefficients, c[0] is zero, and so are all other even-numbered ones. The odd numberer coefficients, multiplied by their indices, will be a constant. I leave the cases of an even number of taps and the proper constant for unity gain as an exercise. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Jerry Avins wrote:
> throws the communication out of order. > Top post is confusing because it > > I. R. Khan wrote: > >> But odd symmetric coefficients do not necessarily make a HT. A >> differentiator also has odd symmetric coefficients. >> >> Clay wrote: >> >>> By simple inspection you can see if the phase repsonse matches that of >>> a Hilbert transformer. The coefs need to have odd symmetry. This is >>> necessary in order to have a 90 degree phase shift. > > I assume you want the HT to occupy the widest bandwidth between DC and > Fs/2. Number the coefficients c[n] according to their position from the > center, negative for one side, positive. For an odd number of > coefficients, c[0] is zero, and so are all other even-numbered ones. The > odd numberer coefficients, multiplied by their indices, will be a > constant.
Are you talking about windows based design? This does not seem true for other designs. For example, for the following HT {-1/16, 0, -9/16, 0, 9/16, 0, 1/16} I found a very nice chapter on HTs in Rick's book, and got the information that I needed. Thanks for your reply. I leave the cases of an even number of taps and the proper
> constant for unity gain as an exercise. > > Jerry
I. R. Khan wrote:
> But odd symmetric coefficients do not necessarily make a HT.
most certainly true. all the odd symmetric thing does is give you a 90 degree phase shift (ignoring the delay needed for causality).
> A differentiator also has odd symmetric coefficients.
yes, that 90 degree phase shift (and odd symmetry) is what an differentiator and H.T. have in common. what they *don't* have in common is the magnitude of the frequency response. the differentiator will (within a certain margin of error) have a magnitude that is increasing linearly with frequency while the H.T. has (withing a certain margin or error) a constant magnitude w.r.t. frequency. there is no perfect H.T. that is realizable, but you *can* have a perfect 90 degree phase shift (plus a constant delay). if the magnitude response between DC and Nyquist is constant enough for your tolerance, call it a "Hilbert Transformer". if the magnitude response is not sufficiently constant, consider calling it a "crappy Hilbert transformer". if the magnitude response is approximately linear with frequency, consider calling it an approximation to a differentiator. r b-j
robert bristow-johnson wrote:

-- snip --

> if the magnitude response > is not sufficiently constant, consider calling it a "crappy Hilbert > transformer".
Chuckle
> if the magnitude response is approximately linear with > frequency, consider calling it an approximation to a differentiator. > > r b-j >
Don't forget our friend the integrator! -- Tim Wescott Wescott Design Services http://www.wescottdesign.com Posting from Google? See http://cfaj.freeshell.org/google/ "Applied Control Theory for Embedded Systems" came out in April. See details at http://www.wescottdesign.com/actfes/actfes.html
Thanks RBJ for explaining. I have another related question, and hope you 
or some one else can explain.

We can transform an even length FIR differentiator to a Hilbert 
transformer by just making few changes to the signs of the impulse 
response coefficients. If we just assign negative sign to the first half 
of the coefficients and positive sign to the second half, we get a HT. 
Why does it happen? What actually happens to the frequency (magnitude) 
response of differentiator by making these changes to the impulse 
response coefficients?

I can understand the transformation of differentiator to halfband 
lowpass filter, that we take derivative of the differentiator's 
frequency response (multiply impulse response coefficients with 
indices), squeeze to half (insert zeros in impulse response) and scale 
(set middle coefficient to 1/2 etc). How can we explain transformation 
of differentiator to HT?

Ishtiaq.
I. R. Khan wrote:

> Jerry Avins wrote: > >> throws the communication out of order. >> Top post is confusing because it >> >> I. R. Khan wrote: >> >>> But odd symmetric coefficients do not necessarily make a HT. A >>> differentiator also has odd symmetric coefficients. >>> >>> Clay wrote: >>> >>>> By simple inspection you can see if the phase repsonse matches that of >>>> a Hilbert transformer. The coefs need to have odd symmetry. This is >>>> necessary in order to have a 90 degree phase shift. >> >> >> I assume you want the HT to occupy the widest bandwidth between DC and >> Fs/2. Number the coefficients c[n] according to their position from the >> center, negative for one side, positive. For an odd number of >> coefficients, c[0] is zero, and so are all other even-numbered ones. The >> odd numberer coefficients, multiplied by their indices, will be a >> constant. > > > Are you talking about windows based design?
Yes. Before windowing.
> This does not seem true for > other designs. For example, for the following HT > {-1/16, 0, -9/16, 0, 9/16, 0, 1/16}
Did you plot the magnitude response? What is the useful bandwidth? Compare it to [-6 0 -10 0 -30 0 +30 0 +10 0 +6]
> I found a very nice chapter on HTs in Rick's book, and got the > information that I needed. Thanks for your reply.
That book is good for a lot of things; you're welcome. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Tim Wescott wrote:
> robert bristow-johnson wrote: > > -- snip -- > > > if the magnitude response is approximately linear with > > frequency, consider calling it an approximation to a differentiator.
...
> > > Don't forget our friend the integrator!
in a sense, that's a better comparison since the integrator and H.T. are both 90 degree lag. r b-j