Antoniou Samp-Sols

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

SAMPLE SOLUTIONS

DIGITAL SIGNAL PROCESSING: Signals, Systems, and Filters


Andreas Antoniou
(Revision date: February 7, 2007)

SA.1 A periodic signal can be represented by the equation


10

x̃(t) = Ak sin(ωk t + φk )
k=1

where the frequencies ωk , amplitudes Ak , and phase angles φk are given in Table SA.1.
The signal is to be processed first by an ideal bandpass filter and the by a differentiator, as
shown in Fig. SA.1. The bandpass filter will pass frequencies in the range 4 ≤ ω ≤ 6 rad/s
and reject all other frequencies and the differentiator will differentiate the signal with respect
to time.
(a) Obtain a time-domain representation for the signal at the outputs of the bandpass filter
and differentiator, i.e., at nodes B and C, respectively, in Fig. SA.1.
(b) Obtain a frequency-domain representation for the signal at the output of the bandpass
filter.
(c) Obtain a frequency-domain representation for the signal at the output of the differentiator.

A B C
Bandpass Filter Differentiator

Figure SA.1

Table SA.1 Frequency Spectrum


k ωk , rad/s Ak φk

1 1 0.3819 −0.3478
2 2 0.3614 0.8222
3 3 0.8575 2.3502
4 4 0.0629 −0.3292
5 5 0.1342 −0.1693
6 6 0.8648 0.6648
7 7 0.5155 −2.4473
8 8 0.6797 1.7780
9 9 0.7001 −1.5824
10 10 0.3 1.1

Copyright 
c by Andreas Antoniou 2005-
2 DIGITAL SIGNAL PROCESSING: Signals, Systems, and Filters

Solution
(a) Node B:
6

xB (t) = Ak sin(ωk t + φk )
k=4

Node C:
 6  6
d   d
xC (t) = Ak sin(ωk t + φk ) = [Ak sin(ωk t + φk )]
dt dt
k=4 k=4
6
 6

= ωk Ak cos(ωk t + φk ) = ωk Ak sin(ωk t + φk + π/2)
k=4 k=4

(b) The amplitude and phase spectrums at Node B are given in Table SA.2 and are plotted
in Fig. SA.2.
Table SA.2 Frequency Spectrum at Node B
k ωk , rad/s Ak φk

4 4 0.0629 −0.3292
5 5 0.1342 −0.1693
6 6 0.8648 0.6648

Amplitude Spectrum Phase Spectrum


0.9 0

0.8
−0.1
0.7
−0.2
Phase Angle, rads

0.6
Magnitude

0.5 −0.3

0.4 −0.4
0.3
−0.5
0.2
−0.6
0.1

0 −0.7
0 5 10 0 5 10
Frequency, rad/s Frequency, rad/s

Figure SA.2

(c) Similarly, the amplitude and phase spectrums for Node C are given in Table SA.3 and
are plotted in Fig. SA.3.
Table SA.3 Frequency Spectrum at Node B
k ωk , rad/s Ak φk

4 4 0.2516 1.2416
5 5 0.6710 1.4015
6 6 5.1888 2.2356
SAMPLE SOLUTIONS 3

Amplitude Spectrum Phase Spectrum


6 2.5

5
2

Phase Angle, rads


4
Magnitude 1.5
3
1
2

0.5
1

0 0
0 5 10 0 5 10
Frequency, rad/s Frequency, rad/s

Figure SA.3

SA.2 A periodic signal defined by




x̃(t) = x(t + rτ0 )
r=−∞

where x(t) is zero outside the range −τ0 /2 ≤ t ≤ τ0 /2 has a Fourier series of the form


x̃(t) = Xk ejkω0 t for −τ0 /2 ≤ t ≤ τ0 /2
k=−∞

where  τ0 /2
1
Xk = x(t)e−jkω0 t dt
τ0 −τ0 /2

(a) Assuming that x(t) is an even function, show that


 τ0 /2
2
Xk = x(t) cos kω0 t dt
τ0 0

Justify your steps.


(b) The periodic signal of Fig. SA.4 is described by the equation

cos ω0 t/2 for −τ0 /4 ≤ t ≤ τ0 /4
x(t) =
0 otherwise

where ω0 = 2π/τ0 . Using the formula in part (a), obtain an expression for the Fourier
series coefficients Xk .
(c) Give expressions for the amplitude and phase spectrums of x̃(t).
4 DIGITAL SIGNAL PROCESSING: Signals, Systems, and Filters

~
x(t)
cos(ω0t/2)

τ0 t
τ τ0
− 0
2 2
τ0 τ0

4 4

Figure SA.4

Solution
(a) From the definition of the Fourier series
 τ0 /2
1
Xk = x(t)e−jkω0 t dt
τ0 −τ0 /2
 τ0 /2
1
= x(t)(cos kω0 t − j sin kω0 t) dt
τ0 −τ0 /2
 τ0 /2 
1 1 τ0 /2
= x(t) cos kω0 t dt − j x(t) sin kω0 t dt
τ0 −τ0 /2 τ0 −τ0 /2
  τ0 /2 
0
1
= x(t) cos kω0 t dt + x(t) cos kω0 t dt
τ0 −τ0 /2 0
  τ0 /2 
0
1
− x(t) sin kω0 t dt + x(t) sin kω0 t dt
τ0 −τ0 /2 0

If x(t) is even, then x(t) cos kω0 t is an even function and x(t) sin kω0 t is an odd function.
Hence  0  τ0 /2
x(t) cos kω0 t dt = x(t) cos kω0 t dt
−τ0 /2 0

and  
0 τ0 /2
x(t) sin kω0 t dt = − x(t) sin kω0 t dt
−τ0 /2 0

Therefore  τ0 /2
2
Xk = x(t) cos kω0 t dt
τ0 0

(b) The given signal is symmetrical about the y axis and, therefore,it is an even function.
Hence we have

2 τ0 /2
Xk = x(t) cos kω0 t dt
τ0 0
 
2 τ0 /4 2 τ0 /4
= cos(ω0 t/2) cos(kω0 t) dt = cos(kω0 t) cos(ω0 t/2) dt
τ0 0 τ0 0

From trigonometry, we have

cos A cos B = 12 [cos(A + B) + cos(A − B)]


SAMPLE SOLUTIONS 5

and, therefore,
 τ0 /4
2 1
Xk = 2 [cos(kω0 t + ω0 t/2) + cos(kω0 t − ω0 t/2)] dt
τ0 0
 τ0 /4
1 


= cos k + 12 ω0 t + cos k − 12 ω0 t dt
τ0 0


τ0 /4
1 k + 12 ω0 t
sin sin k − 12 ω0 t
=  + 
τ0 k + 12 ω0 k − 12 ω0
0
⎡    ⎤
1 2π τ0 1 2π τ0
1 ⎣ sin k + 2 τ0 · 4 sin k − 2 τ0 · 4
=  +  ⎦
τ0 k + 12 2πτ0 k − 1 2π
2 τ0
 


1 sin k + 12 π2 sin k − 12 π2
=  + 
2π k + 12 k − 12

The amplitude and phase spectrums of x̃(t) are the magnitude and angle of Xk , i.e., |Xk |
and arg Xk . Since Xk is real, the angle of Xk is 0 or π depending on whether Xk is
positive or negative.
SA.3 A z transform is given by
(z 2 + 1)(z + 1)
X(z) =
(z 2 + z − 2)(z − 3)
(a) Construct the zero-pole plot of X(z).
(b) Function X(z) is known to have as many Laurent series as there are annuli of convergence
but only one of these series is a z transform that satisfies the absolute convergence theorem
(Theorem 3.1). Identify the annulus of convergence of that series on the zero-pole plot
obtained in part (a).
(c) Through the use of partial fractions obtain a closed-form expression for x(nT ) = Z −1 X(z).

Solution
(a) X(z) can be expressed as

(z 2 + 1)(z + 1)
X(z) =
(z 2 + z − 2)(z − 3)
(z + j)(z − j)(z + 1)
=
(z − 1)(z + 2)(z − 3)
Hence X(z) has zeros at z = ±j, − 1 and poles at z = 1, − 2, 3. The zero-pole plot is
depicted in Fig. SA.5.
(b) The correct annulus is the outer annulus which can be represented by

3 ≤ |z| < R where R → ∞

See Fig. SA.5.


(c) Using Technique I, we can write

X(z) (z 2 + 1)(z + 1)
=
z z(z − 1)(z + 2)(z − 3)
R0 R1 R2 R3
= + + + (SA.1)
z z−1 z+2 z−3
Since the poles are simple, we have
(z 2 + 1)(z + 1) 1 1
R0 = lim = =
z→0 (z − 1)(z + 2)(z − 3) (−1) × 2 × (−3) 6
6 DIGITAL SIGNAL PROCESSING: Signals, Systems, and Filters

z plane

R
j

¡2 ¡1 1 3
¡j

Figure SA.5

(z 2 + 1)(z + 1) 2×2 2
R1 = lim = =−
z→1 z(z + 2)(z − 3) 1 × 3 × (−2) 3

(z 2 + 1)(z + 1) 5 × (−1) 1
R2 = lim = =
z→−2 z(z − 1)(z − 3) (−2) × (−3) × (−5) 6

(z 2 + 1)(z + 1) 10 × 4 4
R3 = lim = =
z→3 z(z − 1)(z + 2) 3×2×5 3

From Eq. (SA.1), we can write

R1 z R2 z R3 z
X(z) = R0 + + +
z−1 z+2 z−3
2 1 4
1 z z z
= − 3 + 6 + 3
6 z−1 z+2 z−3
Therefore, for n ≥ 0, the use of Table 3.2 gives

x(nT ) = 1
6 δ(nT ) − 23 u(nT ) + 16 u(nT )(−2)n + 43 u(nT )(3)n
= 1
6 δ(nT ) + u(nT )[− 32 + 16 (−2)n + 43 (3)n ]

Since the numerator degree of X(z) is equal to the denominator degree, it follows from
the corollary of the initial-value theorem (Theorem 3.8) that x(nT ) = 0 for n < 0, i.e.,
the above solution applies for all values of n.
An alternative but equivalent solution can be readily obtained by using Technique II (see
p. 115) whereby we expand X(z) instead of X(z)/z into partial fractions. We can write

(z 2 + 1)(z + 1)
X(z) =
(z − 1)(z + 2)(z − 3)
R1 R2 R3
= R0 + + +
z−1 z+2 z−3
SAMPLE SOLUTIONS 7

where
(z 2 + 1)(z + 1) z3
R0 = lim = lim 3 = 1
z→∞ (z − 1)(z + 2)(z − 3) z→∞ z

(z 2 + 1)(z + 1) 2×2 2
R1 = lim = =−
z→1 (z + 2)(z − 3) 3 × (−2) 3
Thus
(z 2 + 1)(z + 1) 5 × (−1) 1
R2 = lim = =−
z→−2 (z − 1)(z − 3) (−3) × (−5) 3

(z 2 + 1)(z + 1) 10 × 4
R3 = lim = =4
z→3 (z − 1)(z + 2) 2×5
Thus
2 1
3 3 4
X(z) = 1 − − +
z−1 z+2 z−3
and for n ≥ 0, we have

x(nT ) = δ(nT ) − 23 u(nT − T ) − 13 u(nT − T )(−2)n−1 + 4u(nT − T )(3)n−1


= δ(nT ) + u(nT − T )[− 23 − 13 (−2)n−1 + 4(3)n−1 ]

SA.4 (a) Find the z transform of the following discrete-time signal




⎨0 for n < 0
x(nT ) = 1 for 0 ≤ n ≤ 5


1 + (n − 5)T for n > 5

(b) The z transform of a discrete-time signal x(nT ) is given by


z(3z 2 − 2z + 1)
X(z) =
(z 2 + 1)(z − 1)
Using the initial-value theorem (Theorem 3.8), show that x(nT ) = 0 for n < 0. Then
find x(nT ) for n ≥ 0 using the general inversion formula

1
x(nT ) = X(z)z n−1 dz.
2πj Γ

Solution
(a) The signal can be expressed as

x(nT ) = u(nT ) + r(nT − 5T )

Hence

Zx(nT ) = Zu(nT ) + Zr(nT − 5T )


= Zu(nT ) + z −5 Zr(nT )
z T z −4
= −
z − 1 (z − 1)2

(a) The first nonzero value of x(nT ) occurs at KT = (N − M )T where N is the denominator
degree and M in the numerator degree in X(z). Since N = M = 3, we have K = 0, i.e.,
the signal starts at KT = 0. Hence for n < 0, we have

x(nT ) = 0
8 DIGITAL SIGNAL PROCESSING: Signals, Systems, and Filters

(b) For n ≥ 0, we can write


M
 

x(nT ) = Res X(z)z n−1


z=pi
i=1
M
 z(3z 2 − 2z + 1)z n−1
= Res
i=1
z=pi (z 2 + 1)(z − 1)
M
 (3z 2 − 2z + 1)z n
= Res
i=1
z=pi (z − j)(z + j)(z − 1)
R1 R1∗ R2
= + + (SA.2)
z−j z+j z−1
where M is the number of poles and R1∗ is the complex conjugate of R1 since the pole at
z = j = ejπ/2 is the complex conjugate of the pole at z = −j = e−jπ/2 . Since the poles
are simple, we have
 
(3z 2 − 2z + 1)z n
R1 = lim (z − j)
z→j (z − j)(z + j)(z − 1)
(3z − 2z + 1)z n
2
(−3 − 2j + 1)j n
= lim =
z→j (z + j)(z − 1) 2j(j − 1)
−2 − 2j n jnπ/2
= =j =e
−2 − 2j
and
(3z 2 − 2z + 1)z n 2
R2 = lim 2
= =1
z→1 (z + 1) 2
Therefore, from Eq. (SA.2), we can write

x(nT ) = u(nT )ejnπ/2 + u(nT )e−jnπ/2 + u(nT )


= u(nT )(2 cos nπ/2 + 1)

SA.5 An initially relaxed discrete-time system can be represented by the equation

y(nT ) = Rx(nT ) = 2.5x(nT ) + |e0.1(nT +2T ) |x(nT − T ) + x(nT − 2T )

By using appropriate tests, check the system for


(a) linearity,
(b) time invariance, and
(c) causality.

Solution

(a) Linearity

R[αx1 (nT ) + βx2 (nT )] = 2.5[αx1 (nT ) + βx2 (nT )] + |e0.1(nT +2T |[αx1 (nT − T )
+βx2 (nT − T )] + [αx1 (nT − 2T ) + βx2 (nT − 2T )]
= α[2.5x1 (nT ) + |e0.1(nT +2T ) |x1 (nT − T ) + x1 (nT − 2T )]
+β[2.5x2 (nT ) + |e0.1(nT +2T ) |x2 (nT − T ) + x2 (nT − 2T )]
= αRx1 (nT ) + βRx2 (nT )

Therefore, the system is linear.


SAMPLE SOLUTIONS 9

(b) Time invariance


The response to a delayed excitation is

Rx(nT − kT ) = 2.5x(nT − kT ) + |e0.1(nT +2T ) |x(nT − kT − T ) + x(nT − kT − 2T )

The delayed response is

y(nT − kT ) = 2.5x(nT − kT ) + |e0.1(nT −kT +2T ) |x(nT − kT − T ) + x(nT − kT − 2T )

For any k = 0, we have


|e0.1nT +2T | = |e0.1(nT −kT +2T ) |
Thus
y(nT − kT ) = Rx(nT − kT )
and, therefore, the system is time dependent.
(c) Let x1 (nT ) and x2 (nT ) be arbitrary discrete-time signals such that

x1 (nT ) = x2 (nT ) for n ≤ k


x1 (nT ) = x2 (nT ) for n > k

We have

Rx1 (nT ) = 2.5x1 (nT ) + |e0.1(nT +2T ) |x1 (nT − T ) + x1 (nT − 2T ) (SA.3)

and

Rx2 (nT ) = 2.5x2 (nT ) + |e0.1(nT +2T ) |x2 (nT − T ) + x2 (nT − 2T ) (SA.4)

Since
x1 (nT ) = x2 (nT ) for n ≤ k
then
x1 (nT − T ) = x2 (nT − T ) for n ≤ k
and
x1 (nT − 2T ) = x2 (nT − 2T ) for n ≤ k
Hence the right-hand side in Eq. (SA.3) is equal to the right-hand side in Eq. (SA.4) for
n ≤ k and thus
Rx1 (nT ) = Rx2 nT ) for n ≤ k
Therefore, the filter is causal.

SA.6 (a) Derive a state-space representation for the filter shown in Fig. SA.6.
(b) Using the state-space representation obtained in part (a), compute the impulse response
of the filter at nT = 5T .

2 4

x(nT) y(nT)

−0.4 3 −0.6 5

Figure SA.6
10 DIGITAL SIGNAL PROCESSING: Signals, Systems, and Filters

2 4

q1(nT+T) q2(nT+T)
x(nT) y(nT)

q (nT) q (nT)
1 2

−0.4 3 −0.6 5

Figure SA.7

Solution
(a) State variables can be assigned as shown in Fig. SA.7. Henc
e we can write

q1 (nT + T ) = x(nT ) − 0.4q1 (nT ) (SA.5)


q2 (nT + T ) = 2q1 (nT + T ) + 3q1 (nT ) − 0.6q2 (nT ) (SA.6)

On eliminating q1 (nT + T ) in Eq. (SA.6) using Eq. (SA.5), we get

q2 (nT + T ) = 2x(nT ) − 0.8q1 (nT ) + 3q1 (nT ) − 0.6q2 (nT )


= 2.2q1 (nT ) − 0.6q2 (nT ) + 2x(nT ) (SA.7)

From Eqs. (SA.5) and (SA.7)


      
q1 (nT + T ) −0.4 0 q1 (nT ) 1
= + x(nT ) (SA.8)
q2 (nT + T ) 2.2 −0.6 q2 (nT ) 2

The output is given by


y(nT ) = 4q2 (nT + T ) + 5q2 (nT ) (SA.9)
and from Eqs. (SA.6) and (SA.9), we have

y(nT ) = 4 × 2.2q1 (nT ) − 4 × 0.6q2 (nT ) + 4 × 2x(nT ) + 5q2 (nT )


= 8.8q1 (nT ) + 2.6q2 (nT ) + 8x(nT )
 
q (nT )
= [8.8 2.6] 1 + 8x(nT ) (SA.10)
q2 (nT )

Therefore, Eqs. (SA.8) and (SA.10) can be written as

q(nT + T ) = Aq(nT ) + bx(nT )


y(nT ) = cT q(nT ) = dx(nT )

where
   
−0.4 0 1
A = b=
2.2 −0.6 2
cT = [8.8 2.6] d=8

(b) The impulse response is given by



a1 for n = 0
h(nT ) =
cT An−1 b otherwise
SAMPLE SOLUTIONS 11

For n = 5  4  
T 4 −0.4 0 1
h(5T ) = c A b = [8.8 2.6]
2.2 −0.6 2
Since
 
2    
−0.4 0 −0.4 0 −0.4 0 0.16 0.0
= =
2.2 −0.6 2.2 −0.6 2.2 −0.6 −2.20 0.36
 4     
−0.4 0 0.16 0.0 0.16 0.0 0.0256 0.0
= =
2.2 −0.6 −2.20 0.36 −2.20 0.36 −1.144 0.1296

we get
    
0.0256 0.0 1 0.0256
h(5T ) = [8.8 2.6] = [8.8 2.6] = −2.0752
−1.144 0.1296 2 −0.8848

SA.7 Fig. SA.8 shows a recursive digital filter.


(a) Find its transfer function.
(b) By using the Jury-Marden stability criterion, determine whether the filter is stable or
unstable.

x(nT) y(nT)

1 1 1 1
− − − −
2 3 4 5

Figure SA.8

Solution

(a) From Fig. SA.8, we get

y(nT ) = x(nT ) − 12 y(nT − T ) − 13 y(nT − 2T ) − 14 y(nT − 3T ) − 15 y(nT − 4T )

Hence the z transform gives

Y (z) = X(z) − 12 z −1 Y (z) − 13 z −2 Y (z) − 14 z −3 Y (z) − 15 z −4 Y (z)

or
Y (z) + 12 z −1 Y (z) + 13 z −2 Y (z) + 14 z −3 Y (z) + 15 z −4 Y (z) = X(z)
and so
Y (z) 1
=
X(z) 1 + 12 z −1 + 13 z −2 + 14 z −3 + 15 z −4
In effect,
N (z) z4
H(z) = = 4 1 3 1 2 1 1
D(z) z + 2z + 3z + 4z + 5
where
D(z) = z 4 + 12 z 3 + 13 z 2 + 14 z + 1
5

We note that
1 1 1 1
D(1) = 1 + 2 + 3 + 4 + 5 = 2.283 > 0 (SA.11a)
4 1 1 1 1
(−1) D(−1) = 1 − 2 + 3 − 4 + 5 = 0.783 > 0 (SA.11b)
12 DIGITAL SIGNAL PROCESSING: Signals, Systems, and Filters

(b) The Jury-Marden array can be constructed as shown in Table SA.4.


Table SA.4 The Jury-Marden array

b0 b1 b2 b3 b4

1 1 1 1
1 1 2 3 4 5
1 1 1 1
2 5 4 3 2 1

24 9 4 3
3 25 20 15 20
3 4 9 24
4 20 15 20 25

5 0.8991 0.392 0.1885

From Eqs. (SA.11a) and (SA.11b) and Table SA.4, we have

D(1) > 0 (−1)4 D(−1) > 0


1
b0 = 1 > = |b4 |
5
24 3
|c0 | = > = |c3 |
25 20
|d0 | = 0.8991 > 0.1885 = |d2 |

Therefore, conditions (i) to (iii) of the Jury-Marden stability criterion (see p. 220) are
satisfied and the filter is stable.

SA.8 The filter of Fig. SA.9 is subjected to an input



1 for n = 0 and n = 1
x(nT ) =
0 otherwise

Find the time-domain response in closed form if m1 = − 34 and m2 = − 18 . The filter is linear
and time-invariant.

x(nT)

y(nT)

m1 m2

Figure SA.9

Solution
From Fig. SA.9

Y (z) = X(z) + 2z −1 X(z) + z −2 X(z) + m1 z −1 Y (z) + m2 z −2 Y (z)

Hence
Y (z)(1 − m1 z −1 − m2 z −2 ) = (1 + 2z −1 + z −2 )X(z)
SAMPLE SOLUTIONS 13

or
(1 + 2z −1 + z −2 )
Y (z) = X(z)
(1 − m1 z −1 − m2 z −2 )
Therefore,

Y (z) z 2 + 2z + 1 z 2 + 2z + 1 z 2 + 2z + 1
= H(z) = 2 = 2 3 =  
X(z) z − m1 z − m2 z + 4 z + 18 z + 12 z + 14

The time-domain response can be obtained in a number of ways, as detailed below.


Method 1:
The input is the sum of two impulse functions, i.e.,

x(nT ) = δ(nT ) + δ(nT − T )

Hence
Rx(nT ) = R[δ(nT ) + δ(nT − T )]
Since the filter is linear, we have

Rx(nT ) = Rδ(nT ) + Rδ(nT − T )

and if h(nT ) is the impulse response, i.e.,

h(nT ) = Rδ(nT )

then by virtue of the fact that the filter is time-invariant, we get

y(nT ) = h(nT ) + h(nT − T )

In effect, all we have to do is find the impulse response. Expanding H(z)/z into partial fractions
gives
H(z) z 2 + 2z + 1 R R2 R2
=   = 1+ 1 +
z 1
z z+2 z+4 1 z z+2 z + 14
where

z 2 + 2z + 1  1
R1 =   = 1 1 =8
z + 12 z + 14 z=0 2 × 4

z 2 + 2z + 1  1
− 2
4  2 + 1
1
4
R2 =  =  =  =2
z z + 14 z=− 12 − 12 − 12 + 14 − 12 − 14

z 2 + 2z + 1  1
16 −
2
4 +1
1
16 + 16
8
R3 =  =   = = −9
z z + 12 z=− 14 − 14 − 14 + 12 1
− 16

i.e.,
R2 z R3 z
H(z) = R1 + 1 +
z+2 z + 14
and
  n  n

h(nT ) = R1 δ(nT ) + R2 − 12 + R3 − 14 u(nT )


  1 n  1 n

= 8δ(nT ) + 2 − 2 − 9 − 4 u(nT )

Now
y(nT ) = h(nT ) + h(nT − T )
Hence
  n  n

y(nT ) = 8[δ(nT ) + δ(nT − T )] + 2 − 12 − 9 − 14 u(nT )


  1 n−1 
1 n−1
+ 2 −2 − 9 −4 u(nT − T )
14 DIGITAL SIGNAL PROCESSING: Signals, Systems, and Filters

Method 2
Since
x(nT ) = δ(nT ) + δ(nT − T )
the z transform gives
z+1
X(z) = 1 + z −1 =
z
Hence
(z 2 + 2z + 1) (z + 1)
Y (z) = H(z)X(z) =  1

1 ×
z+2 z+4 z
Expanding H(z)X(z) into partial fractions, gives

R2 R3 R4
H(z)X(z) = R1 + + 1 +
z z+2 z + 14

where

R1 = lim H(z)X(z) = 1
z→∞

(z + 2z + 1)(z + 1) 
2
1
R2 =  1
 1
 = 1 1 =8
z+2 z+4 z=0 2 × 4
 1  1 1
2
(z + 2z + 1)(z + 1)   − 1 + 1 − 12 + 1
4  4 2
R3 =   =  =  =1
z + 14 z z=− 12 − 12 + 14 − 12 − 14 − 12
 1  1 1 3
(z 2 + 2z + 1)(z + 1)  2
16 − 4 + 1 − 4 +1 16 + 16 8
R4 =   = =   4
z+1 z 2
1
z=− 4 −1 + 1 −14 2 4
1
4−1 4
9 3
16× 4 27
= 1 =−
− 16 4

Therefore,
 n−1  n−1
y(nT ) = R1 δ(nT ) + R2 δ(nT − T ) + R3 u(nT − T ) − 12 + R4 u(nT − T ) − 14
 n−1 27  n−1
= δ(nT ) + 8δ(nT − T ) + u(nT − T ) − 12 − 4 u(nT − T ) − 14

Method 3
The inverse of Y (z) is obtained from first principles as

y(nT ) = Y0 (z)
res

where
(z 2 + 2z + 1)(z + 1) n−1
Y0 (z) = Y (z)z n−1 = H(z)X(z)z n−1 =   z
z z + 12 z + 14
However, watch out for pitfalls at the origin. In this case, we have a second-order pole at the
origin if n = 0, a first-order pole at the origin if n = 1, and no poles at the origin if n ≥ 2.
Hence, we have to find y(0) and y(T ) individually and then proceed to y(nT ) for n ≥ 2. This
would make this method quite long.
Method 4
We can express Y (z) into partial fractions as

(z 2 + 2z + 1)(z + 1) R R z R z
Y (z) =   = R1 + 2 + 3 1 + 4 1
z z + 12 z + 14 z z+2 z+4
SAMPLE SOLUTIONS 15

where

z(z 2 + 2z + 1)(z + 1)  1×1
R2 = lim zY (z) =    = 1 1 =8
z=0 z z + 12 z + 14 z=0 2 × 4

z+2 1
(z 2 + 2z + 1)(z + 1) 
R3 = lim1 × Y (z) =  
z=− 2 z z 2 z + 14 z=− 12
   
2 1 
− 12 + 2 − 12 + 1 − 12 + 1 1 + 1 12 1
4 −
=  1 2  1 1 = 1  1 = 81 = −2
−2 −2 + 4 4 −4 − 16

z+4 1
(z + 2z + 1)(z + 1) 
2
R4 = lim1 × Y (z) =  
z=− 4 z z 2 z + 12 z=− 14
   
2 1 3
− 14 + 2 − 14 + 1 − 14 + 1 2 9
×3
16 − 4 + 1 4
=  1 2  1 1 = 1 1 = 16 1 4 = 27
−4 − + 4 2 16 × 4 64

Constant A can be obtained by noting that

z3
lim Y (z) = R1 + R3 + R4 = =1
z=∞ z3
Thus
R1 = 1 − R3 − R4 = 1 − (−2) − 27 = 3 − 27 = −24
Hence
8 2z 27z
Y (z) = −24 + − +
z z + 12 z + 14
Therefore,
  n  n

y(nT ) = −24δ(nT ) + 8δ(nT − T ) + 27 − 14 − 2 − 12 u(nT )

Method 5
One could expand Y (z)/z into partial fractions as

Y (z) R1 R2 R3 R4
= + 2 + +
z z z z + 12 z + 14

However, this is essentially the same as method 4.

SA.9 A discrete-time system has a transfer function

z2 + 2
H(z) =
z2 − (2r cos θ)z + r 2

(a) Find the unit-step response in closed form.


(b) Using MATLAB, D-Filter, or similar software, plot the unit-step response for r = 0.3 and
θ = π/4.
(c) Repeat part (b) for r = 0.6 and θ = π/4.
(d) Repeat part (b) for r = 0.9 and θ = π/4.
(e) Compare the unit-step responses in parts (b) to (d).

Solution
(a) The z transform of the output of the system is given by

Y (z) = H(z)X(z) (SA.12)


16 DIGITAL SIGNAL PROCESSING: Signals, Systems, and Filters

where H(z) is the transfer function and X(z) is the z transform of the input. Since the
input is a unit step, we have
z
X(z) = Zu(nT ) = (SA.13)
z−1
Thus Eqs. (SA.12) and (SA.13) give

z2 + 2 z z 3 + 2z
Y (z) = · =
z 2 − (2r cos θ)z + r 2 z − 1 (z − 1)[z 2 − (2r cos θ)z + r 2 ]
The general inversion formula gives
 M

1
y(nT ) = Y (z)z n−1 dz = Res Y0 (z) (SA.14)
2πj Γ z=pi
i=1

where
(z 3 + 2z)z n−1
Y0 (z) = Y (z)z n−1 =
(z − 1)[z 2 − (2r cos θ)z + r 2 ]
(z 3 + 2z)z n−1
=
(z − 1)[z − r(ejθ + e−jθ )z + r 2 ]
2

(z 2 + 2)z n
=
(z − 1)(z − rejθ )(z − re−jθ )

and M = 3. The residues of Y0 (z) can be obtained as follows:



(z 2 + 2)z n 
R1 = lim(z − 1)Y0 (z) = 2  (SA.15)
z=1 z − (2r cos θ)z + r z=1
2

3
=
1 − (2r cos θ) + r 2

(z 2 + 2)z n 

R2 = lim (z − re )Y0 (z) = 
z=re jθ (z − 1)(z − re −jθ ) 
z=rejθ
(r 2 ej2θ + 2)r n ejnθ (r 2 ej2θ + 2)r n−1 ejnθ
= =
(rejθ − 1)(rejθ − re−jθ ) (rejθ − 1)2j sin θ
(r 2 cos 2θ + 2 + jr 2 sin 2θ)r n−1 ejnθ
=
(r cos θ − 1 + jr sin θ)2j sin θ
(r cos 2θ + 2 + jr 2 sin 2θ)r n−1 ejnθ
2
=
[(r cos θ − 1) + jr sin θ]2ejπ/2 sin θ
= M ejφ r n−1 ejnθ = M r n−1 ej(nθ+φ) (SA.16)

where
 
 r 2 cos 2θ + 2 + jr 2 sin 2θ 
M =  
[j(r cos θ − 1) − r sin θ]2 sin θ 

(r 2 cos 2θ + 2)2 + (r 2 sin 2θ)2
=
4[(r cos θ − 1)2 + (r sin θ)2 ] sin2 θ

and
r 2 sin 2θ (r cos θ − 1)
φ = tan−1 − tan−1
r 2 cos 2θ + 2 −r sin θ
2
r sin 2θ r sin θ π
= tan−1 − tan−1 −
r 2 cos 2θ + 2 (r cos θ − 1) 2
Similarly,
R3 = R2∗ (SA.17)
SAMPLE SOLUTIONS 17

since complex conjugate poles give complex conjugate residues. We note that there is no
additional pole at the origin when n = 0 and hence for n ≥ 0 Eq. (SA.14) gives
y(nT ) = R1 + R2 + R2∗ (SA.18)
Since the numerator degree in Y (z) does not exceed the denominator degree, we have
y(nT ) = 0 for n < 0
Therefore, for any n, Eqs. (SA.15)–(SA.18) give

y(nT ) = u(nT ) R1 + M r n−1 ej(nθ+φ) + M r n−1 e−j(nθ+φ)


= u(nT ) R1 + 2M r n−1 cos(nθ + φ)


(b) and (d) The step responses for the three cases are illustrated in Fig. SA.10a to c.
(e) On the basis of the step responses obtained, the system in part (b) is what they call
overdamped, the one in part (c) is critically damped, and the one in part (d) is referred to
as underdamped.
SA.10 A second-order digital filter has zeros z1 = ejπ/3 and z2 = e−jπ/3 and poles p1 = 0.5ejπ/4 and
p2 = 0.5e−jπ/4 and its multiplier constant is 2.
(a) Obtain the transfer function of the filter.
(b) Obtain an expression for the gain.
(c) Assuming that the sampling frequency is 2π, calculate the gain at ω = 0, π/4, π/3, and
π.

Solution
(a) Since we have the zeros, poles, and multiplier constant of the filter, the transfer function
can be readily constructed as
2(z − ejπ/3 )(z − e−jπ/3 ) 2[z 2 − (ejπ/3 + e−jπ/3 )z + 1]
H(z) = 1 jπ/4 1 −jπ/4 =
(z − 2 e )(z − 2 e ) z 2 − 12 (ejπ/4 + e−jπ/4 ) + 14
2[z 2 − 2(cos π/3)z + 1] 2[z 2 − z + 1]
= = √
z 2 − (cos π/4)z + 14 z 2 − 22 z + 14
(b) The gain is given by
 
 2[e2jωT − ejωT + 1] 
jωT  
M (ω) = |H(e )| =  √ 
 ej2ωT − 2 ejωT + 1 
2 4
 
 cos 2ωT + j sin 2ωT − cos ωT − j sin ωT + 1 
 
= 2 √ 
 cos 2ωT + j sin 2ωT − 2 (cos ωT + j sin ωT ) + 1 
2 4

(cos 2ωT − cos ωT + 1)2 + (sin 2ωT − sin ωT )2
=2 √ √
(cos 2ωT − 22 cos ωT + 14 )2 + (sin 2ωT − 22 sin ωT )2
(c) Since ωs = 2π, we have 2πfs = 2π/T = 2π. Hence T = 1 s. For the frequencies given,
the numerical values in Table SA.5 can be readily calculated.
Table SA.5
ω cos ωT sin ωT cos 2ωT sin 2ωT

0 1 0 1 0
√ √
π 2 2
4 2 2 0 1
√ √
π 1 3 3
3 2 2 − 12 2
π −1 0 1 0
18 DIGITAL SIGNAL PROCESSING: Signals, Systems, and Filters

Step Response
10

6
y(nT)

0
0 5 10 15 20 25
nT
(a)
Step Response
10

6
y(nT)

0
0 5 10 15 20 25
nT
(b)

Step Response
10

6
y(nT)

0
0 5 10 15 20 25
nT
(c)

Figure SA.10
SAMPLE SOLUTIONS 19

Thus

(1 − 1 + 1)2 + (0 − 0)2 2
M (0) = 2 √ = √ = 3.6840
2 1 2 5−2 2
(1 − 2 + 4) + (0 − 0)2 4

π  √ √
 (0 − 2
+ 1)2 + (1 − 2 2
2 ) √
M = 2 √ √2 √
2 2 2 2 2
4 (0 − 2 × + 14 )2 + (1 −
2 2 × 2 )
 √ √  √
(2 − 2)2 + (2 − 2)2 2(2 − 2)2
= 2 =2 = 1.489
( 12 − 1)2 + 1 (− 12 )2 + 1


π   √ √
 (− 21 − 1
+ 1) 2 + ( 3 − 3 )2
M = 2 √ 2 2
√ 2
√ √
3 (− 12 − 2
2
× 1
2 + 1 2
4 ) + ( 2
3
− 2 3
2 × 2 )

 0+0
= 2
 √ 2 =0
1−2− 2
4 + ···
 
(1 + 1 + 1)2 + (0 − 0) 32 × 16
M (π) = 2 √ =2 √
(1 + + 2
2
+ (0 − 0) 1 2
4)
(4 + 2 2 + 1)2
2×3×4
= √ = 3.0658
4+2 2+1
SA.11 A digital filter characterized by the transfer function
2(z 2 − z + 1)
H(z) = √
2 1
z2 − 2 z + 4

and a practical D/A converter are connected in cascade as shown in Fig. SA.11a. The output
waveform of the D/A converter is of the form illustrated in Fig. S11b where τ = 0.01T s and
T is the sampling period. The sampling frequency is 2π rad/s.

(a) Obtain an expression for the gain of just the digital filter.
(b) Obtain an expression for the overall gain of the digital filter in cascade with the D/A
converter.
(c) Calculate the gain of just the digital filter at ω = 0, π/4, π/3, and π.
(d) Calculate the overall gain of the digital filter in cascade with the D/A converter at ω =
0, π/4, π/3, and π.
(e) Sketch (i) the gain of just the digital filter and (ii) the overall gain of the digital filter
in cascade with the D/A converter, and explain the effect of the D/A converter on the
amplitude response.

Solution

(a) The gain is given by


 
 2[e2jωT − ejωT + 1] 
 
M (ω) = |H(ejωT )| =  √ 
 ej2ωT − 2 ejωT + 1 
2 4
 
 cos 2ωT + j sin 2ωT − cos ωT − j sin ωT + 1 
 
= 2 √ 
 cos 2ωT + j sin 2ωT − 2 (cos ωT + j sin ωT ) + 1 
2 4

(cos 2ωT − cos ωT + 1)2 + (sin 2ωT − sin ωT )2
=2 √ √
(cos 2ωT − 22 cos ωT + 14 )2 + (sin 2ωT − 22 sin ωT )2
20 DIGITAL SIGNAL PROCESSING: Signals, Systems, and Filters

y(nT) Practical
Digital
x(nT)
Filter
D/A ˜y(t)
converter

(a)

˜y(t)

y(kT)

¿ t
kT
(b)

Figure SA.11

(b) The practical D/A converter has a gain


 
 sin(ωτ /2) 
|Hp (jω)| = τ   (SA.19)
ωτ /2 

where τ = 0.01T and T = 2π/ωs = 2π/2π = 1 s (see Eq. (6.60) in textbook). Hence the
overall gain of the digital filter in cascade with the D/A converter is given by
  
(cos 2ωT − cos ωT + 1)2 + (sin 2ωT − sin ωT )2  sin ωτ /2 
MT (ω) = 2 √ √ 
·τ 
(cos 2ωT − 22 cos ωT + 14 )2 + (sin 2ωT − 22 sin ωT )2 ωτ /2 

(c) Since ωs = 2π, we have 2πfs = 2π/T = 2π. Hence T = 1 s. For the frequencies given,
the numerical values in Table SA.6 can be readily calculated.
Table SA 6

ω cos ωT sin ωT cos 2ωT sin 2ωT

0 1
√ √
0 1 0
π 2 2
4 2 √2
0 1

π 1 3 3
3 2 2 − 12 2
π −1 0 1 0
SAMPLE SOLUTIONS 21

Thus

(1 − 1 + 1)2 + (0 − 0)2 2
M (0) = 2 √ = √ = 3.6840
2 1 2 5−2 2
(1 − 2 + 4) + (0 − 0)2 4

π   √ √
 (0 − 2
+ 1)2 + (1 − 2 2
2 ) √
M = 2 √ √2 √
2 2 2 2 2
4 (0 − 2 × + 14 )2 + (1 −
2 2 × 2 )
 √ √  √
(2 − 2)2 + (2 − 2)2 2(2 − 2)2
= 2 =2 = 1.4890
( 21 − 1)2 + 1 (− 12 )2 + 1

π   √ √
 (− 21 − 12 + 1)2 + ( 23 − 23 )2
M = 2 √ √ √ √
3 (− 12 − 22 × 12 + 14 )2 + ( 23 − 22 × 23 )

 0+0
= 2
 √ 2 =0
1−2− 2
4 + · · ·
 
(1 + 1 + 1)2 + (0 − 0) 32 × 16
M (π) = 2 √ =2 √
(1 + 22 + 14 )2 + (0 − 0) (4 + 2 2 + 1)2
2×3×4
= √ = 3.0657
4+2 2+1

(d) Since T = 1s, Eq. (SA.19) gives


   
 sin(0.01T ω/2)   
|HP (jω)| = 0.01T   = 0.01  sin(0.01ω/2) 
0.01T ω/2   0.01ω/2 
= p0.01

Hence the overall gain of the digital filter in cascade with the D/A converter is obtained
from the above numerical values as follows:

MT (0) = 3.6840 × 0.01 = 3.6840 × 10−2


π 
MT = 1.4890 × 0.01 = 1.4890 × 10−2
4
π 
MT = 0 × 0.0100 = 0.0
3
MT (π) = 3.0557 × 0.01 = 3.0557 × 10−2

SA.12 Realize the transfer function


 
z z 3z 5z
H(z) = + · +
z − 0.5 + j0.3 z − 0.5 − j0.3 z + 0.4 z + 0.5
using two second-order canonic filter sections in cascade.

Solution
The transfer function can be expressed as

2z 2 − 0.5z − 0.5z 3z 2 + 1.5z + 5z 2 + 2z


H(z) = ·
z 2 − z + 0.52 + 0.32 z 2 + 0.9z + 0.2
2 2
2z − z 8z + 3.5z
= 2 ·
z − z + 0.34 z 2 + 0.9z + 0.2
2 − z −1 8 + 3.5z −1
= ·
1 − z −1 + 0.34z −2 1 + 0.9z −1 + 0.2z −2
= H1 (z) · H2 (z)
22 DIGITAL SIGNAL PROCESSING: Signals, Systems, and Filters

where
2 − z −1 8 + 3.5z −1
H1 (z) = and H2 (z) =
1− z −1+ 0.34z −2 1 + 0.9z −1 + 0.2z −2
Now if we realize H1 (z) and H2 (z) in terms of direct canonic sections, the cascade realization
shown in Fig. SA.12 can be readily obtained.

−1

H1(z)
−0.34

−0.9 3.5

H2(z)
−0.2

Figure SA.12

SA.13 An analog elliptic lowpass filter with a cutoff frequency of 1 rad/s has a transfer function of
the form
0.075(s2 + 2.6)
H(s) =
(s + 0.38)(s2 + 0.31s + 0.51)
(a) By applying the lowpass-to-highpass transformation
1
s=

get a continuous-time highpass transfer function.
(b) Construct the zero-pole plot of the continuous-time highpass transfer function.
(c) Using the zeros and poles obtained in part (b), get a corresponding discrete-time highpass
transfer function using the matched-z-transformation method. The sampling frequency
is ωs = 20 rad/s.
SAMPLE SOLUTIONS 23

(d) How does the matched-z-transformation method compare with the invariant-impulse-
response method?

Solution
The transfer function has zeros at
z = z1 , z1∗
where
z1 = 0 + j1.6125
and poles at
z = p0 , p1 , p∗1
where
p0 = −0.3800 + j0.0000
p1 = −0.1550 + j0.6971
(a) The highpass transfer function is obtained as
 
 0.075(s̄2 + 2.6) 
HHP (s̄) = H(s)  = 
1 (s + 0.38)(s 2 + 0.31s + 0.51) 
s̄→ s s=1/s̄

0.075( s̄12 + 2.6)


=
( 1s̄ + 0.38)( s̄12 + 0.31 1s̄ + 0.51)
0.075s̄(1 + 2.6s̄2 )
=
(1 + 0.38s̄)(0.51s̄2 + 0.31s̄ + 1)
1
0.075 × 2.6 s̄(s̄2 + 2.6 )
= × 1 0.31 1
0.38 × 0.51 (s̄ + 2
0.38 )(s̄ + 0.51 s̄ + 0.51 )

s̄(s̄2 + 0.3846)
= 1.0063 ×
(s̄ + 2.6316)(s̄2 + 0.6079s̄ + 1.9609)
Therefore, the highpass filter has zeros at
s̄ = s̄0 , s̄1 , s̄2
where
s̄0 = 0, s̄1 , s̄2 = 0 ± j0.6202
and poles at
s̄ = p̄0 , p̄1 , p̄2
where
p̄0 = −2.6316, p̄1 , p̄2 = −0.3040 ± j1.3669
(b) The transfer function of the digital filter is given by
M
!
H0 (z − es̄i T )
i=1
HD (z) = (z + 1)L N
!
(z − ep̄i T )
i=1

where L = 0 for a highpass filter. Hence


3
!
(z − z̃i )
i=1
HD (z) = 3
!
(z − p̃i )
i=1
24 DIGITAL SIGNAL PROCESSING: Signals, Systems, and Filters

where

z̃0 = e0T = 1, z̃1 , z̃2 = e±j0.6202T


p̃0 = e−2.6316T , p̃1 , p̃2 = e(−0.3040±j1.3669)T

with
2π 2π π
T = = =
ωs 20 10
(c) The method works with all types of filters, i.e., LP, HP, BP, and BS, and is easy to apply.
However, it tends to increase the passband ripple.
SA.14 A lowpass analog filter has a transfer function
1
HA (s) = √
s2 + 2s + 1
(a) Assuming a sampling frequency of 10π, design a digital filter using the bilinear transfor-
mation method.
(b) Find the 1-dB and 30-dB frequencies of the analog filter.
(c) Find the 1-dB and 30-dB frequencies of the digital filter.
(d) What should be the 3-dB frequency of the analog filter to get a 3-dB frequency in the
digital filter at 1 rad/s?

Solution

(a) The sampling period is give by


1 2π 2π 1
T = = = =
fs ωs 10π 5
The discrete-time transfer function is given by

HD (z) = HA (s) s= 2 z−1
T z+1


1 
= √ 
s2 + 2s + 1  10(z−1)
s= z+1

1
= 2 √ 
10(z−1) 10(z−1)
z+1 + 2 z+1 +1
z 2 + 2z + 1
= √
100(z 2− 2z + 1) + 10 2(z 2 − 1) + (z 2 + 2z + 1)
z 2 + 2z + 1
=
b2 z 2 + b1 z + b0
where

b0 = 100 − 10 2 + 1 = 86.86
b1 = −200 + 2 = −198.00

b2 = 100 + 10 2 + 1 = 115.14

Alternatively, by factorizing constant b2 in the denominator, the transfer function can be


expressed as
z 2 + 2z + 1
HD (z) = H0 2
z + b1 z + b0
where

H0 = 8.685 × 10−3 , b0 = 0.7544, b1 = −1.720


SAMPLE SOLUTIONS 25

(b) The frequency response of the analog filter


1
HA (jω) = √
−ω 2 + j 2ω + 1
Hence the loss is given by
"
A(ω) = 20 log (1 − ω 2 )2 + 2ω 2
= 10 log(1 − 2ω 2 + ω 4 + 2ω 2 )

Thus
1 + ω 4 = 100.1×A(ω)
By letting A(ω) = 1 dB, the 1-dB frequency is obtained as

ω1 = (100.1 − 1)1/4 = 0.7133 rad/s

By letting A(ω) = 30 dB, the 30-dB frequency is obtained as

ω2 = (100.1×30 − 1)1/4 = 5.622 rad/s

(c) A frequency ωi in the analog filter transforms into a frequency Ωi given by

2 ωi T
Ωi = tan−1 (SA.20)
T 2
Hence the 1- and 30-dB frequencies in the digital filter are obtained as
0.7133
Ω1 = 10 × tan−1 = 0.7121 rad/s
10
and
5.622
Ω2 = 10 × tan−1 = 5.122 rad/s
10
respectively.
(d) Now if the 3-dB frequency in the digital filter is required to be 1 rad/s, then according
to Eq. (SA.20) the 3-dB frequency in the analog filter should be

2 Ω3 T 1
ω3 = tan = 10 × tan = 1.003 rad/s
T 2 10