DSPRelated.com
Forums

Mirror Image of Magnitude Response

Started by I. R. Khan February 17, 2004
> But if H is purely imaginary, ie. H[w] = j Hr[w], where Hr is real, > then > > 1- Abs[H] = 1 + j H > > That would mean you get the coefficients of the new filter by taking > the Hilbert-Transform of the original filter h and add 1.0 to the > middle coefficient of the resulting filter (make sure the length of > this new filter is odd). > > What do you think?
Thanks Andor. I think this should work. You are right. I need 1+jH, which will be real because H is imaginary. If you can kindly give me some information on how to get the Hilbert-Transform of the original filter h, I shall be thankful. For example, what will be the Hilbert-Transform of {-1/6, -1/2, 0, 1/2, 1/6}. Regards, Ishtiaq.
Hello, Fred.

"Fred Marshall" <fmarshallx@remove_the_x.acm.org> wrote in message news:<C7idnbLi_4KCyq_d4p2dnA@centurytel.net>...
> > Ihtiaq, > > Just to make sure: I think you're saying that you have an antisymmetric > impulse response that, if centered at t=0, results in a purely imaginary > frequency response H. Right? Aligning the center at t=0 is the same as
If such an impulse response is not centered at t=0 it anyway results in a purely imaginary frequency response H, doesn't it?
> rotating or shifting the impulse response by half its length (length > measured either in time or in samples = time). > > Assuming that H is periodic at fs, I believe you will also find that > .. H is zero at f=0 and f=fs > .. the real part of H is symmetric
.. and also real part of H is zero I think Adel
I. R. Khan wrote:
> > But if H is purely imaginary, ie. H[w] = j Hr[w], where Hr is real, > > then > > > > 1- Abs[H] = 1 + j H > > > > That would mean you get the coefficients of the new filter by taking > > the Hilbert-Transform of the original filter h and add 1.0 to the > > middle coefficient of the resulting filter (make sure the length of > > this new filter is odd). > > > > What do you think? > > Thanks Andor. I think this should work. You are right. I need 1+jH, which > will be real because H is imaginary. If you can kindly give me some > information on how to get the Hilbert-Transform of the original filter h, I > shall be thankful. For example, what will be the Hilbert-Transform of > {-1/6, -1/2, 0, 1/2, 1/6}.
I just noticed it's not quite so easy. While 1 + j H is real only, it might be greater than 1, whereas 1 - Abs[H] can never be greater than 1. This approach only works if you know that sign(j H(w)) = const. Sorry, Andor. BTW: If you still want to look at the Hilbert Transform, you can do that in Matlab, for example.
"Andor" <an2or@mailcircuit.com> wrote in message
news:ce45f9ed.0402190352.3d5aa74d@posting.google.com...
> I. R. Khan wrote: > > > But if H is purely imaginary, ie. H[w] = j Hr[w], where Hr is real, > > > then > > > > > > 1- Abs[H] = 1 + j H > > > > > > That would mean you get the coefficients of the new filter by taking > > > the Hilbert-Transform of the original filter h and add 1.0 to the > > > middle coefficient of the resulting filter (make sure the length of > > > this new filter is odd). > > > > > > What do you think? > > > > Thanks Andor. I think this should work. You are right. I need 1+jH,
which
> > will be real because H is imaginary. If you can kindly give me some > > information on how to get the Hilbert-Transform of the original filter
h, I
> > shall be thankful. For example, what will be the Hilbert-Transform of > > {-1/6, -1/2, 0, 1/2, 1/6}. > > I just noticed it's not quite so easy. While 1 + j H is real only, it > might be greater than 1, whereas 1 - Abs[H] can never be greater than > 1. This approach only works if you know that sign(j H(w)) = const. >
I'm confused. It appears you're using an identity that's a new one: H complex Abs[H] complex ?????? From this follows: H real Abs[H] real .... OK H imaginary Abs[H] imaginary ????? Here are simple counter examples: H=1 Abs[H]=1 H=j Abs[H]=1 H=1+j Abs[H]=sqrt[2] a real scalar quantity.
"Adel" <tadam@pisem.net> wrote in message
news:c8d8c374.0402190218.2dec89ed@posting.google.com...
> Hello, Fred. > > "Fred Marshall" <fmarshallx@remove_the_x.acm.org> wrote in message
news:<C7idnbLi_4KCyq_d4p2dnA@centurytel.net>...
> > > > Ihtiaq, > > > > Just to make sure: I think you're saying that you have an antisymmetric > > impulse response that, if centered at t=0, results in a purely imaginary > > frequency response H. Right? Aligning the center at t=0 is the same as > > If such an impulse response is not centered at t=0 it anyway results > in a purely imaginary frequency response H, doesn't it?
***No. If such an impulse response is not centered at t=0 then it has an Even part and an Odd (antisymmetric) part. By superposition, the Even part transforms to a real, even function and the Odd part transforms to an imaginary, odd (antisymmetric) function. If it's centered at zero, the Even part goes away.
> > > rotating or shifting the impulse response by half its length (length > > measured either in time or in samples = time). > > > > Assuming that H is periodic at fs, I believe you will also find that > > .. H is zero at f=0 and f=fs > > .. the real part of H is symmetric > > .. and also real part of H is zero I think
Adel, No. As above. Shifting in time introduces an even or odd part like this: Take any arbitrary f(t) that is not either all even or all odd. You can split it into even and odd parts like this: fe(t)= [f(t)+f(-t)]/2 fo(t)= [f(t)-f(-t)]/2 | | 1.0 +---------+---------+ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -----------------------+---------+---------+--------------------- -T T time -> 0 Even function of time f(t) ^ | | 1.0 +-------------------+ | | | | | | | | | | | | | | | | | | | | ---------------------------------+-------------------+----------- time -> 0 2T Same function of time, shifted is no longer even f(t-T) ^ | | 0.5+-------------------+-------------------+ | | | | | | | | | | | | | | | -------------+-------------------+-------------------+----------- -2T time -> 0 2T The even part of f(t-T) ^ | | +-------------------+0.5 | | | | | | | | | | --------------+------------------0-------------------+----------- -2T| | |time -> | 2T | | | | | | -0.5+------------------+ The odd part of f(t-T) The sum of the even part and odd part yield f(t-T) ^ So, the real and imaginary parts of a Fourier Transform do change if a real time signal is shifted relative to where you decide to define t=0. Only if you shift t=0 along with it does it stay the same - in which case you have a "floating" definition of your time frame. The only exception one might note is a periodic (thus infinite) waveform where you may or may not deal with ambiguities of time shifts in increments of 2*pi radians. Fred
> > > > I just noticed it's not quite so easy. While 1 + j H is real only, it > > might be greater than 1, whereas 1 - Abs[H] can never be greater than > > 1. This approach only works if you know that sign(j H(w)) = const. > > > > I'm confused. It appears you're using an identity that's a new one: > > H complex > Abs[H] complex ?????? > > From this follows: > > H real > Abs[H] real .... OK > > H imaginary > Abs[H] imaginary ????? > > Here are simple counter examples: > > H=1 > Abs[H]=1 > > H=j > Abs[H]=1 > > H=1+j > Abs[H]=sqrt[2] a real scalar quantity.
Fred, I don't understand where you are confused. H is imaginary so jH is real, and so is Abs[H]. But jH = Abs[H] iff H has all -ive. Ishtiaq.

> I just noticed it's not quite so easy. While 1 + j H is real only, it > might be greater than 1, whereas 1 - Abs[H] can never be greater than > 1. This approach only works if you know that sign(j H(w)) = const.
Between 0 and fs/2, H is all -ive, but for fs/2 to fs, it is all positive. Yes you are right,
> BTW: If you still want to look at the Hilbert Transform, you can do > that in Matlab, for example.
For h = [-1 0 1] Matlab gives hilbert(h) = [-1 j 1]; seems that Hilbert Transform of a real sequence is not real. Regards, Ishtiaq.
"I. R. Khan" <ir_khan@hotmail.com> wrote in message
news:c13uk2$1debqf$1@ID-198607.news.uni-berlin.de...
> > > > > > I just noticed it's not quite so easy. While 1 + j H is real only, it > > > might be greater than 1, whereas 1 - Abs[H] can never be greater than > > > 1. This approach only works if you know that sign(j H(w)) = const. > > > > > > > I'm confused. It appears you're using an identity that's a new one: > > > > H complex > > Abs[H] complex ?????? > > > > From this follows: > > > > H real > > Abs[H] real .... OK > > > > H imaginary > > Abs[H] imaginary ????? > > > > Here are simple counter examples: > > > > H=1 > > Abs[H]=1 > > > > H=j > > Abs[H]=1 > > > > H=1+j > > Abs[H]=sqrt[2] a real scalar quantity. > > Fred, I don't understand where you are confused. H is imaginary so jH is > real, and so is Abs[H]. But jH = Abs[H] iff H has all -ive. >
Ishtiaq, I wasn't so much confused as I was concerned by what Andor said:
>But if H is purely imaginary, ie. H[w] = j Hr[w], where Hr is real, >then
>1- Abs[H] = 1 + j H
I believe this is incorrect. Perhaps it's notation. Let's see: H is purely imaginary - let's call it H=jP where P is real. I just used "P" instead of "Hr" to avoid confusion. jH is then purely real and has the opposite sign of P, i.e. jH = (j^2)*P = -P 1 - Abs[H] = 1 - Abs[jP] = 1 - Abs[P] ... the latter because sgn(P) goes away with Abs and so does j. at the same time: 1 + jH = 1 - P which is *not* the same as 1 - Abs[P] = 1 - Abs[H] I think the issue here is not so much whether jH is real, it's that Abs takes away all the negative values. If I've gone wrong, where is it? Fred
Fred, you are absolutely right. 1- Abs[H] =  1 + j H is not true for every
H. Later Andor also realized it as he mentioned it here:
> > > > > > > > I just noticed it's not quite so easy. While 1 + j H is real only,
it
> > > > might be greater than 1, whereas 1 - Abs[H] can never be greater
than
> > > > 1. This approach only works if you know that sign(j H(w)) = const.
If H is all positive then 1- Abs[H] = 1 + j H. For example, if H = [j/2, j, j/2] then 1-Abs[H] = [1/2, 0, 1/2] and 1 + j H = [1/2, 0, 1/2] Regards, Ishtiaq.
I. R. Khan wrote:
> > I just noticed it's not quite so easy. While 1 + j H is real only, it > > might be greater than 1, whereas 1 - Abs[H] can never be greater than > > 1. This approach only works if you know that sign(j H(w)) = const. > > Between 0 and fs/2, H is all -ive, but for fs/2 to fs, it is all positive. > Yes you are right, > > > BTW: If you still want to look at the Hilbert Transform, you can do > > that in Matlab, for example. > > > For h = [-1 0 1] > Matlab gives hilbert(h) = [-1 j 1]; > seems that Hilbert Transform of a real sequence is not real.
The name of this function is misleading. hilbert(h) uses the Hilbert Transform to calculate the appropriate imaginary part to make an analytic vector with real part h. So imag(hilbert(h)) is the actual Hilbert Transform of h. This is just a wide-band 90&#4294967295; phase shift (= arg(j) ). In your case, [0 1 0] is the Hilbert Transform of [-1 0 1]. Regards, Andor