DSPRelated.com
Forums

how to normalize complex filter?

Started by Andreas Besting September 3, 2006
Hi!

I'm trying to implement a wavelet transform via convolution and my 
"filter" is a complex wavelet. It works fine but the resulting amplitude 
seems to be wrong... I think I have to normalize the wavelet somehow, 
but i can't figure out how.
I understand that i can normalize a real filter (e.g. sinc) by summing 
up the samples and devide all samples by this number. I tried to do the 
same with the magnitude of each complex sample of the wavelet but it 
didn't work.
I guess i'm not so good at complex numbers (shame...) :-)
Has anyone an idea?

Thanks in advance!

Andy
My guess is to divide all the coefficients by the norm of the
coefficient vector. Norm is the square-root of the absolute squared sum
of the coefficients.
I hope it will work. :p

Regards



Andreas Besting wrote:
> Hi! > > I'm trying to implement a wavelet transform via convolution and my > "filter" is a complex wavelet. It works fine but the resulting amplitude > seems to be wrong... I think I have to normalize the wavelet somehow, > but i can't figure out how. > I understand that i can normalize a real filter (e.g. sinc) by summing > up the samples and devide all samples by this number. I tried to do the > same with the magnitude of each complex sample of the wavelet but it > didn't work. > I guess i'm not so good at complex numbers (shame...) :-) > Has anyone an idea? > > Thanks in advance! > > Andy
Andreas Besting wrote:

> I'm trying to implement a wavelet transform via convolution and > my "filter" is a complex wavelet. It works fine but the > resulting amplitude seems to be wrong... I think I have to > normalize the wavelet somehow, but i can't figure out how. > I understand that i can normalize a real filter (e.g. sinc) by > summing up the samples and devide all samples by this number.
That forces the output to be 1 when the subsequence [1 1 1 ...] of at least the filter length appears in the input, aka unit DC gain. It works just the same for a complex impulse response -- divide by the coefficient sum.
> I tried to do the same with the magnitude of each complex sample > of the wavelet but it didn't work.
Now, that makes for unit peak gain -- the largest output magnitude you could ever see is forced to 1, which occurs when the input subsequence is such that all terms in the convolution sum have the same complex phase. It in turn works the same for a real IR. You will also want to achieve unit Nyquist gain at times. For that, divide by the dot product of the IR with [1 -1 1 -1 ...]. Martin -- Education is the ability to listen to almost anything without losing your temper. --Robert Frost
I think i got it now, after deviding by the the sum i had to multiply it 
it with the samplerate to get the right result... strange. Still trying 
to understand why, but it really seems to work.


> > You will also want to achieve unit Nyquist gain at times. For that, > divide by the dot product of the IR with [1 -1 1 -1 ...]. >
What is "unit Nyquist gain"? Thanks for both of your replies! Andy
Andreas Besting wrote:

>> You will also want to achieve unit Nyquist gain at times. For >> that, divide by the dot product of the IR with [1 -1 1 -1 ...]. > > What is "unit Nyquist gain"?
If the transfer function is H(z), it means that |H(-1)|^2 = 1. Martin -- I think there is a world market for maybe five computers. --Thomas Watson, Chairman of IBM, 1943
Is your wavelet complex or data complex?

If your data on which you are doing convolution is complex, you need to do
the wavelete compression separately fro the mag and phase.

Phase map wavelet decomposition is an unsolved problem (I had posted it
here a couple of weeks back and got no response), subsequently I searched
the lit and found no nice solution. You can assume -pi/2 to pi/2 can be
quantized between 0 and 255 and treat the phase map as any image and use
wavelets. but the cons are that the artifical discontinuities in the map
introduced by atan2 will hinder you from doing a good job of compression,
if that is your goal.

I have a technique discovered now, but I am in the process of patenting
it, hence cant discuss on this group.


>Hi! > >I'm trying to implement a wavelet transform via convolution and my >"filter" is a complex wavelet. It works fine but the resulting amplitude
>seems to be wrong... I think I have to normalize the wavelet somehow, >but i can't figure out how. >I understand that i can normalize a real filter (e.g. sinc) by summing >up the samples and devide all samples by this number. I tried to do the >same with the magnitude of each complex sample of the wavelet but it >didn't work. >I guess i'm not so good at complex numbers (shame...) :-) >Has anyone an idea? > >Thanks in advance! > >Andy >