# Wavelet packet analysis, Sampling rate, Decomposition level

I am running Wavelet packet analysis for a 1-D signal. I want to estimate dominate frequencies in the original signal. Imagine I have following signal:

fn=[0.4 0.6 1.0];E=[0.03 0.05 0.1];A=[1.0 2.0 3.0];
wn=2*pi.*fn;a=E.*wn;wd=wn.*sqrt(1-E.^2);
y=A(1)*exp(-a(1)*t).*sin(wd(1)*t)+A(2)*exp(-a(2)*t).*...
sin(wd(2)*t)+A(3)*exp(-a(3)*t).*sin(wd(3)*t);


so it contains these frequencies $\big\{0.4Hz,0.6Hz, 1Hz\big\}$
My question is what is the best level of decomposition to see these frequencies?
I select $10Hz$ for sampling rate.
So my question, what sampling rate should I select for this case to identify these 3 freq? (I've select 10Hz for sampling rate) and what level of decomposition should I select to see all of these 3 frequencies?
Here is my little scrip for this signal with wavelet packet

df=30;N=300;                            //df:final time,N:segments
t=linspace(0,df,N); dt=t(3)-t(2);      // dt: time intervals
fs=ceil(inv(t(2)-t(1)));              // fs: sampling freq
fn=[0.4 0.6 1.0];E=[0.03 0.05 0.1];   //fn:freq, E:damping
A=[1.0 2.0 3.0];wn=2*pi.*fn;a=E.*wn;wd=wn.*sqrt(1-E.^2);  // A:Amplitude.
y=A(1)*exp(-a(1)*t).*sin(wd(1)*t)+A(2)*exp(-a(2)*t).*...
sin(wd(2)*t)+A(3)*exp(-a(3)*t).*sin(wd(3)*t);
level = 3;
wpt = wpdec(y,level,'coif5');
[Spec,Time,Freq] = wpspectrum(wpt,fs,'plot');


here are result for Level 3,4,5,6 decompositions. as you see even in level 6 it does not show accurate frequencies. ans If I increase the level to 10 I will observe higher freq that are not exist in the actual signal. for level 10: "My question is what is the best level of decomposition to see these frequencies?"

You can achieve this through separation of the three components you have into different bands. Since the inner most level is a low passed version of the signal, you should try using at least 3+1 decomposition levels.

With dyadic scaling (the decomposition method typically used with wavelets) outer decomposition level covers the range of frequencies from F/2 to F .. The next level covers F/4 to F/2.. and the next level covers F/8 to F/4....etc. Assume a signal of two sinusoids (0.4Hz and 1 Hz) with 10Hz sampling rate you get the following plot for its frequency content decomposition into 5 scales dyadic wavelet scales. by changing the sampling ratio, the location of the peaks in wavelets subbands change • @Hassan, my sampling rate is $20Hz$, so with 4 decomposition level I will get 1.25Hz visualization,$\frac{20Hz}{2^{4}}=1.25Hz$ so I guess your answer is not true. – SAH Oct 25 '13 at 6:37
• This is the way dyadic scaling works. What do you mean by "see these frequencies", What are you looking for? – Hasan Oct 25 '13 at 7:24
• I have following signal: x(t)=2sin(2πt×0.4)+3sin(2πt×0.6)+1sin(2πt×1) so it contains these frequencies {0.4Hz,0.6Hz,1Hz} – SAH Oct 25 '13 at 7:49
• More details were added to the answer. – Hasan Oct 25 '13 at 14:29
• Look at my update please. – SAH Oct 29 '13 at 21:41

Wavelet packet transform is not well suited for creating such a spectrogram. The spectrum of higher-order wavelet packets has several strong peaks (not just one), which explains why you are getting spurious results.