Sign in

username:

password:



Not a member?

Search compdsp



Search tips

comp.dsp by Keywords

Adaptive Filter | ADPCM | ADSP | ADSP-2181 | Aliasing | AMR | Anti-Aliasing | ARMA | Autocorrelation | AutoCovariance | Beamforming | Bessel | Blackfin | Butterworth | C6713 | CCS | Chebyshev | CIC Filter | Circular Convolution | Code Composer Studio | Comb Filter | Compression | Convolution | Cross Correlation | DCT | Decimation | Deconvolution | Demodulation | DM642 | DSP Boards | DSP/BIOS | DTMF | Echo Cancellation | Equalization | Equalizer | ETSI | EZLITE (Ez-kit Lite) | FFT | FFTW | FIR Filter | Fixed Point | FSK | G.711 | G.723 | G.729 | Gaussian Noise | Goertzel | GPIO | Hilbert Transform | IFFT | IIR Filter | Interpolation | Invariance | JTAG | Kalman | Laplace Transform | Levinson | LPC | McBSP | MIPS | Modulation | MPEG | Multirate | Notch Filter | Nyquist | OFDM | Oversampling | Pink Noise | Pitch | PLL | Polyphase | QAM | QDMA | Quantization | Quantizer | Radar | Random Noise | Reed Solomon | Remez | Resampling | RTDX | Sampling | Sharc | TI C6711 | Undersampling | Viterbi | Wavelets | White Noise | Wiener Filter | Windowing | XDS510PP | Z Transform

Sponsor

Industry's highest performing at the lowest power DSPs now as low as $5.00*
Start development today!
*volume pricing for 10ku

Discussion Groups

Free Online Books

See Also

Embedded SystemsFPGAElectronics

Discussion Groups | Comp.DSP | Mirror Image of Magnitude Response

There are 23 messages in this thread.

You are currently looking at messages 0 to 10.


Mirror Image of Magnitude Response - I. R. Khan - 2004-02-17 05:03:00

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.

______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: Mirror Image of Magnitude Response - Jerry Avins - 2004-02-17 10:41:00



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.
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: Mirror Image of Magnitude Response - Fred Marshall - 2004-02-17 13:00:00

"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


______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: Mirror Image of Magnitude Response - I. R. Khan - 2004-02-17 21:56:00

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.

______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: Mirror Image of Magnitude Response - I. R. Khan - 2004-02-17 22:31:00

> 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.

______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: Mirror Image of Magnitude Response - Jerry Avins - 2004-02-17 23:19:00

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.
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: Mirror Image of Magnitude Response - I. R. Khan - 2004-02-17 23:28:00

"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.

______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: Mirror Image of Magnitude Response - Andor - 2004-02-18 05:15:00

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
______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: Mirror Image of Magnitude Response - jim - 2004-02-18 08:39:00


"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! =-----
______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: Mirror Image of Magnitude Response - Fred Marshall - 2004-02-18 17:06:00

"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


______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

| 1 | 2 | 3 | next