There are 23 messages in this thread.
You are currently looking at messages 0 to 10.
I have a real impulse response h of an FIR filter, and its frequency response H is pure imaginary (if I rotate h to left by half of its length). I want the impulse response of a filter whose magnitude response is 1-Abs[H]. Is it possible to do this with some trick on h? Regards, Ishtiaq.______________________________
I. R. Khan wrote: > I have a real impulse response h of an FIR filter, and its frequency > response H is pure imaginary (if I rotate h to left by half of its length). > I want the impulse response of a filter whose magnitude response is > 1-Abs[H]. Is it possible to do this with some trick on h? > > Regards, > Ishtiaq. > I don't offhand know. Rotation is measured by angle. How should I interpret rotating by a length? Jerry -- Engineering is the art of making what you want from things you can get. ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯______________________________
"I. R. Khan" <i...@hotmail.com> wrote in message news:c0sou8$1atqq3$1...@ID-198607.news.uni-berlin.de... > I have a real impulse response h of an FIR filter, and its frequency > response H is pure imaginary (if I rotate h to left by half of its length). > I want the impulse response of a filter whose magnitude response is > 1-Abs[H]. Is it possible to do this with some trick on h? 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 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 .. the imaginary part of H is antisymmetric (around f=0). .. Therefore,the imaginary part has to be zero at f=0, f=fs/2,f=fs So far, these are just a truisms. Now you want a filter whose magnitude response is 1-Abs[H] where H is the one mentioned above. Well, Abs[H] is a real, even function isn't it? It also has zeros at f=0 and f=fs. So, 1-Abs[H] is also real and even because 1 is real and even and real even +/- another real even = a new real even, right? Only now, instead of there being zeros at f=0 and f=fs, the value will be 1.0. All the other values are arbitrary I believe. So, you can figure it out using an FFT/IFFT process easily enough. However, ABS in frequency has no dual in time as far as I know. So, the answer to your question is: In general, No. Fred______________________________
Thanks Fred.
> 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
> .. the imaginary part of H is antisymmetric (around f=0).
> .. Therefore,the imaginary part has to be zero at f=0, f=fs/2,f=fs
Yes, yes, yes and yes. God! how did you know?
For example h = {1/(2pi), 0, -1/(2pi)}, and H is pure imaginary if centered
at t=0.
I want to shift H up by 1, and can do that by replacing zero in h by j
(=sqrt(-1)). I was wondering if it is possible to do it keeping the
coefficients all real.
This leads to another question. Is the impulse response h = {1/(2pi),
j, -1/(2pi)} of some importance to real inputs? I seems it will change them
to complex.
Infact h = {1/(2pi), j, -1/(2pi)} is a differentiator highly accurate at
fs/2, but I want a similar differentiator with real coefficients.
Regards,
Ishtiaq.
______________________________> I don't offhand know. Rotation is measured by angle. How should I > interpret rotating by a length? > > Jerry Jerry, I was using Mathematica that time and I just translated the follwoing command: h = RotateLeft[h, Length[h]/2]; Regards, Ishtaiq.______________________________
I. R. Khan wrote: >>I don't offhand know. Rotation is measured by angle. How should I >>interpret rotating by a length? >> >>Jerry > > > Jerry, I was using Mathematica that time and I just translated the follwoing > command: > > h = RotateLeft[h, Length[h]/2]; > > Regards, > Ishtaiq. I suppose that is a circumferential length on a number circle? Jerry -- Engineering is the art of making what you want from things you can get. ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯______________________________
"Jerry Avins" <j...@ieee.org> wrote in message news:4032e7cc$0$3072$6...@news.rcn.com... > I. R. Khan wrote: > > >>I don't offhand know. Rotation is measured by angle. How should I > >>interpret rotating by a length? > >> > >>Jerry > > > > > > Jerry, I was using Mathematica that time and I just translated the follwoing > > command: > > > > h = RotateLeft[h, Length[h]/2]; > > > > Regards, > > Ishtaiq. > > I suppose that is a circumferential length on a number circle? If h={a,b,c,d,e,f} then Length[h] = 6 and RotateLeft[h,3] = {d,e,f,a,b,c} Regards, Ishtiaq.______________________________
Fred Marshall wrote: > "I. R. Khan" wrote: > > I have a real impulse response h of an FIR filter, and its frequency > > response H is pure imaginary (if I rotate h to left by half of its > length). > > I want the impulse response of a filter whose magnitude response is > > 1-Abs[H]. Is it possible to do this with some trick on h? ... > So, you can figure it out using an FFT/IFFT process easily enough. > However, ABS in frequency has no dual in time as far as I know. > So, the answer to your question is: In general, No. 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? Regards, Andor______________________________
"I. R. Khan" wrote:
>
> Thanks Fred.
>
> > 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
> > .. the imaginary part of H is antisymmetric (around f=0).
> > .. Therefore,the imaginary part has to be zero at f=0, f=fs/2,f=fs
>
> Yes, yes, yes and yes. God! how did you know?
>
> For example h = {1/(2pi), 0, -1/(2pi)}, and H is pure imaginary if centered
> at t=0.
> I want to shift H up by 1, and can do that by replacing zero in h by j
> (=sqrt(-1)). I was wondering if it is possible to do it keeping the
> coefficients all real.
>
> This leads to another question. Is the impulse response h = {1/(2pi),
> j, -1/(2pi)} of some importance to real inputs? I seems it will change them
> to complex.
>
> Infact h = {1/(2pi), j, -1/(2pi)} is a differentiator highly accurate at
> fs/2, but I want a similar differentiator with real coefficients.
>
The center tap must be 0 for the filter to be real and anti-symmetric if there are
an odd number of taps.
-jim
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
______________________________"Andor" <a...@mailcircuit.com> wrote in message news:c...@posting.google.com... > Fred Marshall wrote: > > "I. R. Khan" wrote: > > > I have a real impulse response h of an FIR filter, and its frequency > > > response H is pure imaginary (if I rotate h to left by half of its > > length). > > > I want the impulse response of a filter whose magnitude response is > > > 1-Abs[H]. Is it possible to do this with some trick on h? > > ... > > > So, you can figure it out using an FFT/IFFT process easily enough. > > However, ABS in frequency has no dual in time as far as I know. > > So, the answer to your question is: In general, No. > > 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? Abs doesn't carry the "j" to the output. Abs yields a real number. So, 1-Abs[anything] is a real number. Fred______________________________