Reply by SG April 4, 20162016-04-04
On Tuesday, February 16, 2016 at 8:26:52 AM UTC+1, MC wrote:
> Hello, > I'm trying to understand the basic concept behind wavelets. I can't see h=
ow recursive multiplication by arbitrary values (wavelet coefficients) prod= uces frequency components within consecutive bands?
> Is wavelet output even comparable to real frequency components of input s=
ignal?
> I would appreciate it if someone could explain what's the relationship be=
tween wavelet output and frequency elements of input signal and how come th= ose are preserved when various wavelet algorithms (Haar, Daubechies, etc.) = have different coefficients? Is it safe for example to compare Haar and Dau= bechies output in terms of Hz values?
> Thanks, >=20 > M
In my opinion a reasonable approach for getting a feeling about what this wavelet stuff is about is to look at a very very simple example: Suppose you have a "discrete signal" (sequence of values). Another way of representing it without increasing the number of values is to compute averages and differences. Take two values (a, b), compute the average (m), compute the difference (s) and move on to the next pair. This can be written as a system of linear equations: |1/2 1/2| . |a| =3D |m| | 1 -1 | |b| |s| This is easily invertible: | 1 1/2| . |m| =3D |a| | 1 -1/2| |s| |b| So, mathematically, there is no loss of information (ignoring rounding errors due to finite precision). Now, you can interpret this as two signals: all the values m[] and all the values s[]. A question you might have is then: What part of the original signal is m[] and what part is in s[]? It turns out that the coefficients in the matrix to compute m[] behave a little like a lowpass filter. And the computation of s[] is like applying a highpass filter. So, for lower frequencies most of the content goes to m[] while for higher frequencies most of the content goes to s[]. We can think of it as a "decomposition" into a "lower subband" and a "higher subband". But it's a fairly simple decomposition and not particularly good at separating low frequencies from high frequencies. If you want a "stronger separation" you need "better" filters. For example, it might be desirable to adjust the filters so that the lowpass/highpass filters have a gain of 1.0 for the lower/upper 33% of the spectrum and a gain of around 0.0 for the upper/lower 33% of the spectrum, so that frequencies within these bands completely map to a single "subband" and only frequencies close enough to the middle appear in both subbands. Since m[] is just yet another signal, you can repeat the step and "split" m[] one level further into mm[] and ms[]. If the filters you use are "good enough", seperation will be strong so that a particular frequency in the source signal will only appear in one or two subbands. And if you keep this recursion going on for some levels, the lower subbands will have a bandwidth that is narrower than the higher subbands. So, where a sequence of short-time FFTs gives you a uniform time/frequency resolution across all frequencies, such a recursive "2-channel subband decomposition" will have a higher time resolution for higher subbands and a higher frequency resolution for lower subbands. And this is also called a "Wavelet decomposition" because almost all the coefficients (except for the lowest subband) represent the contribution of a single "wavelet function" at different scales and positions of time. In the simple example from above, the wavelet looks like this: +--+ ---+ | +--- +--+ With different filters that lead to a better seperation of low/high frequencies, this will look more wavy. But designing these kinds of filters is more of a black art. HTH, sg
Reply by rdferous April 4, 20162016-04-04
>I'm going to answer my own question, hopefully correctly. >This post, although related to Fourier transform, contains useful info: >http://stackoverflow.com/questions/4364823/how-do-i-obtain-the-frequencies-of-each-value-in-a-fft > >It says that FFT calculates cross-correlation of input signal with sine >and cosine functions at equally spaced frequencies. > >So it looks like wavelet output indicates correlation of input with
basis
>functions of given wavelet (mother/father functions). >If this is true then output of different wavelet algorithms cannot be >compared directly (e.g. Haar with Daubechies) since their basis functions
are
>different. > >By the same token wavelet output is not directly related to frequencies >composing input signal, but comparison is meaningful between output
elements
>of single wavelet function. >Thanks, > >M > > > > > >On Monday, February 15, 2016 at 11:26:52 PM UTC-8, MC wrote: >> Hello, >> I'm trying to understand the basic concept behind wavelets. I can't
see
>how recursive multiplication by arbitrary values (wavelet coefficients) >produces frequency components within consecutive bands? >> Is wavelet output even comparable to real frequency components of
input
>signal? >> I would appreciate it if someone could explain what's the relationship >between wavelet output and frequency elements of input signal and how
come
>those are preserved when various wavelet algorithms (Haar, Daubechies,
etc.)
>have different coefficients? Is it safe for example to compare Haar and >Daubechies output in terms of Hz values? >> Thanks, >> >> M
MC, Send an email to "rdfausner@san.rr.com" titled "Request DSPII Wavelet Project Paper" and I'll send you a copy of the "Wavelet : Frequency Estimation" technical paper I submitted for a DSP class I took at UCSD in 2006. The paper was based on an example project I found in Matlab "Wavelet Toolbox 3". -rdferous --------------------------------------- Posted through http://www.DSPRelated.com
Reply by February 19, 20162016-02-19
On Wednesday, February 17, 2016 at 6:28:28 PM UTC-6, MC wrote:
> I'm going to answer my own question, hopefully correctly. > This post, although related to Fourier transform, contains useful info: > http://stackoverflow.com/questions/4364823/how-do-i-obtain-the-frequencies-of-each-value-in-a-fft
To best understand this you have to put it in context and look at both the continuous and discrete wavelet transforms; and then try to understand in what sense the latter is a discretization of the former (it is). Kaiser explains it well and derives everything from first principles. https://www.google.com/?gws_rd=ssl#q=Kaiser+Wavelet+Friendly+Guide The ultimate reason for the funny coefficients is because in *both* the forward and inverse transforms are tied together. That makes it impossible to use Gaussian windows or the like (unless you do, like, a Gaussian window with frequency on a logarithmic scale). If you allow other things to be used in the inverse transform then you could get away with a lot more -- and things that look a lot more normal. The S-transform is essentially wavelets with a Gaussian-windowed exp(ix) whose inverse is "just add them up". So if f(q,p) is the transform of the function f(t) with q standing for time and p for frequency (= 1/scale) then the inverse would be F(p) = integral f(q,p) dq (i.e. log-frequency scale) to get the Fourier transform F(p) of f(t). Another (unnamed) transform can just as easily be devised where the inverse is "add them up" on a log frequency scale: f(q) = integral f(q,p) dp/|p|.
Reply by February 17, 20162016-02-17
Actually the intermediate calculations of the Fast Walsh Hadamard transform are wavelets.  I presume that is also the case with the FFT.  In the WHT case you can do far better compression using the intermediate values than with just the outputs of the WHT, which hardly can give any compression at all.  
Reply by MC February 17, 20162016-02-17
I'm going to answer my own question, hopefully correctly.
This post, although related to Fourier transform, contains useful info:
http://stackoverflow.com/questions/4364823/how-do-i-obtain-the-frequencies-of-each-value-in-a-fft

It says that FFT calculates cross-correlation of input signal with sine and cosine functions at equally spaced frequencies.

So it looks like wavelet output indicates correlation of input with basis functions of given wavelet (mother/father functions).
If this is true then output of different wavelet algorithms cannot be compared directly (e.g. Haar with Daubechies) since their basis functions are different.

By the same token wavelet output is not directly related to frequencies composing input signal, but comparison is meaningful between output elements of single wavelet function.
Thanks,

M





On Monday, February 15, 2016 at 11:26:52 PM UTC-8, MC wrote:
> Hello, > I'm trying to understand the basic concept behind wavelets. I can't see how recursive multiplication by arbitrary values (wavelet coefficients) produces frequency components within consecutive bands? > Is wavelet output even comparable to real frequency components of input signal? > I would appreciate it if someone could explain what's the relationship between wavelet output and frequency elements of input signal and how come those are preserved when various wavelet algorithms (Haar, Daubechies, etc.) have different coefficients? Is it safe for example to compare Haar and Daubechies output in terms of Hz values? > Thanks, > > M
Reply by MC February 16, 20162016-02-16
Hello,
I'm trying to understand the basic concept behind wavelets. I can't see how recursive multiplication by arbitrary values (wavelet coefficients) produces frequency components within consecutive bands?
Is wavelet output even comparable to real frequency components of input signal?
I would appreciate it if someone could explain what's the relationship between wavelet output and frequency elements of input signal and how come those are preserved when various wavelet algorithms (Haar, Daubechies, etc.) have different coefficients? Is it safe for example to compare Haar and Daubechies output in terms of Hz values?
Thanks,

M