EE141 Digital Signal Processing (Fall 2003)

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 14

EE141 Digital Signal Processing (Fall 2003)

Solution Manual

Prepared by Xiaojun Tang and Zhenzhen Ye

Text: A.V. Oppenheim, R.W. Schafer, and J. R. Buck, Discrete-Time Signal


Processing, 2nd edition, Prentice-Hall, 1999.

HW#1: P2.1 (a), (c), (e), (g); P2.4; P2.24


HW#2: P2.5; P2.18; P2.29 (a), (c), (e)
HW#3: P2.40; P2.41; P3.27 (a), (c)
HW#4: P3.6 (d), (e); P3.20; P4.1; P4.3
HW#5: P4.5; P4.7; P5.2; P5.3
HW#6: P5.10; P5.12; P5.15
HW#7: P6.7; P6.8; P6.11; P6.25; P7.15

HW#1: P2.1 (a), (c), (e), (g); P2.4; P2.24

P2.1
(a) T(x[n]) = g[n]x[n];
• Stable if g[n] is bounded;
• Causal – output is not decided by future input;
• Linear – T(ax[n] + by[n]) = ag[n]x[n] + bg[n]y[n] = aT(x[n]) + bT(y[n]);
• Time variant – T(x[n-m]) = g[n]x[n-m];
• Memoryless – output only depends on x[n] with same n;

n + n0
(c) T ( x[n]) = ∑ x[k ] ;
k = n − n0

• Stable;
• Causal only if n0 = 0, else non-causal;
• Linear – T(ax[n] + by[n]) = aT(x[n]) + bT(y[n]);
n − m + n0 n + n0
• Time Invariant – T ( x[n − m]) = ∑ x[k ] =
k = n − m − n0
∑ x[k '−m] ;
k '= n − n0

• Memoryless only if n0 = 0;

(e) T ( x[n]) = e x[ n ] ;
• Stable;
• Causal;
• Nonlinear – T(ax[n] + by[n]) ≠ aT(x[n]) + bT(y[n]);
• Time Invariant – T ( x[n − m]) = e x[ n − m ] ;
• Memoryless – output only depends on x[n] with same n;

(g) T(x[n]) = x[-n];


• Stable;
• Non-Causal – output depends on future input;
• Linear – T(ax[n] + by[n]) = aT(x[n]) + bT(y[n]);
• Time Variant;
• Not Memoryless;

P2.4
3 1
As y[n] − y[n − 1] + y[n − 2] = 2 x[n − 1] , the Fourier transform is
4 8
3 1
Y (e jw ) − Y (e jw )e − jw + Y (e jw )e − 2 jw = 2 X (e jw )e − jw
4 8
When x[n] = δ [n] ⇒ X (e jw ) = 1 , thus
2e − jw  1 1 
Y (e jw ) = − jw − 2 jw
= 8 − jw
− 
− jw 
1 − (3 / 4)e + (1 / 8)e  1 − (1 / 2)e 1 − (1 / 4)e 
 1 n  1 n 
y[n] = 8   −   u[n]
 2   4  
 

P2.24
As h[n] = [1 1 1 1 –2 –2] for n from 0 to 5 and x[n] = u[n-4], the system response is:
y[n] = x[n] * h[n] = [0 0 0 0 1 2 3 4 2 0 …..]; The sketch is shown as follows:

HW#2: P2.5; P2.18; P2.29 (a), (c), (e)

P2.5
(a) The roots for polynomial 1 − 5 z −1 + 6 z −2 = 0 are 2 and 3, so the homogeneous
response for the system is:
y[n] = A1 2 n + A2 3 n
(b) As y[n] − 5 y[n − 1] + 6 y[n − 2] = 2 x[n − 1] and x[n] = δ [n] , the impulse response of
the system is:
2e − jw  1 1 
H (e jw ) = − jw − 2 jw
= 2 − jw
− − jw 
1 − 5e + 6e  1 − 3e 1 − 2e 
⇒ h[n] = 2(3 n − 2 n )u[n]

(c) As y[n] − 5 y[n − 1] + 6 y[n − 2] = 2 x[n − 1] and x[n] = u[n] , the step response of the
system is:
2 z −1 1 4 3
Y ( z) = H ( z) X ( z) =
(1 − 5 z + 6 z )(1 − z ) 1 − z 1 − 2 z 1 − 3z −1 , z > 3
−1 −2 −1
= −1
− −1
+

⇒ y[n] = (3 n +1 − 2 n + 2 + 1)u[n]

P2.18
(a) h[n] = (1 / 2) n u[n]
Causal, the output of the system does not depend on future input;

(b) h[n] = (1 / 2) n u[n − 1]


Causal, the output of the system does not depend on future input;

n
(c) h[n] = (1 / 2)
Non-Causal, the output of the system depends on future input;

(d) h[n] = u[n + 2] − u[n − 2]


Non-Causal, the output of the system depends on future input;

(e) h[n] = (1 / 3) n u[n] + 3 n u[−n − 1]


Non-Causal, the output of the system depends on future input;

P2.29
As x[n] = [1 1 1 1 1 1/2] for n from –1 to 4,
(a) x[n-2] = [1 1 1 1 1 1/2] for n from 1 to 6; The sketch is:
(c) x[2n] = [1 1 1/2] for n from 0 to 2; The sketch is:

(e) x[n-1]δ[n-3] = x[2]; The sketch is:

HW#3: P2.40, P2.41, P3.27 (a), (c)

P2.40
x[n] = cos(πn)u[n] = (−1) n u[n]
j
h[n] = ( ) n u[n]
2
∞ ∞ n
j j
y[n] = h[n] * x[n] = ∑ h[k ]x[n − k ] = ∑ ( 2 )
k = −∞ k = −∞
k
u[k ](−1) n − k u[n − k ] = (−1) n ∑ (− ) k
k =0 2
n +1
1 − (− j / 2)
= (−1) n
1 − (− j / 2)
1 − (− j / 2) n +1 1
Since lim =
n → ∞ 1 − ( − j / 2) 1+ j / 2
The steady state response to the excitation x[n] = (−1) n u[n] is
1 cos(πn)
(−1) n =
1+ j / 2 1+ j / 2

P2.41

Given a periodic impulse train x[n] = ∑ δ [n + kN ] , we can write its Fourier transform as
k = −∞

2π ∞
X ( e jω ) =
N
∑ δ (ω + 2πk / N )
k = −∞
(1)
(Refer to Signal and Systems, 2nd edition by A.V. Oppenheim and A.S. Willsky, Page 371 for its proof)

In problem, 2.41,N=16, so its Fourier transform is


2π ∞
X ( e jω ) = ∑ δ (ω + 2πk / 16)
16 k = −∞
(2)

Let Y (e jω ) denotes the output of the system, then


Y (e jω ) = X (e jω ) H (e jω ) (3)
If | ω |< 3π / 8 , H (e jω ) = e − jω 3
2π ∞ 2π
= e − jω 3 ∑
16 k = −∞
δ (ω + 2πk / 16) =
16
[δ (ω ) + e j 3π / 8δ (ω + π / 8) + e − j 3π / 8δ (ω − π / 8)] (4)

If | ω |≥ 3π / 8 , H (e jω ) = 0 , thus Y (e jω ) = 0 , (5)

So Y (e jω ) = [δ (ω ) + e j 3π / 8δ (ω + π / 8) + e − j 3π / 8δ (ω − π / 8)] (6)
16
Take the inverse Fourier transform, we can get
1 1
y[n] = (1 + e j 3π / 8 e − nπ / 8 + e − j 3π / 8 e nπ / 8 ) = (1 + e −( n −3)π / 8 + e ( n −3)π / 8 )
16 16
(7)
1 π 1 1 π
= (1 + 2 cos (n − 3)) = + cos( (n − 3))
16 8 16 8 8

Note: Take a look at (3), H (e jω ) is band limited, X (e jω ) is infinite pulse train. If we


multiply them together, we can only consider those pulses falling into the band
( − 3π / 8 , 3π / 8 ). The rest pulses are cancelled due to the multiplication with 0. There are
2π 2π 2π
three pulses falling into the band δ (ω ) , δ (ω + π / 8) , δ (ω − π / 8) , so we get
16 16 16
(6)

P3.27
(a)
1 A B C D
X ( z) = = + + −1
+
1 1 1
(1 + z −1 ) 2 (1 − 2 z −1 )(1 − 3z −1 ) (1 + z −1 ) 2 1 + z −1 1 − 2 z 1 − 3z −1
2 2 2
X (z)’s poles are z=-1/2, 2, 3, if it is stable, the ROC is | z |∈ (1 / 2,2)
1 1 1
A = X ( z )(1 + z −1 ) 2 z = −1 / 2 = −1 −1 z = −1 / 2 =
2 (1 − 2 z )(1 − 3 z ) 35
1 1568
C = X ( z )(1 − 2 z −1 ) z = 2 = z =2 = −
1 1225
(1 + z −1 ) 2 (1 − 3z −1 )
2
1 2700
D = X ( z )(1 − 3z −1 ) z =3 = z =3 =
1 1225
(1 + z −1 ) 2 (1 − 2 z −1 )
2
Also, Let z −1 = 0 at both sides,
X ( z ) z −1 =0 = 1 = A + B + C + D
58
Thus, B = 1 − A − C − D =
1225
1 1 / 35 58 / 1225 1568 / 1225 2700 / 1225
X ( z) = = + − −1
+
1 −1 2
z ) (1 − 2 z −1 )(1 − 3z −1 )
(1 +
1 −1 2
(1 + z ) 1+ z
1 −1 1 − 2 z 1 − 3 z −1
2 2 2
Since the ROC is | z |∈ (1 / 2,2) ,
1 1 58 1 1568 n 2700 n
x[n] = (n + 1)(− ) n u[n + 1] + (− ) n u[n] + 2 u[− n − 1] − 3 u[−n − 1]
35 2 1225 2 1225 1225

Note: To get the inverse Z-Transform of second-order term or multiple order term, we
dX ( z )
can use the differentiation property nx[n] ↔ − z (Refer to page122 of textbook for
dz
its proof)
1
E.g. right side sequence x[n] = a n u[n] ↔ (ROC: | z |>| a | )
1 − az −1
1
d( −1
) az −1 z −1
na n [n] ↔ − z[ 1 − az ]= , So na n −1
[ n ] ↔
dz (1 − az −1 ) 2 (1 − az −1 ) 2
(c)
z 3 − 2z 2
x[n] ↔ X ( z ) = = z 2 + 2z +
z−2 1 − 2 z −1
X(z) has its only pole at z=2. If x[n] is a left-sided sequence, the ROC is | z |< 2
x[n] = δ [n + 2] + 2δ [n + 1] − 2(2) n u[−n − 1]
or x[n] = δ [n + 2] + 2δ [n + 1] − 2 n +1 u[−n − 1]

P3.1
(g)
9
1 1
( ) n (u[n] − u[n − 10] = ∑ ( ) nδ [n] is a finite length sequence, so its ROC is | z |≠ 0 . The
2 n =0 2
solution in the textbook is right.

HW#4: P3.6 (d), (e); P3.20; P4.1; P4.3

P3.6
1 − (1 / 2) z −1
(d) X ( z ) = z > 1/ 2
1 − (1 / 4) z − 2
• Partial Fraction Expansion:
1 − (1 / 2) z −1 1 − (1 / 2) z −1 1
X ( z) = −2
= =
1 − (1 / 4) z (1 − (1 / 2) z )(1 + (1 / 2) z ) 1 + (1 / 2) z −1
−1 −1

n
 1
⇒ x[n] =  −  u[n]
 2

• Power Series Expansion:


1 − (1 / 2) z −1
X ( z) = −2
= 1 − (1 / 2) z −1 + (1 / 4) z − 2 − (1 / 8) z −3 + (1 / 16) z − 4 + L
1 − (1 / 4) z
n
 1
⇒ x[n] =  −  u[n]
 2

• Fourier Transform exists as the ROC including unit circle.

1 − az −1
(e) X ( z ) = z > 1/ a
z −1 − a
• Partial Fraction Expansion:
1 − az −1 1 az −1 1 a2 − 1/ a a
X ( z ) = −1 = −1 − −1 = −1 − a − −1 = −1
−a+
z −a z −a z −a z −a z − a 1 − (1 / a ) z 1 − (1 / a ) z −1
n +1 n −1 n +1 n −1
1 1 1 1
⇒ x[n] = −  u[n] − aδ [n] +   u[n] = −  u[n] +   u[n − 1]
a a a a

• Power Series Expansion:


1 − az −1 1 az −1
X ( z ) = −1 = −
z − a z −1 − a z −1 − a
n n +1
1  1  1 1 1   1  1  1
−1
=  − 1 + z −1 + 2 z − 2 + 3 z −3 + L ⇒ x1[n] =  −   u[n] = −  u[n]
z − a  a  a a a   a  a  a
n −1
az −1 1 1 1 1
− −1 = z −1 + z − 2 + 2 z −3 + 3 z − 4 + L ⇒ x 2[n] =   u[n − 1]
z −a a a a a
n +1 n −1
1 1
⇒ x[n] = x1[n] + x 2[n] = −  u[n] +   u[n − 1]
a a

• Fourier Transform exists when the ROC including unit circle, which means
a < 1.

P3.20
(a) As the ROC of X(z) is |z| > 3/4, and the ROC of Y(z) is |z| > 2/3, the ROC of H(z)
should be |z| > 2/3 ;
(b) As the ROC of X(z) is |z| < 1/3, and the ROC of Y(z) is 1/6 < |z| < 1/3, the ROC of
H(z) should be |z| > 1/6 ;

P4.1
As xc (t ) = sin[2π (100t )] and T = 1/400 sec,
 nπ 
x[n] = xc (nT ) = sin[2π (100nT )] = sin  
 2 

P4.3
 nπ 
As xc (t ) = cos[4000πt ] and x[n] = cos   ,
 3 
1
(a) Let x[n] = xc (nT ) ⇒ T =
12,000
5
(b) T is not unique, for example, T =
12,000
HW#5: P4.5; P4.7; P5.2; P5.3

P4.5
(a) From Nyquist Sampling theorem, to avoid aliasing in the C/D converter, the sampling
1
frequency Ω s = ≥ 2Ω m = 2 * 5000 Hz = 10 4 Hz , so Ts ≤ 10 −4 s
Ts
f cutoff π /8 4
(b) Ω cutoff = Ωs = 10 = 625Hz
2π 2π
f cutoff π /8
(c) Ω cutoff = Ωs = 2 × 10 4 = 1250 Hz = 1.25kHz
2π 2π
Ω f
Note: The relation between digital frequency f and analog frequency Ω is = ,
Ω s 2π
where Ω s is the sampling frequency, f is in radians.

P4.7

(a)
xc (t ) = s c (t ) + αs c (t − τ d )
X c ( j Ω ) = S c ( j Ω )(1 + α e − j Ω τ d )
Consider sampling, x[n] = x c (nT ) , in frequency domain (refer to Eq4.19 in textbook, P147),
2πk
X (e jΩT ) = ∑ X c ( j (Ω −
1 ∞
))
T k = −∞ T
2πk 2πk
X (e jω ) = X (e jΩT ) = ∑ X c ( j (Ω −
1 ∞ 1 ∞
)) = (1 + αe − jΩτ d ) ∑ S c ( j (Ω − ))
T k =−∞ T T k = −∞ T
1 ∞
ω 2πk
= (1 + αe − jωτ d / T ) ∑ S c ( j ( − ))
T k = −∞ T T
(b)
H (e jω ) = 1 + αe − jωτ d / T
(c)
π π π π
1 1 1 1
∫ ∫ ∫ ∫
− jωτ d / T
h[n] = H ( e jω
) e jnω
dω = (1 + αe ) e jnω
dω = e jnω
dω + αe − jω ( n −τ d / T ) dω
2π −π 2π −π 2π −π 2π −π
sin(nπ ) sin[(n − τ d / T )π ]
= +α
nπ (n − τ d / T )π
sin(nπ ) sin[(n − 1)π ]
if τ d = T , h[n] = +α = δ [n] + αδ [n − 1]
nπ (n − 1)π
sin(nπ ) sin[(n − 1 / 2)π ] sin[(n − 1 / 2)π ]
if τ d = T / 2 , h[n] = +α = δ [ n] + α
nπ (n − 1)π (n − 1)π

P5.2
10
y[n − 1] − y[n] + y[n + 1] = x[n]
3
10
z −1Y ( z ) − Y ( z ) + zY ( z ) = X ( z )
3
Y ( z) 1 z −1 − 3/8 3/8
H ( z) = = = −1 −1
= −1
+
X ( z) 10 (1 − (1 / 3) z )(1 − 3 z ) 1 − (1 / 3) z 1 − 3z −1
z −1 − + z
3
(a) H (z) has two zeroes: 0, ∞ ; two poles: 1/3, 3

(b) The system is stable, so the ROC includes the unit circle. The ROC is 1/3<|z|<3
3 1 3
h[n] = − ( ) n u[n] − 3 n u[− n − 1]
8 3 8

P5.3
1
y[n − 1] + y[n − 2] = x[n]
3
1
z −1Y ( z ) + z − 2Y ( z )) = X ( z )
3
Y ( z) 1 1 z
H ( z) = = −1 −2
= −1 =
X ( z ) z + (1 / 3) z z (1 + (1 / 3) z ) 1 + (1 / 3) z −1
−1

The poles are: 1 / 3 , there are two ROC, 0 <| z |< 1 / 3 , | z |> 1 / 3
1
(1) 0 <| z |< 1 / 3 : h[n] = −(− ) n +1 u[− n − 2] , choose (d)
3
1
(2) | z |> 1 / 3 : h[n] = (− ) n +1 u[n + 1] , choose (a)
3
HW#6: P5.10; P5.12; P5.15

P5.10
As one of the zeros of H(z) is at z = ∞ , the corresponding pole of Hi(z) will be also at
infinity. The existence of a pole at z = ∞ implies that the system is not causal.
P5.12
(a)

As the poles of H(z) are 0.9, -0.9, ROC includes the unit circle, the system is stable.

(b)
(1 + 0.2 z −1 )(1 + 3z −1 )(1 − 3 z −1 )
H ( z) =
(1 + j 0.9 z −1 )(1 − j 0.9 z −1 )
− 9(1 + 0.2 z −1 )(1 + (1 / 3) z −1 )(1 − (1 / 3) z −1 ) ( z −1 + 1 / 3)( z −1 − 1 / 3)
=
(1 + j 0.9 z −1 )(1 − j 0.9 z −1 ) (1 + (1 / 3) z −1 )(1 − (1 / 3) z −1 )
14444444244444443 14444244443
H1 ( z ) H ap ( z )

= H 1 ( z ) H ap ( z )

P5.15
Generalized Linear Phase – GLP;
Linear Phase – LP;

(a) As h[n] = 2δ [n] + δ [n − 1] + 2δ [n − 2] ⇒ H ( jw) = (1 + 4 cos w)e − jw ,


A( jw) = 1 + 4 cos w and α = 1, β = 0 , it is a GLP, but not LP as A( jw) is not always
nonnegative for all w;

(b) It is not a GLP or LP as it is not a symmetric filter;

(c) As h[n] = δ [n] + 3δ [n − 1] + δ [n − 2] ⇒ H ( jw) = (3 + 2 cos w)e − jw ,


A( jw) = 3 + 2 cos w and α = 1, β = 0 , it is a GLP and also LP as A( jw) is always
nonnegative for all w;

(d) As h[n] = δ [n] + δ [n − 1] ⇒ H ( jw) = 2 cos( w / 2)e − j ( w / 2 ) ,


A( jw) = 2 cos( w / 2) and α = 1 / 2, β = 0 , it is a GLP, but not LP as A( jw) is not always
nonnegative for all w;

(e) As h[n] = δ [n] − δ [n − 2] ⇒ H ( jw) = 2 sin we − j ( w−π / 2) ,


A( jw) = 2 sin w and α = 1, β = π / 2 , it is a GLP, but not LP as A( jw) is not always
nonnegative for all w;

HW#7: P6.7; P6.8; P6.11; P6.25; P7.15


P6.7
1 1
The difference equation is: y[n] − y[n − 2] = x[n − 2] − x[n]
4 4
1 1
Z-Transform: Y ( z ) − Y ( z ) z − 2 = X ( z ) z − 2 − X ( z )
4 4
1
− + z −2
Y ( z)
Transfer function: H ( z ) = = 4
X ( z) 1
1 − z −2
4
x[n] -1/4 y[n]

z −1

z −1
1/4

P6.8
y[n] − 2 y[n − 2] = 3x[n − 1] + x[n − 2]

P6.11

z −1 (1 − 2 z −1 )(1 − 4 z −1 ) z −1 − 6 z −2 + 8 z −3
H ( z) = =
1 −1 1
1− z 1 − z −1
2 2
(a)
y[n]

z −1
1/2

z −1
-6

z −1
8
(b) x[n] y[n]

z −1
1/2

z −1
-6

z −1
8

P6.25
1 −1
1− z
2 1
(a) H ( z ) = [ H 1 ( z ) + H 2 ( z )]H 3 ( z ) = [ + (1 + 2 z −1 + z − 2 )]( )
3 −1 7 − 2 1 − z −1
1− z + z
8 8
The Z-Transfer function:
9 9 11 7
2 + z −1 + z − 2 + z −3 + z − 4
H ( z) = 8 8 8 8
11 5 7
1 − z −1 + z − 2 − z −3
8 4 8
(b)
The difference equation:
11 5 7 9 9 11 7
y[n] − y[n − 1] + y[n − 2] − y[n − 3] = 2 x[n] + x[n − 1] + x[n − 2] + x[n − 3] + x[n − 4]
8 4 8 8 8 8 8
(c)
x[n] 2 y[n]

z −1
11/8 9/8

z −1
-5/4 9/8

z −1
7/8 11/8

z −1
7/8
P7.15
Specifications:

(a) Pass band ripple: δ p = 0.05 , A p = 20 log δ p = −26.02dB


Stop band ripple: δ s = 0.1 , As = 20 log δ s = −20dB
Pass band edge: ω p = 0.25π
Stop band edge: ω s = 0.35π
Cutoff: ω c = 0.3π
The peak approximate error 20 log10 δ < −26.02dB
Among the windows in Table7.1 (Page 471), Hanning, Hamming, Blackman can be used
(b)

Hanning: 0.1π = , M = 80 , L = M + 1 = 81
M

Hamming: 0.1π = , M = 80 , L = M + 1 = 81
M
12π
Blackman: 0.1π = , M = 120 , L = M + 1 = 121
M
Note that the estimation is not accurate. We can use MATLAB to find the minimum of
filter order to meet the requirements.

You might also like