



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




ECE 802-601 Homework 3 Solutions
f (x) = φ(2x) + ψ(2x) −
φ(2x) +
ψ(2x) +
φ(2x − 1) +
ψ(2x − 1)
φ(2x − 1) −
ψ(2x − 1)
=
φ(2x) +
ψ(2x) + 2φ(2x − 1) − ψ(2x − 1) (1)
V 1 can further be decomposed into V 0 and W 0 yielding:
f (x) =
φ(x) −
ψ(x) +
ψ(2x) + φ(x) − ψ(x) − ψ(2x − 1)
=
φ(x) −
ψ(x) +
ψ(2x) − ψ(2x − 1) (2)
t=[0:1/256:255/256]; f=exp(-(t.^2)/10).(sin(2t)+2cos(4t)+0.4sin(t).sin(50t)); h=[1/sqrt(2) 1/sqrt(2)]; L=length(h);hf=fliplr(h); h1=[1/sqrt(2) -1/sqrt(2)]; a=f; d=[]; for j=8:-1:jstop+1; n=length(a); a=[a(mod((-L+1:-1),n)+1) a]; b=conv(a,h1);b=b(L+1:2:L+n-1)/2; a=conv(a,hf);a=a(L:L+n-1)/2; ab=a(1:L);a=[a(L+1:n) ab];a=a(2:2:n);d=[b,d]; end w=[a,t];JJ=2^jstop; ww=[w(JJ) w(1:JJ)]; tt=linspace(0,1,JJ+1);ll=length(tt); ta=[tt;tt];tt=ta(1:2ll);wa=[ww;ww]; ww=wa(1:2ll);ww=[ww(2ll) ww(1:2*ll-1)]; plot(tt,ww);
b) c)
[C,L]=wavedec(f,8,’haar’); Cm=C.*(abs(C)>=0.1); fm=waverec(Cm,L,’haar’);
d)
−2 0 0.5 1
0
2 J=
−2 0 0.5 1
0
2 J=
−1 0 0.5 1
0
1 J=
−1 0 0.5 1
0
1 J=
−0.5 0 0.5 1
0
0.5^ J= −0.5 0 0.5 1
0
0.5^ J=
−0.2 0 0.5 1
0
0.2^ J=
Figure 1: The approximations in the different subspaces
−0.05 0 50 100 150
0
The wavelet coefficients
−0.2 0 20 40 60 80
0
−0.5 0 10 20 30 40
0
−1 0 5 10 15 20
0
1
(^00 2 4 6 )
1
2
−5 1 2 3 4
0
5
(^01) 1.5 2
5
10
(^00) 0.5 1 1.5 2
10
20
Figure 2: The wavelet coefficients
(^00) 0.05 0.1 0.15 0.
1
2
2.5 x 10
−
Threshold
MSE
Figure 5: MSE versus the threshold
b) In this example, we generate a shifted version of the chirp signal and compare the wavelet coefficients. It is sufficient to compare the wavelet coefficients at only one level to conclude that DWT is not shift-invariant. For this example, we look at the level 4 coefficients. By zooming into the coefficients, it is possible to see that the values have changed. For example, for the original signal the highest wavelet coefficient magnitude is 0.4036, whereas the maximum wavelet coefficient for the shifted signal is 0.3682.
−1 0 100 200 300
−0.
0
1
−1 0 100 200 300
−0.
0
1
−0.5 0 50 100 150
0
Wavelet Coefficients at level 4
−0.4 0 50 100 150
−0.
0
Wavelet Coefficients at level 4
Figure 6: MSE versus the threshold
⊕ W 0.
b)The frequency domain equivalent of the dilation equation is Φ(ω) = √^12 H(ω 2 )Φ(ω 2 ).
c)By using the recursion equation in the frequency domain, H(ω) =
2 , |ω| < π/2. Therefore, h(n) = √^12 sinc(n 2 ).
d) Since h 1 (n) = (−1)nh(−n+1), H 1 (ω) = e−jωH∗(ω +π) =
2 e−jω, ω ∈ [−π, −π/2]∪ [π/ 2 , π]. Therefore,
Ψ(ω) =
ω 2
ω 2
= e−jω/^2 , ω ∈ [− 2 π, −π] ∪ [π, 2 π] (4)
The corresponding wavelet function is ψ(t) = 2sinc(2t − 1) − sinc(t − 0 .5).