dsp2 Sol
dsp2 Sol
D. Sundararajan
c Springer 2024
1
2
Chapter 1
1.1 Given a continuous-time signal x(t), find the corresponding samples of the digital signal
in decimal form. Assume rounding and represent the samples with 3-digit decimal precision
for the fractional part. For rounding, add 0.0005 to the magnitude of the number and trun-
cate the result to 3-digit decimal precision for the fractional part. Assume sampling interval
Ts = 0.25 seconds.
1.1.1 x(t) = e−t , 0 ≤ t < 2.
* 1.1.2 x(t) = cos(πt + π5 ), 0 ≤ t < 2.
1.1.3 x(t) = sin(πt + π7 ), 0 ≤ t < 2.
1.1.4 x(t) = t2 u(t), 0 ≤ t < 2.
Samples of the digital signal with 3-digit decimal precision for the fractional part are
1.1.2
π π π π
{cos(π0 + ), cos(π1Ts + ), cos(π2Ts + ), cos(π3Ts + ),
5 5 5 5
π π π π
cos(π4Ts + ), cos(π5Ts + ), cos(π6Ts + ), cos(π7Ts + )}
5 5 7 5
Samples of the digital signal with 3-digit decimal precision for the fractional part are
1.1.3
π π π π
{sin(π0 + ), sin(π1Ts + ), sin(π2Ts + ), sin(π3Ts + ),
7 7 7 7
π π π π
sin(π4Ts + ), sin(π5Ts + ), sin(π6Ts + ), sin(π7Ts + )}
7 7 7 7
Samples of the digital signal with 3-digit decimal precision for the fractional part are
3
Samples of the digital signal with 3-digit decimal precision for the fractional part are
1.2 If the waveform x(n) is periodic, what is its period N ? Find the sample values of x(n)
in the range n = 0 to n = N . Verify that x(n) = x(n + N ). Find the sample value x(78).
* 1.2.1 x(n) = sin(0.4πn).
√
1.2.2 x(n) = sin( 2 82π n + π4 ).
1.2.3 x(n) = −6 + sin( 2π π
5 n + 3 ).
2
1.2.1 f = 0.2 = 10 is a rational number. The waveform is periodic with period N = 5. The
samples values of x(n) are The samples values of x(n) are
{0, 0.9511, 0.5878, −0.5878, −0.9511, 0, 0.9511, 0.5878, −0.5878, −0.9511, 0, 0.9511}
4
x(0) = 1, x(1) = 0.8270, x(2) = 0.4135, x(3) = 0
1.4 Find the even and odd components of the signal. Verify that, for n = −3, −2, −1, 0, 1, 2, 3,
the two components add up to the values of the signal. Verify that the sum of the values of
the odd component is zero and that those of the even component and the signal are equal.
1.4.1 x(0) = 1, x(1) = 2, x(2) = −3, x(3) = 4 and x(n) = 0 otherwise.
xe (n) = 0, |n| > 3 and xo (n) = 0, |n| > 3 since x(n) = 0, |n| > 3. The samples of x(n) are
1
for n ≥ 1
u(n − 1) − u(−(n + 1)) 2
xo (n) = = 0 for n = 0
2
− 21 for n ≤ −1
{1, 1, 1, 0̂, 0, 0, 0}
ˆ
{0.5633, −0.2948, −0.9309, −0.8660, −0.1490, 0.6802, 0.9972}
5
The samples of time-reversed x(n) are
ˆ
{0.9972, 0.6802, −0.1490, −0.8660, −0.9309, −0.2948, 0.5633}
{9, 4, 1, 0̂, 0, 0, 0}
6
xo(n) = {−4.5000, −2.0000, −0.5000, 0̂, 0.5000, 2.0000, 4.5000}
1.5 If x(n) is an energy signal, find its energy. If x(n) is a power signal, find its average
power.
1.5.1 x(−1) = −1, x(0) = 2, x(1) = 3, x(2) = 4 and x(n) = 0 otherwise.
This is an energy signal since,
900
its energy 19 is finite.
1.5.3 x(n) = 3n
Neither a power nor an energy signal.
1.6 Using scaled and shifted impulses, obtain an analytical description of the signal x(n) .
1.6.1 x(0) = 1, x(−3) = 2, x(2) = −4, x(5) = 7 and x(n) = 0 otherwise.
7
1.7.2 x(−1) = 1, x(0) = 1, x(1) = 1, x(2) = 2, x(3) = 2, x(4) = −5, x(5) = 3, and x(n) = 0
otherwise.
1.8 Find the rectangular form of the sinusoid. List the sample values of one cycle, starting
from n = 0, of the sinusoid. Convert the rectangular form back to polar form and verify
that it is the same as the given sinosoid.
−π 2π −π 2π √ 2π 2π
x(n) = 2 cos( ) cos( n) − 2 sin( ) cos( n) = 3 cos( n) + sin( n)
6 8 6 8 8 8
The samples of the sinusoid x(n) are
2π π 2π π √ 2π 2π
x(n) = 2 cos( n) cos( ) + (2) sin( n)(− sin( ) = 3 cos( n) − 1 sin( n)
8 6 8 6 8 8
The samples of the sinusoid x(n) are
√ 2π √ 2π
x(n) = 0.5 2 cos( n) − 0.5 2 sin( n)
8 8
The samples of the sinusoid x(n) are
1.9 Given the sinusoids x(n) and y(n), find the polar form of the sinusoid z(n) = x(n)+y(n).
Find the sample values of one cycle, starting from n = 0, of all the three sinusoids and verify
that the sample values of x(n) + y(n) are the same as those of z(n).
8
z(n) = 1 cos( 2π π
6 n + 3 ). The samples of the sinusoid x(n) are
9
z(n) = 1.2393 cos( 2π
6 n + 2.7263). The samples of the sinusoid x(n) are
1.10 Given a real sinusoid, express it in terms of complex exponentials xc(n). Find the
sample values of one cycle, starting from n = 0, of the two equivalent forms and verify that
the sample values of of both of them are the same.
3 j( 2π n− π ) 2π π
(e 8
xc(n) = 6 + e−j( 8 n− 6 ) )
2
The samples of the sinusoid x(n) and xc(n) are the same.
1 j( 2π n− π ) 2π π
(e 8
xc(n) = 4 + e−j( 8 n− 4 ) )
2
The samples of the sinusoid x(n) and xc(n) are the same.
2 j( 2π n+π) 2π
xc(n) = (e 8 + e−j( 8 n+π) )
2
The samples of the sinusoid x(n) and xc(n) are the same.
4 j( 2π n− 2π ) 2π 2π
xc(n) = (e 8 3 + e−j( 8 n− 3 ) )
2
The samples of the sinusoid x(n) and xc(n) are the same.
1.11 Given the sinusoid x(n), find the sample values of one cycle, starting from n = 0, of
x(n) and x(an + k). Assume interpolation using zero-valued samples, if necessary. First
find the samples of x(an + k) by replacing n by an + k in x(n). Then, subject x(n) to the
required shifting and then do the required scaling on the shifted signal. Verify that either
procedure produces the same result.
10
1.11.1 x(n) = sin( 2π π
8 n − 3 ), a = −2, k = 1.
The samples of the sinusoid x(n) are
−0.8660, 0, 0, 0, 0, 0, 0.8660, 0, 0
11
1.12 Given the signal x(n), x(an + k). Assume interpolation using zero-valued samples, if
necessary. First find the samples of x(an + k) by replacing n by an + k in x(n). Then,
subject x(n) to the required shifting and then do the required scaling on the shifted signal.
Verify that either procedure produces the same result.
1.12.1 x(0) = 1, x(1) = −2, x(2) = 3, x(3) = 4 and x(n) = 0 otherwise. a = 2, k = −2.
The samples of the waveform x(n) are
1̂, −2, 3, 4
0̂, 0, 1, −2, 3, 4
0̂, 1, 3
1̂, −0.6, 0.36, −0.2160, 0.1296, −0.0778, 0.0467, −0.0280, 0.0168, −0.0101, 0.0060, −0.0036, 0.0022, . . . ,
, . . . , 0.3855, 0.4241, 0.4665, 0.5132, 0.5645, 0.6209, 0.6830, 0.7513, 0.8264, 0.9091, 1̂
, . . . , 0.3855, 0.4241, 0.4665, 0.5132, 0.5645, 0.6209, 0.6830, 0.7513, 0.8264, 0.9091, 1, 0̂
0̂, 0.9091, 0.7513, 0.6209, 0.5132, 0.4241, 0.3505, 0.2897, 0.2394, 0.1978, 0.1635, . . . ,
12
1.13
1.13.1 Let the low frequency fl of a bandpass signal be 10 kHz and the high frequency fh
be 15 kHz. Find the required sampling frequency.
The bandwith of the bandpass signal is B = 15 − 10 = 5 kHz. The center frequency is
fc = (10 + 15)/2 = 12.5 kHz. If fc > B/2 and fh is an integral multiple of B, then the
sampling frequency is 2B. Therefore, the sampling frequency is 2(5) = 10 kHz.
1.13.2 Let the low frequency fl of a bandpass signal be 10 kHz and the high frequency fh
be 16 kHz. Find the required sampling frequency.
Assuming that x(n) = 0, n < 0, and its even part is xe (0) = 1 and xe (n) = 0.5an , n 6= 0.
Find x(n).
The period of x(n) is 5. The period of y(n) is 3. The GCD of the periods is 1. Therefore,
is periodic with period (5 × 3)/1 = 15. The first 20 samples of z(n), starting with index 0,
are
{2, −1.3090, −0.1910, 1.3090, −1.3090, 0.5, 0.1910, −0.1910, −0.1910, 0.1910,
0.5, −1.3090, 1.3090, −0.1910, −1.3090, 2, −1.3090, −0.1910, 1.3090, −1.3090, 0.5}
13
14
Chapter 2
1 − (−a)(n+1)
yzs (n) = b , (−a) 6= 1, n = 0, 1, 2, . . .
1 − (−a)
The total solution of the continuous system is
The approximate samples of the complete response by iteration of the difference equation
are
1.9843, 1.9688, 1.9535, 1.9385, 1.9237, 1.9092, 1.8948, 1.8807, 1.8669, 1.8532
The approximate samples of the zero-input response are
1.9685, 1.9375, 1.9070, 1.8770, 1.8474, 1.8183, 1.7897, 1.7615, 1.7338, 1.7064
0.0157, 0.0312, 0.0465, 0.0615, 0.0763, 0.0908, 0.1052, 0.1193, 0.1331, 0.1468
15
The approximate samples of the complete response, by adding the zero-input and zero-state,
are
1.9843, 1.9688, 1.9535, 1.9385, 1.9237, 1.9092, 1.8948, 1.8807, 1.8669, 1.8532
The approximate samples of the complete response by iteration of the difference equation
are
1.8621, 1.7432, 1.6407, 1.5523, 1.4761, 1.4104, 1.3538, 1.3050, 1.2630, 1.2267
The approximate samples of the zero-input response are
1.7241, 1.4863, 1.2813, 1.1046, 0.9522, 0.8209, 0.7077, 0.6101, 0.5259, 0.4534
0.1379, 0.2568, 0.3593, 0.4477, 0.5239, 0.5896, 0.6462, 0.6950, 0.7370, 0.7733
The approximate samples of the complete response, by adding the zero-input and zero-state,
are
1.8621, 1.7432, 1.6407, 1.5523, 1.4761, 1.4104, 1.3538, 1.3050, 1.2630, 1.2267
2.1.2 τ = 3. The sampling intervals are: (i) Ts = 0.003 seconds and (ii) Ts = 0.03 seconds.
τ Ts 1
b= and a = −
τ Ts + 1 τ Ts + 1
yzi (n) = 2(−a)(n+1)
1 − (−a)(n+1)
yzs (n) = b , (−a) 6= 1, n = 0, 1, 2, . . .
1 − (−a)
The approximate samples of the complete response by iteration of the difference equation
are
1.9911, 1.9822, 1.9735, 1.9648, 1.9562, 1.9477, 1.9392, 1.9308, 1.9225, 1.9143
The approximate samples of the zero-input response are
1.9822, 1.9645, 1.9470, 1.9296, 1.9124, 1.8953, 1.8784, 1.8617, 1.8451, 1.8286
0.0089, 0.0178, 0.0265, 0.0352, 0.0438, 0.0523, 0.0608, 0.0692, 0.0775, 0.0857
16
The approximate samples of the complete response, by adding the zero-input and zero-state,
are
1.9911, 1.9822, 1.9735, 1.9648, 1.9562, 1.9477, 1.9392, 1.9308, 1.9225, 1.9143
The approximate samples of the complete response by iteration of the difference equation
are
1.9174, 1.8417, 1.7722, 1.7084, 1.6499, 1.5963, 1.5470, 1.5019, 1.4604, 1.4224
The approximate samples of the zero-input response are
1.8349, 1.6834, 1.5444, 1.4169, 1.2999, 1.1925, 1.0941, 1.0037, 0.9209, 0.8448
0.0826, 0.1583, 0.2278, 0.2916, 0.3501, 0.4037, 0.4530, 0.4981, 0.5396, 0.5776
The approximate samples of the complete response, by adding the zero-input and zero-state,
are
1.9174, 1.8417, 1.7722, 1.7084, 1.6499, 1.5963, 1.5470, 1.5019, 1.4604, 1.4224
2.1.3 τ = 2. The sampling intervals are: (i) Ts = 0.002 seconds and (ii) Ts = 0.02 seconds.
τ Ts 1
b= and a = −
τ Ts + 1 τ Ts + 1
yzi (n) = 2(−a)(n+1)
1 − (−a)(n+1)
yzs (n) = b , (−a) 6= 1, n = 0, 1, 2, . . .
1 − (−a)
The approximate samples of the complete response by iteration of the difference equation
are
1.9960, 1.9920, 1.9881, 1.9842, 1.9802, 1.9763, 1.9724, 1.9686, , 1.9647, 1.9609
The approximate samples of the zero-input response are
1.9920, 1.9841, 1.9762, 1.9683, 1.9605, 1.9527, 1.9449, 1.9371, 1.9294, 1.9217
0.0040, 0.0080, 0.0119, 0.0158, 0.0198, 0.0237, 0.0276, 0.0314, 0.0353, 0.0391
17
The approximate samples of the complete response, by adding the zero-input and zero-state,
are
1.9960, 1.9920, 1.9881, 1.9842, 1.9802, 1.9763, 1.9724, 1.9686, 1.9647, 1.9609
The approximate samples of the complete response by iteration of the difference equation
are
1.9615, 1.9246, 1.8890, 1.8548, 1.8219, 1.7903, 1.7599, 1.7307, 1.7026, 1.6756
The approximate samples of the zero-input response are
1.9231, 1.8491, 1.7780, 1.7096, 1.6439, 1.5806, 1.5198, 1.4614, 1.4052, 1.3511
0.0385, 0.0754, 0.1110, 0.1452, 0.1781, 0.2097, 0.2401, 0.2693, 0.2974, 0.3244
The approximate samples of the complete response, by adding the zero-input and zero-state,
are
1.9615, 1.9246, 1.8890, 1.8548, 1.8219, 1.7903, 1.7599, 1.7307, 1.7026, 1.6756
2.2 Find the linear convolution y(n) of the two finite sequences x(n) and h(n). The symbol
ˆ on the element indicates that its index is zero. Verify the convolution sum by using the
sum and alternating sum methods.
2.2.1
x = {2̂, 1, 3, 4} and {h = 1̂, −1, 4, 3}
2.2.2
x = {1, 2̂, 1, 3, 4} and {h = 2, 3, 1̂, −1, 4, 3}
2.2.3
x = {0̂, 0, 2, 1, 3, −4} and {h = 2, 3, 1̂, −1, 4, −3}
2.2.4
ˆ
x = {2, 1, 3, −4} and {h = 1, −2, 4̂, 3}
18
ˆ −12}
y = {2, −3, 9, 0, 23, −7,
2.2.5
x = {2̂, 0, 3, 0} and {h = 0̂, −2, 0, 3}
y = {0̂, −4, 0, 0, 0, 9, 0}
2.3 Find the closed-form expression of the convolution of the sequences x(n)u(n) and
h(n)u(n). Find the first few values of the convolution of x(n) and h(n) using their sample
values and verify that they are the same as those obtained from the closed-form expression.
2.3.1
x(n) = (0.9)n u(n) and h(n) = (0.6)n u(n)
The first few values of the sequences are
∞
X n
X
y(n) = x(k)h(n − k) = (0.9)k (0.6)n−k , n ≥ 0
k=−∞ k=0
n k n+1 !
n
X 0.9 n 1 − 0.9
0.6
= (0.6) = (0.6)
k=0
0.6 1 − 0.9
0.6
= (3(0.9) − 2(0.6)n )u(n)
n
2.3.2
x(n) = (0.6)(n−1) u(n − 1) and h(n) = (0.5)(n−2) u(n − 2)
The convolution of
x(n) = (0.6)(n) u(n) and h(n) = (0.5)(n) u(n)
can be found and then shifted right by 3 sample intervals to get the desired output. The
first few values of the sequences are
∞
X n
X
y(n) = x(k)h(n − k) = (0.6)k (0.5)n−k , n ≥ 0
k=−∞ k=0
n k n+1 !
X 0.6 1 − 0.6
= (0.5)n = (0.5)n 0.5
k=0
0.5 1 − 0.6
0.5
= (6(0.6)n − 5(0.5)n )u(n)
19
The desired output is
(6(0.6)(n−3) − 5(0.5)(n−3) )u(n − 3)
The first four values of the convolution output are
2.3.3
x(n) = (0.7)n u(n − 1) and h(n) = (0.6)n u(n + 1)
The first few nonzero values of the sequences are
2.3.4
x(n) = (0.9)n u(n) and h(n) = δ(n − 2)
The first few values of the convolution output are
2.3.5
x(n) = (0.8)n u(n) and h(n) = u(n)
The convolution output is
∞
X n
X
y(n) = x(k)h(n − k) = (0.8)k (1)n−k , n ≥ 0
k=−∞ k=0
n k n+1 !
n
X 0.8 n 1 − 0.8
1
= (1) = (1)
1 − 0.8
1 1
k=0
!
n+1
1 − (0.8)
= = (5 − 4(0.8)n )u(n)
1 − (0.8)
2.4 A system is characterized by the difference equation with the given input signal x(n) and
the initial condition y(−1). First, find the impulse response of the system and using which
20
find the zero-input, zero-state and total responses of the system. Verify your results by
finding the first 10 total output samples using the difference equation by iteration. Deduce
expressions for the transient and steady-state response of the system.
2.4.1 The difference equation is
By iteration, the first few values of the total response of the system are
0.6000, 0.5200, 0.5840, 0.5328, 0.5738, 0.5410, 0.5672, 0.5462, 0.5630, 0.5496
3.0000, −4.4000, 3.5200, −2.8160, 2.2528, −1.8022, 1.4418, −1.1534, 0.9227, −0.7382
With h(1) = −4.4, and letting n = 1, we get C = 5.5. The impulse response is
3.0000, −1.4000, 2.1200, −0.6960, 1.5568, −0.2454, 1.1964, 0.0429, 0.9657, 0.2275
−2.4000, 1.9200, −1.5360, 1.2288, −0.9830, 0.7864, −0.6291, 0.5033, −0.4027, 0.3221
The constant term is the steay-state response and the sum of the decaying terms is the
transient response.
21
The input is x(n) = (0.5)n u(n). The initial condition is y(−1) = 2.
By iteration, the first few values of the total response of the system are
2.8000, 4.0200, 4.3680, 4.3062, 4.0631, 3.7505, 3.4223, 3.1035, 2.8049, 2.5303
1.0000, 1.9000, 1.7100, 1.5390, 1.3851, 1.2466, 1.1219, 1.0097, 0.9088, 0.8179
With h(1) = 1.9, and letting n = 1, we get C = 2.1111. The impulse response is
1.8000, 1.6200, 1.4580, 1.3122, 1.1810, 1.0629, 0.9566, 0.8609, 0.7748, 0.6974
The sum of the two input modes is the steay-state response and the sum of the rest is the
transient response.
22
2.4.3 The difference equation is
{0.8660, 0.9659, 0.5000, −0.2588, −0.8660, −0.9659, −0.5000, 0.2588, 0.8660, 0.9659}
By iteration, the first few values of the total response of the system are
3.1321, 0.6054, 1.5421, −1.0971, −1.2229, −1.9419, −0.6066, 0.4423, 1.6813, 1.6210
1.7321, 1.5854, 0.8561, −0.6169, −1.5590, −1.7066, −0.7713, 0.5576, 1.6006, 1.6775
1.4000, −0.9800, 0.6860, −0.4802, 0.3361, −0.2353, 0.1647, −0.1153, 0.0807, −0.0565
By iteration,
h(0) = 2 and h(1) = −0.4
As the values of the input impulse signal is zero for n > 0, the response for n > 0 can be
considered as zero-input response. The characteristic equation is
(λ + 0.7) = 0
C(−0.7)n u(n − 1)
With h(1) = −0.4, and letting n = 1, we get C = 0.4/0.7 = 0.5714. The impulse response
is
n
!!
−j π j( 2π j( 2π
X
= Re e 6 1.4286e 8 n) + 0.5714(−0.7) n
((−1.4286)e 8 ) m
)
m=0
23
!!
j( 2π
8 ) n+1
−j π j( 2π
8 n) n (−1.4286e ) −1
= Re e 6 1.4286e + 0.5714(−0.7) 2π
(−1.4286ej( 8 ) )−1
2.5 The difference equation of the system is given. Apply the given inputs
xa(n) = {2̂, −1, 3, 4}, xb(n) = {3̂, 2, 0, −4}, and xc(n) = 2xa(n) + 3xb(n)
ˆ 4, 6, −4}
xc = 2xa + 3xb = {13,
As the difference equation has a constant term, the system is nonlinear.
ˆ 4, 6, −4}
xc = 2xa + 3xb = {13,
As the difference equation has a squared past output term, the system is nonlinear.
ˆ 0.2000, −3.0080, −5.8096}
ya = {−2,
ˆ −3.8000, −2.8880, 2.3319}
yb = {−3,
24
2.5.3. y(n) = 2x(n) − 0.4(−n)y(n − 1) − 2 sin(π).
ˆ 4, 6, −4}
xc = 2xa + 3xb = {13,
As the constant term is zero, the system is linear.
2.6 The difference equation of the system is given. Apply the given input
at starting at n = 0. Apply the same input values starting at n = 2. Find the outputs
Determine whether the system is time invariant. Aussume that the system is initially relaxed
at the instant of applying the input.
25
yd = {0̂, 0, 4.0000, 2.8000, 10.4800, 28.9600}
y = {2̂, 3, 3, 2}
yd = {0̂, 0, 3, 2, 2, 8}
2.7 The difference equation of the system is given. Determine whether the system is causal.
26
2.8.1. ω0 = 1 and h(n) = (a)n u(n), a = 0.8. For a everlasting exponential input ejω0 (n) , we
get
X∞ ∞
X
y(n) = h(k)ejω0 (n−k) = ejω0 n h(k)e−jω0 k
k=−∞ k=−∞
we get,
y(n) = H(ejω0 )ejω0 n = H(ejω0 )x(n)
For a causal exponential, with ω0 = 1 and h(n) = (a)n , a = 0.8, we get
n
X n
X
jω0 (n−k) jω0 n
y(n) = h(k)e =e (a)k e−jω0 k
k=0 k=0
1 jω0 n
= e − (a)(n+1) e−jω0 , n = 0, 1, . . .
1 − (a)e−jω0
27
The magnitude and the phase of the coefficient of the steady-state component are
1 1
| | = 1.0779 and 6 = −0.6287
1 − (ae−jω0 ) 1 − (ae−jω0 )
2.9 Given the impulse response of a LTI discrete system, is the system BIBO stable?
The cumulative sum of the magnitude of the impulse response converges to 5, a bounded
value. The system is BIBO stable.
2.9.2 h(n) = (0.6)n u(n).
∞
X 1
S= |a|n = < ∞, |a| < 1
0
1 − |a|
The cumulative sum of the magnitude of the impulse response converges to 2.5, a bounded
value. The system is BIBO stable.
2.9.3 h(n) = u(n). The cumulative sum of the magnitude of the impulse response diverges.
The system is not BIBO stable.
2.9.4 h(n) = h(0)
P∞= 0, h(n) = n1 , n = 1, 2, . . ..
P ∞ 1 1 1
n=1 h(n) = n=1 n = 1 + 2 + 3 + · · · is a harmonic series, which is known to diverge. By
ratio test, the ratio of two consecutive terms
h(n) n
= →1
h(n + 1) n+1
as n → ∞, which has to be less than 1 for a stable series. Therefore, the system is unstable.
2.9.5 h(0) = 0, h(n) = n12 , n = 1, 2, . . ..
π2
P∞ P∞ 1 1 1
n=1 h(n) = n=1 n2 = 1 + 4 + 9 + · · · = 6 is absolutely convergent. Therefore, the
system is stable. This summation can be obtained using Fourier series.
2.10 The impulse response of a second-order system has been decomposed into those of the
two first-order systems and are given. The impulse responses of two systems connected in
parallel are
hp1(n) = 4(0.8n )u(n) and hp2(n) = (−3)(0.6n )u(n)
The impulse responses of two systems connected in cascade are
Find the impulse response of the single equivalent system from both the cascade and parallel
configuration impulse responses and verify that they are the same. List the first four values
of the impulse response of the single equivalent system.
The impulse response of the second-order system from the parallel configuration is
28
The impulse response of the second-order system from the cascade configuration is
The first four values of the impulse response of the single equivalent system, from either
expression is
1.0000, 1.4000, 1.4800, 1.4000
2.11 The impulse response of a second-order system has been decomposed into those of the
two first-order systems and are given. The impulse responses of two systems connected in
parallel are
Find the impulse response of the single equivalent system from both the cascade and parallel
configuration impulse responses and verify that they are the same. List the first four values
of the impulse response of the single equivalent system.
The impulse response of the second-order system from the parallel configuration is
The impulse response of the second-order system from the cascade configuration is
The first four values of the impulse response of the single equivalent system, from either
expression is
0, 1.0000, −1.2000, 1.0900
29
30
Chapter 3
3.1 Compute the DFT, X(k), of x(n) using the matrix form of the DFT. Find an expression
for x(n) in terms of its sinusoidal components. Compute the IDFT of X(k) to get back x(n).
Compute the least-squares error if x(n) is represented by the DC component only with the
values X(0), 0.8X(0) and 1.2X(0). Verify the values x(0) and x(2) from the DFT values
and X(0) and X(2) from the time-domain values using the sum and difference properties.
Find the energy and verify Parseval’ theorem.
3.1.1 x(n) = {4̂, 3, 2, 4}
X(0) 1 1 1 1 4 13
X(1) 1 −j −1 j
3 = 2 + j1
X(2) = 1 −1
1 −1 2 −1
X(3) 1 j −1 −j 4 2 − j1
Let us compute the IDFT of the spectrum.
x(0) 1 1 1 1 13 4
x(1) 1 1 j −1 −j 2 + j1 3
x(2) = 4
=
1 −1 1 −1 −1 2
x(3) 1 −j −1 j 2 − j1 4
2π 2π
x(n) = 3.2500 + 1.1180 cos( n + 0.4636) − 0.25 cos(2 n)
4 4
The energy is 45. The least squares error is
2π 2π
x(n) = 1.75 + 1.5 cos( n + 1.5708) + 1.25 cos(2 n)
4 4
31
The energy is 23. The least squares error is
(3 − 1.75)2 + (−1 − 1.75)2 + (3 − 1.75)2 + (2 − 1.75)2 = 10.75
(3 − 1.2(1.75))2 + (−1 − 1.2(1.75))2 + (3 − 1.2(1.75))2 + (2 − 1.2(1.75))2 = 11.24
Same with 0.8(1.75).
32
Let us compute the IDFT of the spectrum.
x(0) 1 1 1 1 5 2 + j3
x(1) 1 1 j −1 −j 4 + j1 2 − j2
x(2) = 4 1 −1 −3 + j10 = −1 + j2
1 −1
x(3) 1 −j −1 j 2 + j1 2 − j3
|((2 + j3) − p)|2 + |((2 − j2) − p)|2 + |((−1 + j2) − p)|2 + |((2 − j3) − p)|2 = 32.75
3.2 Find the samples of x(n) over one period and use the matrix form of the DFT to com-
pute the spectrum X(k) of the set of samples. Using X(k), find the exponential form of
x(n) and reduce the expression to real form. Verify that the input x(n) is obtained.
3.2.1 x(n) = 1 + 3 cos( 2π π
4 n + 6 ) + 2 cos(πn).
Samples of x(n) from index 0 are {5.5981, −2.5, 0.4019, 0.5}.
The DFT coefficients X(k) are {4, 5.1962 + j3, 8, 5.1962 − j3}.
* 3.2.2 x(n) = 1 − 2 sin( 2π π
4 n − 3 ) − 3 cos(πn).
Samples of x(n) from index 0 are {−0.2679, 3, −3.7321, 5}.
The DFT coefficients X(k) are {4, 3.4641 + j2, −12, 3.4641 − j2}.
3.2.3 x(n) = 1 − cos( 2π π
4 n − 4 ) + cos(πn).
Samples of x(n) from index 0 are {1.2929, −0.7071, 2.7071, 0.7071}.
The DFT coefficients X(k) are {4, −1.4142 + j1.4142, 4, −1.4142 − j1.4142}.
3.2.4 x(n) = 3 + sin( 2π π
4 n − 4 ) − cos(πn).
Samples of x(n) from index 0 are {1.2929, 4.7071, 2.7071, 3.2929}.
The DFT coefficients X(k) are {12, −1.4142 − j1.4142, −4, −1.4142 + j1.4142}.
3.2.5 x(n) = −1 − 2 cos( 2π π
4 n − 3 ) − 3 cos(πn).
Samples of x(n) from index 0 are {−5, 0.2679, −3, 3.7321}.
The DFT coefficients X(k) are {−4, −2 + j3.4641, −12, −2 − j3.4641}.
3.3 Find the circular convolution yc (n) of the sequences x(n) and h(n) using the DFT. Find
also the linear convolution yl (n) of the sequences x(n) and h(n) using the DFT by zero
padding the sequences. Verify yl (n) using the sum and and difference tests.
3.3.1 x(n) = {3̂, 1, 2, 4} and h(n) = {1̂, −1, 2, 3}
Zero padding x(n) and h(n), finding the DFTs, multiplying the two DFTs and taking IDFT,
we get
yl (n) = {3, −2, 7, 13, 3, 14, 12}
33
ˆ 2, −3}
3.3.2 x(n) = {3̂, 1, −2, 4} and h(n) = {1, −1,
3.3.3 x(n) = {2, 1, 2̂, 1} and h(n) = {1, −1, −2, 3̂}
The DFT of x(n) and h(n) are The DFT of x(n) and h(n) are
X(k) = {6, 0, 2, 0}
X([2, 1, 0, 0, 0, 2, 1]) =
{6, 2.8019 + j1.9499, −0.2470 − j0.8678, 1.4450 − j1.5637,
1.4450 + j1.5637, −0.2470 + j0.8678, 2.8019 − j1.9499}
H([3, 0, 0, 0, 1, −1, −2]) =
{1, 1.0746 − j2.1047, 4.9695 − j2.2978, 3.9559 + j0.8890,
3.9559 − j0.8890, 4.9695+, 2.2978, 1.0746 + j2.1047}
Multiplying the two DFTs and taking IDFT we get
34
Multiplying the two DFTs, taking IDFT , we get
ˆ
yc (n) = {6, 16, 3−13}
X([−3, 1, 2, 4, 0, 0, 0]) =
{4, −6.4254 − j4.4672, −2.5305 + j3.0202, −3.5441 − j2.7699,
−3.5441 + j2.7699, −2.5305 − j3.0202, −6.4254 + j4.4672}
H([3, 0, 0, 0, −1, −1, 2]) =
{3, 5.3705 + j0.1549, 2.8324 + j3.1656, 0.7971 + j0.6747,
0.7971 − j0.6747, 2.8324 − j3.1656, 5.3705 − j0.1549}
Multiplying the two DFTs and taking IDFT we get
ˆ 3, 14, 12}
yl (n) = {3, 2, −9, −13,
3.3.5 x(n) = {4, −1, 2, 4̂} and h(n) = {2, −1, 2, 3̂}
3.4 Find the circular correlation yxhc (n) of the sequences x(n) and h(n) using the DFT.
Find also the linear correlation yxhl (n) of the sequences x(n) and h(n) using the DFT by
zero padding the sequences. Verify yxhl (n) using the sum and and difference tests. Find the
autocorrelation of x(n). Compte the signal power and verify that the autocorrelation with
lag zero is the same.
3.4.1 x(n) = {3̂, 1, 2, 4} and h(n) = {1̂, −1, 2, 3}
35
Multiplying X(k) and H ∗ (k) and taking IDFT, we get
ˆ 16, 7, 9}
yxhc (n) = {18,
Zero padding x(n) and h(n), finding the DFTs, multiplying X(k) and H ∗ (k) and taking
IDFT, we get
ˆ 7, −2, 4}
yxhl (n) = {9, 9, 5, 18,
Adding the last 3 values to the first, second, and third values and placing after the fourth
value of yxhl (n), we get
yxhc (n) = {18, 16, 7, 9}
Autocorrelation, which is the IDFT of |X 2 |, is {30, 25, 20, 25}. Signal power is 30.
ˆ 2, −3}
3.4.2 x(n) = {3̂, 1, −2, 4} and h(n) = {1, −1,
The DFT of x({3, 1, −2, 4}) and h({−1, 2, −3, 1}) are
Autocorrelation, which is the IDFT of |X 2 |, is {30, 25, 20, 25}. Signal power is 30.
3.4.3 x(n) = {2, 1, 2̂, 1} and h(n) = {1, −1, −2, 3̂}
X(k) = {6, 0, 2, 0}
36
1.4450 + j1.5637, −0.2470 + j0.8678, 2.8019 − j1.9499}
HH(k) = DF T ({3, 0, 0, 0, 1, −1, −2}) =
{1, 1.0746 − j2.1047, 4.9695 − j2.2978, 3.9559 + j0.8890
3.9559 − j0.8890, 4.9695 + j2.2978i, 1.0746 + j2.1047}
Multiplying XX(k) and HH ∗ (k) and taking the IDFT, we get
Autocorrelation, which is the IDFT of |X 2 |, is {10, 8, 10, 8}. Signal power is 10.
The DFT of x({−3, 1, 2, 4}) and h({3, −1, −1, 2}) are
Autocorrelation, which is the IDFT of |X 2 |, is {30, −5, −4, −5}. Signal power is 30.
3.4.5 x(n) = {4, −1, 2, 4̂} and h(n) = {2, −1, 2, 3̂}
The DFT of x({4, 4, −1, 2}) and h({3, 2, −1, 2}) are
37
0.6845 − j5.5493, 6.9499 + j0.7436, 1.8656 − j2.3243}
HH(k) = DF T ({3, 0, 0, 0, 2, −1, 2}) =
{6, 2.6676 + j1.4565, 4.7029 + j0.8201, 0.1295 + j3.5995,
0.1295 − j3.5995, 4.7029 − j0.8201, 2.6676 − j1.4565}
Multiplying XX(k) and HH ∗ (k) and taking the IDFT, we get
ˆ 4, 0, 8, 12, 5, 0}
yxhl (n) = {25,
Autocorrelation, which is the IDFT of |X 2 |, is {37, 18, 8, 18}. Signal power is 37.
3.5 Two sequences x(n) and h(n) are given. Using the frequency-domain convolution prop-
erty, find the DFT Pxy (k) of their product y(n) = x(n)h(n). Verify that the IDFT of Pxy (k)
yields y(n).
3.5.1
x(n) = {1̂, −1, 2, 4}, h(n) = {4̂, 2, −1, 3}
3.5.2
x(n) = {1̂, −3, 2, 2}, h(n) = {4̂, −1, 3, 2}
3.5.3
x(n) = {2̂, 1, 2, 4}, h(n) = {3̂, 1, 2, 4}
3.5.1
The DFT of x(n) is
X(k) = {6, −1 + j5, 0, −1 − j5}
The DFT of h(n) is
H(k) = {8, 5 + j1, −2, 5 − j1}
Let us convolve the DFTs using DFT. The DFT of X(n) is
3.5.2
The DFT of x(n) is
X(k) = {2, −1 + j5, 4, −1 − j5}
The DFT of h(n) is
H(k) = {8, 1 + j3, 6, 1 − j3}
Let us convolve the DFTs using DFT. The DFT of X(n) is
38
The DFT of H(n) is
HH(k) = {16, 8, 12, −4}
Multiplying the last two DFTs and dividing by 4, we get
y(n) = {4, 3, 6, 4}
3.5.3
The DFT of x(n) is
X(k) = {9, j3, −1, −j3}
The DFT of h(n) is
H(k) = {10, 1 + j3, 0, 1 − j3}
Let us convolve the DFTs using DFT. The DFT of X(n) is
3.6 Find the even and odd components of the signal using the DFT and IDFT. Verify
that, for n = −3, −2, −1, 0, 1, 2, 3, the two components add up to the values of the signal.
Verify that the sum of the values of the odd component is zero and that those of the even
component and the signal are equal.
3.6.1 x(0) = 1, x(1) = 2, x(2) = −3, x(3) = 4 and x(n) = 0 otherwise.
Taking the 7-point DFT of zero-padded x(n), we get
39
Taking the IDFT of the imaginary part of Xz (k) multiplied by j, we get
we get
40
3.6.4 x(n) = n2 u(n)
3.7 Given x(n), find its DFT X(k). Now, find the DFT of X(k) to get N x(N − n) and,
hence verify the duality theorem of the DFT.
{2, 1, 4 + j2, −3} → {4 + j2, −2 − j6, 8 + j2, −2 + j2} → {8, −12, 16 + j8, 4}
3.8 Given the polar form of a sinusoid x(n), List the sample values x(n) of one cycle, start-
ing from n = 0, of the sinusoid. Take the DFT of the samples and find the the rectangular
form xr (n) of the sinusoid from the DFT coefficients. List the sample values xr (n) of one
cycle, starting from n = 0, of the sinusoid and verify that they are the same as those of x(n).
41
3.8.2 x(n) = 2 cos(2 2π π
8 n + 6 ).
The samples of x(n) are
3.9 Given the sinusoids x(n) and y(n), find the polar form of the sinusoid z(n) = x(n)+y(n)
using the DFT. Find the sample values of one cycle, starting from n = 0, of all the three
sinusoids and verify that the sample values of x(n) + y(n) are the same as those of z(n).
z(n) = 1 cos( 2π π
6 n + 3 ). The samples of the sinusoid x(n) are
42
3.9.2 x(n) = 3 cos( 2π π 2π π
6 n + 6 ), y(n) = 2 cos( 6 n − 3 ).
The DFT of x(n) is
3.10 Given the sequence x(n), find its DFT X(k). Make the odd-indexed coefficients of
X(k) zero to get the DFT XE(k) of the even half-wave symmetric component of x(n). Make
43
the even-indexed coefficients of X(k) zero to get the DFT XO(k) of the odd half-wave sym-
metric component of x(n). Take the IDFT of the last two DFTs to get the symmetric
components of x(n). Verify that the sum of the the sample values of the symmetric compo-
nents are the same as those of x(n).
XO(k) = {0, 5.1213 − 1.7071, 0, 0.8787 + j0.2929, 0, 0.8787 − j0.2929, 0, 5.1213 + j1.7071}
44
The IDFT of XE(k) is
3.11 The number of samples for the DFT computation is N = 8. The sampling frequency fs
is specified as 4 Hz. Find the frequencies in Hz of the real sinusoids that can be represented
correctly.
The frequency increment is fs /N = 4/8 = 0.5 Hz. The highest frequency that can be
represented is (fs /2) − (fs /N ) = 2 − 0.5 = 1.5 Hz. The set of frequencies are {0, 0.5, 1, 1.5}
Hz.
3.12 The number of samples for the DFT computation is N = 16. The sampling frequency
fs is specified as 16 Hz. Find the frequencies in Hz of the real sinusoids that can be
represented correctly.
The frequency increment is fs /N = 16/16 = 1 Hz. The highest frequency that can be
represented is (fs /2) − (fs /N ) = 8 − 1 = 7 Hz. The set of frequencies are {0, 1, 2, 3, 4, 5, 6, 7}
Hz.
45
46
Chapter 4
For N = 4, deduce the samples of X(ejω ) in polar form at ω = 0 and ω = π. From the
DTFT, deduce the samples of x(0).
(b) Using the time-domain shift theorem, deduce the DTFT of
1 for 0 ≤ n ≤ N
x(n) =
0 otherwise
For N = 4, deduce the samples of X(ejω ) in polar form at ω = 0 and ω = π. From the
DTFT, deduce the value of the sample x(0).
N
X (e−j(N +1)ω ) − (ej(N )ω ) sin( 2N2+1 ω)
X(ejω ) = (e−jω )n = =
(e−jω ) − 1 sin( ω2 )
n=−N
(ii)
N sin( N2+1 ω)
X(ejω ) = e−j 2 ω
sin( ω2 )
With N = 4, X(ej0 ) = 5 and X(ejπ ) = 1. x(0) = 1.
4.2 The samples over a period of a periodic sequence x(n) are given. Find its DTFT using
the DFT.
4.2.1 {x(0) = 1, x(1) = 1, x(2) = 2, x(3) = −3}.
47
2π 2π 2π 2π 2π 2π
X(ej2 4 ) = 5( )δ(ω − 2 ), X(ej3 4 ) = (−1 + j4)( )δ(ω − 3 )}
4 4 4 4
.
2π 2π 2π 2π
{X(ej0 ) = 8( )δ(ω), X(ej 4 ) = (−2 + j4)( )δ(ω − ),
4 4 4
2π 2π 2π 2π 2π 2π
X(ej2 4 ) = 4( )δ(ω − 2 ), X(ej3 4 ) = (−2 − j4)( )δ(ω − 3 )}
4 4 4 4
.
2π 2π 2π 2π
{X(ej0 ) = 3( )δ(ω), X(ej 4 ) = (j1)( )δ(ω − ),
4 4 4
2π 2π 2π 2π 2π 2π
X(ej2 4 ) = −11( )δ(ω − 2 ), X(ej3 4 ) = (−j1)( )δ(ω − 3 )}
4 4 4 4
.
4.3 Find the DFT, X(k), of x(n) with its only 4 nonzero values given. Find the samples of
the DTFT, X(ejω ), of x(n) at ω = {0, π2 , π, 3π
2 }. Verify that they are the same as those of
X(k).
at ω = 0, π2 , π, 3π
2 are also the same.
4.3.2. {x(n), n = 0, 1, 2, 3} = {1, 2, 3, 4} and x(n) = 0 otherwise.
The DFT of x(n) is
at ω = 0, π2 , π, 3π
2 are also the same.
48
4.3.3 {x(n), n = 0, 1, 2, 3} = {0, 0, 0, 1} and x(n) = 0 otherwise.
The DFT of x(n) is
{X(k), k = 0, 1, 2, 3} = {1, j1, −1, −j1}
The samples of X(ejω )
X(ejω ) = e−j3ω
at ω = 0, π2 , π, 3π
2 are also the same.
4.4 Find the convolution y(n) of x(n) and h(n), using the time-domain convolution property
of the DTFT. Find the first 4 values of y(n) by time-domain convolution and verify that
they are the same as those obtained using the DTFT.
1 0.9
= 10(πδ(ω) + −jω
) − 10
1−e 1 − 0.9e−jω
Taking the inverse DTFT, we get
49
4 3
= −jω
−
1 − 0.8e 1 − 0.6e−jω
Taking the inverse DTFT, we get
4.5 Using the frequency-domain convolution property, find the DTFT of the product of x(n)
and h(n) and then find the inverse of the DTFT to verify that it is the same as the product
of x(n) and h(n). Use the DFT to approximate the DTFT.
4.5.1. The nonzero samples of x(n) is {x(n), n = 0, 1, 2, 3} = {1, 2, 3, 4}. The nonzero
samples of h(n) is {x(n), n = 0, 1, 2, 3} = {3, −1, 2, 4}.
The DFT can be obtained by sampling at intervals of 2π/4. The periodic DTFT of h(n) is
Let us find the circular convolution of X(ejω ) and H(ejω ) using the DFT. The DFT of X(k)
is
XX(k) = {4, 16, 12, 8}
The DFT of H(k) is
HH(k) = {12, 16, 8, −4}
The product of the samples of X(ejω ) and H(ejω ) divided by 4 is
4.5.2. The nonzero samples of x(n) is {x(n), n = 0, 1, 2, 3, 4} = {3, 2, 1, 4, −2]}. The nonzero
samples of h(n) is {x(n), n = 0, 1, 2, 3, 4} = {1 − 1, 3, 4, −1}.
50
The DFT can be obtained by sampling at intervals of 2π/5. The periodic DTFT of h(n) is
Let us find the circular convolution of X(ejω ) and H(ejω ) using the DFT. The DFT of X(k)
is
XX(k) = {15, −10, 20, 5, 10}
The DFT of H(k) is
HH(k) = {5, −5, 20, 15, −5}
The product of X(k) and H(k) divided by 5 is
These are the spectral samples of the the DTFT of of x(n)h(n) at intervals of 2π/5. Taking
the IDFT of these samples, we get
51
where sgn(n) is
1 for n ≥ 0
sgn(n) =
−1 for n < 0
The samples of the components of s(n) are
{· · · , 0, 0, 1̂, 1, 1, 1, 1, 1, 1, 1, · · ·}
{· · · , 0, 0, 0, 1̂, 1, 0, 0, 1, 1, 1, 1, 1, · · ·}
1
X(ejω ) =
1 − (0.8)e−jω
and X(ej0 ) = 5. Therefore,
1
S(ejω ) = + 5πδ(ω)
(1 − 0.8e−jω )(1 − e−jω )
{1, 1.8, 2.44, 2.952, 3.3616, 3.6893, 3.9514, 4.1611, 4.3289, 4.4631, 4.5705}
1
X(ejω ) =
(1 − 0.7ejω )
and X(ej0 ) = 1/(1 − 0.7) = 3.3333. Therefore,
1 1
S(ejω ) = + 3.3333πδ(ω) = 3.3333(πδ(ω) + )
(1 − 0.7ejω )(1 − ejω ) (1 − ejω )
2.3333
−
(1 − 0.7ejω )
Taking the inverse DTFT, we get
{1, 1.7, 2.19, 2.533, 2.7731, 2.9412, 3.0588, 3.1412, 3.1988, 3.2392, 3.2674}
52
4.7 The difference equation governing a system is
7 1
y(n) = x(n) − x(n − 1) + x(n − 2) + y(n − 1) − y(n − 2)
6 3
with input x(n) and output y(n). Use the DTFT to find the impulse response h(n) of the
system. List the first four values of h(n).
1 − 1e−jω + 1e−j2ω
H(ejω ) =
(1 − 12 e−jω )(1 − 23 e−jω )
Expanding into partial fractions, we get
9 −jω 14 −jω
2e 3 e
H(ejω ) = 1 − +
(1 − 21 e−jω ) (1 − 23 e−jω )
1 + 2e−jω − e−j2ω
Y (ejω ) = H(ejω )X(ejω ) = + 24πδ(ω)
(1 − e−jω )(1 − 34 e−jω )(1 − 32 e−jω )
53
with input x(n) and output y(n). Use the DTFT to find the zero-state response y(n) of the
system with the input x(n) = ( 54 )n u(n). List the first four values of y(n).
4 4
Y (ejω ) = X(ejω )(1 − 2e−jω − e−j2ω ) + Y (ejω )( e−jω − e−j2ω )
3 9
Solving for Y (ejω ) and factoring, we get, with X(ejω ) = (1− 41e−jω ) ,
5
−jω
1 − 2e − e−j2ω
Y (ejω ) = H(ejω )X(ejω ) = 4 −jω
(1 − 5 e )(1 − 23 e−jω )2
Expanding into partial fractions, we get
−110.25 14.1667 111.25
Y (ejω ) = 4 −jω + 2 −jω 2 +
(1 − 5 e ) (1 − 3 e ) (1 − 23 e−jω )
Taking the inverse DTFT, we get the zero-state response.
n n n
4 2 2
y(n) = (−110.25) + n(14.1667) + (111.25) , n = 0, 1, . . .
5 3 3
The first four values of the sequence y(n) are
{y(0) = 1, y(1) = 0.1333, y(2) = −2.2267, y(3) = −4.5961}
4.10 Use the DFT and IDFT to construct an analytic signal with one-sided spectrum.
4.10.1 {x(n), n = 0, 1, 2, 3} = {2, 1, 3, 4}
Taking the DFT of x(n), we get
X(k) = {10, −1 + j3, 0, −1 − j3}
Multiplying X(k) with {0, −j, 0, j}, we get
XH (k) = {0, 3 + j1, 0, 3 − j1}
Taking the IDFT of XH (k) ,we get
xH (n) = {1.5, −0.5000 − 1.5000, 0.5}
The analytic signal is
xa (n) = x(n) + jxH (n) = {2 + j1.5, 1 − j0.5, 3 − j1.5, 4 + j0.5}
The DFT of xa (n) is
XH (k) = {10, −2 + j6, 0, 0}
a one-sided spectrum.
54
Chapter 5
from the definition. (a) raw, (b) biased, (c) unbiased and (d) normalized.
55
Now, the value at lag 0 appears in the middle.
These values clearly indicate that a sinusoidal component with frequency 1 is buried in the
random input sequence.
5.5 The samples of the input signal are
Assume Hamming window is used. Estimate the PSD using the Blackman-Tukey method.
56
With 8 samples, the biased autocorrelation is computed using the expression
7
1 X
rxx (τ ) = x(k)x(k + τ )
8
k=−7
{6, 5, 6, 30, 6, 5, 6}
with the middle value corresponding to rx (0). Substituting these values in the matrix
equation, we get
30 6 a(1) 6
=−
6 30 a(2) 5
Solving, we get a(1) = −0.1736 and a(2) = −0.1319.
57
The minimum modeling error for the all-pole model is
N
X
|b(0)|2 = σ 2 = rx (0) + a(k)rx∗ (k)
k=1
5.7
Let the data sequence be {2, −1, 4, 3}. Let the order of the all-pole (autoregressive) signal
modeling be 3. Determine the coefficients of the all-pole model using the autocorrelation
method.
{6, 5, 6, 30, 6, 5, 6}
with th middle value corresponding to rx (0). Substituting these values in the matrix equa-
tion, we get
30 6 5 a(1) 6
6 30 6 a(2) = − 5
5 6 30 a(3) 6
Solving, we get a(1) = −0.1534, a(2) = −0.1053 and a(3) = −0.1534. The minimum
modeling error for the all-pole model is, for the example,
5.8
Let the data sequence be {2, −1, 4, 3}. Let the order of the all-pole (autoregressive) signal
modeling be 2. Determine the coefficients of the all-pole model using the covariance method.
58
Solving, we get a(1) = 0.1538, a(2) = −1.6154 and a(3) = −0.6154.
The minimum modeling error for the all-pole model is, for the example,
5.10
Let the data sequence be {1, 3, −1, 4}. Let the order of the all-pole (autoregressive) signal
modeling be 2. Determine the coefficients of the all-pole model using the modified covariance
method.
The matrix equation is
20 −7 a(1) −7
=−
−7 27 a(2) 22
Solving, we get a(1) = 0.0713 and a(2) = −0.7963.
The minimum modeling error for the all-pole model is
p
X
|b(0)|2 = rx (0, 0) + a(k)rx∗ (0, k)
k=1
5.11
Let the data sequence be {1, 2, −1, 4, −1, 6}. Let the order of the all-pole (autoregressive)
signal modeling be 3. Determine the coefficients of the all-pole model using the modified
covariance method.
The minimum modeling error for the all-pole model is, for the example,
5.12
Let the samples be
{2.0538, 0.1834, −2.2259, 0.0862}
and p = 2. Estimate the PSD using MUSIC method.
The average of these values is 0.0244. Subtracting the average value from the samples,
we get
{2.0294, 0.1590, −2.2503, 0.0618}
The number of values is N = 4. After subtracting the average value, we are finding the
autocorrelation values. Multiplying these values term-by-term, summing and dividing by
59
N − 1 = 3, we get the first entry in the covariance matrix R. The covariance matrix of the
samples is
3.0704 −0.0581 −1.5189 0.0418
−0.0581 3.0704 −0.0581 −1.5189
R= −1.5189 −0.0581
3.0704 −0.0581
0.0418 −1.5189 −0.0581 3.0704
Now, we have to determine the eigenvalues and the corresponding eigenvectors of the
covariance matrix R. The eigenvalues are
1.4844 0 0 0
0 1.6168 0 0
d=
0 0 4.5402 0
0 0 0 4.6401
The absolute values of the DFT of the first two eigenvectors (the first two column values)
are computed and added. Taking the 20 log10 (.) of these values, we get
60
Chapter 6
and zero otherwise. Find the unilateral z-transform of the versions of x(n).
6.1.1. x(n).
6.1.2. 2x(n − 1).
6.1.3. x(−n).
6.1.4. 3x(n + 1).
6.1.5. −2x(n + 3).
6.1.1. X(z) = −1 − 2z −2 .
6.1.2. X(z) = 2(−1z −1 − 2z −3 ).
6.1.3. X(z) = −1 + 3z −3 .
6.1.4. X(z) = −6z −1 .
6.1.5. X(z) = 0.
6.2 Find the nonzero values of the inverse of the given unilateral z-transform.
6.2.1. X(z) = 1 + 2z −1 + 4z −2 .
6.2.2. X(z) = 2 + z −3 − z −5 .
6.2.3. X(z) = z −7 + 2z −9 .
6.2.4. X(z) = 2(1 + z −3 + 2z −5 ).
6.2.5. X(z) = −z −1 − z −4 .
61
6.3.1.
X(z) = 1 + 2z −1 − 4z −2 and H(z) = 3 + 2z −1 }
X(z)H(z) = 3 + 8z −1 − 8z −2 − 8z −3
The inverse of X(z)H(z) is
y(n) = {3̂, 8, −8, −8}
6.3.2.
X(z) = z −1 + 3z −3 and H(z) = −3z −2 + 2z −4 }
X(z)H(z) = 0 + 0z −1 + 0z −2 − 3z −3 + 0z −4 − 7z −5 + 0z −6 + 6z −7
The inverse of X(z)H(z) is
6.3.3.
X(z) = z −2 − 3z −3 and H(z) = 3z −1 + 2z −2 }
X(z)H(z) = 0 + 0z −1 + 0z −2 + 3z −3 − 7z −4 − 6z −5
The inverse of X(z)H(z) is
y(n) = {0̂, 0, 0, 3, −7, −6}
6.3.4.
X(z) = 2 − z −4 and H(z) = −2z −1 + 2z −3 }
X(z)H(z) = 0 − 4z −1 + 0z −2 + 4z −3 + 0z −4 + 2z −5 + 0z −6 − 2z −7
The inverse of X(z)H(z) is
6.3.5.
X(z) = −2z −1 − z −3 and H(z) = 3z −2 + z −3
X(z)H(z) = −6z −3 − 2z −4 − 3z −5 − 1z −6
The inverse of X(z)H(z) is
6.4
6.4.1. Use the multiplication by n property to find the z-transform of x(n). Verify that the
inverse of the resulting transform gets back the given signal.
6.4.1. x(n) = nδ(n − 4)u(n).
6.4.2. x(n) = n(−0.8)n u(n).
6.4.3. x(n) = nu(n − 1).
6.4.1.
d 1
X(z) = −z = 4(z)−4
dz (z 4 )
6.4.2.
d z −0.8z
X(z) = −z =
dz (z + 0.8) (z + 0.8)2
6.4.3.
d 1 z
X(z) = −z =
dz (z − 1) (z − 1)2
62
6.5 Given the samples x0 (n) of the first period of the semi-periodic signal x(n), find its
z-transform X(z).
6.5.1.
ˆ
x0 (n) = {0.5000, −0.8660, −0.5000, 0.8660}
0.5z 3 − 0.866z 2 − 0.5z + 0.866
X0 (z) =
z3
4
z
X(z) = 4
X0 (z), |z| > 1
z −1
z3 0.5z 3 − 0.866z 2 − 0.5z + 0.866
X(z) 0.2500 + j0.4330 0.2500 − j0.4330
= = + , |z| > 1
z z4 − 1 z 3 z−j z+j
Taking the inverse, we get
2π ˆ −0.8660, −0.5000, 0.8660, . . .}
x(n)u(n) = cos( n + (1.0472)) = {0.5,
4
6.5.2.
x0 (n) = {1̂, 2, 1}
z 2 + 2z + 1
X0 (z) =
z2
3
z
X(z) = X0 (z), |z| > 1
z3 − 1
z2 z 2 + 2z + 1
X(z) 1.3333 −0.1667 + j0.2887 −0.1667 − j0.2887
= 3
= + + , |z| > 1
z z −1 z2 (z − 1) z + (0.5000 + j0.866) z + (0.5000 − j0.866)
Taking the inverse, we get
2π
x(n)u(n) = 1.3333 + (2)0.3334 cos( n − (2.0944)) = {1̂, 2, 1, . . .}
3
6.5.3.
x0 (n) = {3̂, 2}
3z + 2
X0 (z) =
z
z2
X(z) = X0 (z), |z| > 1
z2 − 1
X(z) z 3z + 2 0.25 0.5
= 2
= + , |z| > 1
z z −1 z (z − 1) (z + 1)
Taking the inverse, we get
6.6 The difference equation of a causal discrete system is given. Using the z-transform,
find a closed-form expression for the time-domain response y(n). Assume that the system
is initially relaxed and the input is the unit-impulse, x(n) = δ(n). Verify that the first 4
values of the response of the system obtained using the expression for y(n) and by iterating
the difference equation are the same.
6.6.1
y(n) = x(n) − 2y(n − 1) − y(n − 2) + 2y(n − 3)
63
The required partial fraction is
(0.0924)z 0.4538 + j0.4087z 0.4538 − j0.4087z
Y (z) = + +
(z − 0.6956) (z − (−1.3478 + j1.0289)) (z − (−1.3478 − j1.0289)
Finding the inverse z-transform of each term, we get the inverse of Y (z),
6.6.2
y(n) = x(n) + 2y(n − 1) + y(n − 2) − 2y(n − 3)
Taking the z-transform of both sides, we get, with zero initial conditions,
Y (z) A B C
= + +
z (z − 1) (z + 1) (z − 2)
The required partial fraction is
(−0.5)z 0.1667z 1.3333z
Y (z) = + +
(z − 1) (z + 1) (z − 2)
Finding the inverse z-transform of each term, we get the inverse of Y (z),
n n n
y(n) = ((−0.5) (1) + 0.1667 (−1) + 1.3333 (2) ) u(n)
6.6.3
y(n) = x(n) + x(n − 1) − x(n − 2) + 2y(n − 1) + y(n − 2) − 2y(n − 3)
Taking the z-transform of both sides, we get, with zero initial conditions,
Y (z) A B C
= + +
z (z − 1) (z + 1) (z − 2)
The required partial fraction is
(−0.5)z −0.1667z 1.6667z
Y (z) = + + +
(z − 1) (z + 1) (z − 2)
Finding the inverse z-transform of each term, we get the inverse of Y (z),
n n n
y(n) = ((−0.5) (1) − 0.1667 (−1) + 1.6667 (2) ) u(n)
6.6.4
y(n) = x(n) + 5y(n − 1) − 8y(n − 2) + 4y(n − 3)
64
Taking the z-transform of both sides, we get, with zero initial conditions,
Y (z) A B C
= + +
z (z − 1) (z − 2)2 (z − 2)
(1)z 4z 0z
Y (z) = + +
(z − 1) (z + 1)2 (z − 2)
Finding the inverse z-transform of each term, we get the inverse of Y (z),
n n−1
y(n) = (1) (1) + 4n (2) u(n)
3 9
y(n) = 2x(n) − x(n − 1) + x(n − 2) + y(n − 1) − y(n − 2)
2 16
Using the z-transform, find the complete response of the system for the input x(n) = u(n),
the unit-step function. The initial conditions are y(−1) = 1 and y(−2) = 2. List the first
four values of the complete response of the system. Verify your answer by finding the first
few values of the response by iterating the difference equation. Verify that the zero-input
response satisfies the initial conditions. Verify that the total response in the z-transform
domain satisfies the initial and final value theorems.
z 1 1
x(n) ↔ , x(n − 1) ↔ , x(n − 2) ↔
z−1 z−1 z(z − 1)
y(n) ↔ Y (z), y(n − 1) ↔ y(−1) + z −1 Y (z) = z −1 Y (z) + 1
y(n − 2) ↔ y(−2) + z −1 y(−1) + z −2 Y (z) = z −2 Y (z) + z −1 + 2
Substituting the corresponding transform for each term in the difference equation, factoring
and simplifying, we get
The first and second group of terms on the right-hand side corresponds, respectively, to the
zero-state response and zero-input response. The corresponding partial-fraction expansion
is
Y (z) 32 30 5.5 0.375 0.2813
= − − − −
z (z − 1) (z − 43 ) (z − 43 ) (z − 34 ) (z − 43 )2
The inverse z-transform yields the complete response.
n (n−1) ! n n−1 !
3 3 3 3
y(n) = 32 − 30 − 5.5n + 0.375 − 0.2813n , n = 0, 1, . . .
4 4 4 4
65
The first four values of y(n) are
Substituting the corresponding transform for each term in the difference equation, factoring
and simplifying, we get
Y (z) z 2 − 2z + 1 (−(1/6)z)
= +
z (z − 0.8)(z − 13 )(z − 21 ) (z − 13 )(z − 12 )
The first and second group of terms on the right-hand side corresponds, respectively, to the
zero-state response and zero-input response. The corresponding partial-fraction expansion
is
Y (z) 0.2857 5 5.7143 0.5 0.3333
= − + − +
z (z − 0.8) (z − 12 ) (z − 13 ) (z − 12 ) (z − 13 )
The inverse z-transform yields the complete response.
n (n) ! n n
n 1 1 1 1
y(n) = 0.2857(0.8) − 5 + 5.7143 + −0.5 + 0.3333 , n = 0, 1, . . .
2 3 2 3
66
the initial conditions. Verify that the total response in the z-transform domain satisfies the
initial and final value theorems.
π
ej 3 z(z − 2) (3) 56
Y (z) = +
z − 65
2π
(z − 56 )(z − ej 8 )
jπ (3) 56
Y (z) e (z − 2)
3
= +
(z − 56 )(z − ej 8 ) z − 56
2π
z
5
Y (z) −0.7420 + j1.9127 1.2420 − j1.0467 2
= + 5 +
(z − 65 )
2π
z (z − ej 8 ) (z − 6 )
n n
j 2π n 5 5 5
y(n) = (−0.7420 + j1.9127)(e ) + (1.2420 − j1.0467)
8 + , n = 0, 1, . . .
6 2 6
Using the z-transform, find the complete response of the system for the input x(n) =
0.8n u(n). The initial conditions are y(−1) = 2 and y(−2) = 1. List the first four values of
the complete response of the system. Verify your answer by finding the first few values of the
response by iterating the difference equation. Verify that the zero-input response satisfies
the initial conditions. Verify that the total response in the z-transform domain satisfies the
initial and final value theorems.
Taking the z-transform of both sides, the partial fraction form is zero initial conditions
2
Y (z) 2z − 2z + 1 A B C D E
= = + + + +
z (z − 0.8)3 (z − 0.8)3 (z − 0.8)2 (z − 0.8) (z − 0.8)2 (z − 0.8)
Example 6.11 Find the z-transform Y (z) of the difference equation of a causal discrete
system
y(n) = x(n) + x(n − 1) + 0.9y(n − 1), n = 0, 1, . . .
Find the inverse z-transform of Y (z) getting a closed-form expression for the time-domain
response y(n). Assume that the system is initially relaxed and the nonzero samples of the
input are x(0) = 1, x(1) = 3. Verify that the first 4 values of the response of the system
obtained using the expression for y(n) and by iterating the given difference equation are the
67
same.
Solution
Taking the z-transform of the difference equation and including the respective inputs, we
get
z(z + 1)(z + 3)
Y (z) = H(z)X(z) =
z 2 (z − 0.9)
=
Y (z) A B C
= + 2+
z z z z − 0.9
The inverse z-transform is
68
Chapter 7
7.1 The passband and stopband edge frequencies of a lowpass filter are specified, respec-
tively, as ωc = 0.3π radians and ωs = 0.4π radians, respectively. The minimum attenuation
required in the stopband is 18 dB. Design the lowpass filter using the rectangular window.
The sampling frequency is fs = 1024 Hz.
Solution
Now, we find the order of the filter as
2π
N ≥ 0.9 = 18
0.4π − 0.3π
The cutoff frequency of the corresponding ideal filter is computed as
ωs + ωc 0.3π + 0.4π
ωci = = = 0.35π
2 2
The shifted impulse response of the filter is given by
sin(ωci ( N2 − n)) sin(0.35π(9 − n))
h(n) = N
= , n = 0, 1, . . . , 18
π( 2 − n) π(9 − n)
The shifted impulse response values, with a precision of four digits after the decimal point,
are
{hs (n), n = 0, 1, . . . , 18} =
{−0.0161, 0.0234, 0.0449, 0.0164, −0.0450, −0.0757, −0.0166, 0.1288, 0.2836,
0.3500, 0.2836, 0.1288, −0.0166, −0.0757, −0.0450, 0.0164, 0.0449,
0.0234, −0.0161}
7.2 The passband and stopband edge frequencies of a highpass filter are specified, respec-
tively, as ωc = 0.7π radians and ωs = 0.4π radians, respectively. The minimum attenuation
required in the stopband is 40 dB. Design the highpass filter using the Hamming window.
The sampling frequency is fs = 1024 Hz.
Solution
The approximate average slope of the transition band of the Hamming window provides is
given as 3.3 2π
N . Now, we find the order of the filter as
2π
N ≥ 3.3 = 22
0.7π − 0.4π
The cutoff frequency of the corresponding ideal filter is computed as
ωs + ωc 0.4π + 0.7π
ωci = = = 0.55π
2 2
The shifted impulse response of the lowpass filter is given by
sin(ωci ( N2 − n)) sin(0.55π(11 − n))
h′ (n) = = , n = 0, 1, . . . , 22
π( N2 − n) π(11 − n)
69
The values, for this example, are
If the cutoff frequency is π, then the frequency response is 1 from −π to π with its inverse
DTFT δ(n). That is,
hhp (n) = δ(n) − h′s (n)
The shifted impulse response values, with a precision of four digits after the decimal
point, of the highpass filter are
70
7.3 The passband and stopband edge frequencies of a lowpass filter are specified, respec-
tively, as ωc = 0.3π radians and ωs = 0.54π radians, respectively. The minimum attenuation
required in the stopband is 41 dB. Design the lowpass filter using the Kaiser window. The
sampling frequency is fs = 1024 Hz.
Solution
The ripple size in the stopband is found as
δ = 10−0.05(41) = 0.0089
kaiw (n) = {0.1340, 0.2202, 0.3192, 0.4273, 0.5394, 0.6503, 0.7541, 0.8453, 0.9187,
The shifted impulse response values, with a precision of four digits after the decimal point,
are
{hs (n), n = 0, 1, . . . , 21} = {0.0291, −0.0011, −0.0365, −0.0193, 0.0367, 0.0479, −0.0240,
−0.0905, −0.0199, 0.1948, 0.3902, 0.3902, 0.1948, −0.0199,
−0.0905, −0.0240, 0.0479, 0.0367, −0.0193, −0.0365, −0.0011, 0.0291}
Mjultiplying with the window coefficients kaiw (n), we get the shifted and windowed impulse
response values
{hsw (n), n = 0, 1, . . . , 21} = {0.0039, −0.0002, −0.0117, −0.0082, 0.0198, 0.0311, −0.0181,
−0.0765, −0.0183, 0.1889, 0.3889, 0.3889, 0.1889, −0.0183, −0.0765
−0.0181, 0.0311, 0.0198, −0.0082, −0.0117, −0.0002, 0.0039}
7.4 The lower passband and stopband edge frequencies of a bandpass filter are 0.3π and
0.1π, respectively. The upper passband and stopband edge frequencies of the bandpass
filter are 0.5π and 0.7π, respectively. The minimum attenuation required in the stopband
is As = 48 dB. The maximum deviation acceptable in the passband is Ac = 0.1 dB. Design
the bandpass filter using the Kaiser window. The sampling frequency is fs = 512 Hz.
Solution
With Ac = 0.1 dB and As = 48 dB, compute
100.05Ac − 1
δc = = 0.0058,
100.05Ac + 1
71
δs = 10−0.05As = 0.0040
With A = 48, the window shape parameter b is computed as
With the sharper transition band 0.2π, the order of the filter, N , is given as
(A − 7.95) 2π
B= = 2.5801 and N ≥ B = 27.89 ≈ 28
14.36 0.3π − 0.1π
With the order of the filter N and the parameter b known, we get the coefficients of the
window as
With one-half of the shorter transition band 0.5(0.3 − 0.1)π = 0.1π, the cutoff frequencies
of the ideal lowpass filters are computed as
h(n) = {0.0083, −0.0377, −0.0408, 0.0105, −0.0000, −0.0128, 0.0612, 0.0700, −0.0193,
7.5 The lower passband and stopband edge frequencies of a bandstop filter are 0.1π and
0.4π, respectively. The upper passband and stopband edge frequencies of the bandstop
filter are 0.8π and 0.5π, respectively. The minimum attenuation required in the stopband
is As = 35 dB. The maximum deviation acceptable in the passband is Ac = 0.2 dB. Design
the bandstop filter using the Hamming window. The sampling frequency is fs = 512 Hz.
Solution
With the sharper transition band 0.3π, the order of the filter, N , is given as
2π
N ≥ 3.3 = 22
0.4π − 0.1π
72
With N = 22, the Hamming window coefficients are
hammingw (n) =
{0.0800, 0.0986, 0.1530, 0.2388, 0.3489, 0.4745, 0.6055, 0.7311, 0.8412,
0.9270, 0.9814, 1, 0.9814, 0.9270, 0.8412, 0.7311, 0.6055, 0.4745,
0.3489, 0.2388, 0.1530, 0.0986, 0.0800}
With one-half of the shorter transition band 0.5(0.4 − 0.1)π = 0.15π, the cutoff frequencies
of the ideal lowpass filters are computed as
(0.15 − 0.65)π
h(N B2) = 1 + = 0.5
π
sin(0.15π(11 − n)) sin(0.65π(11 − n))
h(n) = − otherwise
π(11 − n) π(11 − n)
The impulse response of the, before multiplying by the window, filter is given by
7.6 Find the impulse response of the 22-th order Type III Hilbert transformer using the
window FIR filter design method. Use the Hamming window. The sampling frequency is
fs = 512 Hz.
Solution
From the impulse response of the ideal Hilbert transformer is given in an earlier chapter,
the shifted version of the impulse response for a finite order N filter is obtained as
( π(N B2−n)
2 sin2 ( )
h(n) = π(N B2−n)
2
for n 6= N B2, 0 ≤ n ≤ N
0 for n = N B2
The 23 shifted and windowed impulse response values, with a precision of four digits after
the decimal point, of the Hilbert filter are
7.7 Find the impulse response of the 20-th order Type III differentiating filter using the
window FIR filter design method. Use the Hamming window. The sampling frequency is
73
fs = 512 Hz.
Solution
From the impulse response of the ideal differentiating filter is given in an earlier chapter,
the shifted version of the impulse response for a finite order N filter is obtained as
(
(−1)(n−10)
h(n) = n−10 for n 6= N B2, 0 ≤ n ≤ N
0 for n = N B2
The 21 shifted and widowed impulse response values, with a precision of four digits after
the decimal point, of the differentiator are
7.8 A Type I 22-th order optimal equiripple linear-phase lowpass filter with the passband
and stopband edge frequencies, respectively, ωp = 0.25π and ωs = 0.4π radians is required.
The size of the ripple δs in the stopband is to be 3 times that in the passband δp . The
sampling frequency is fs = 512 Hz. Design the filter.
The 23 impulse response values, with a precision of four digits after the decimal point, are
7.9 A Type I 20-th order optimal linear-phase highpass filter with the passband and stop-
band edge frequencies, respectively, ωp = 0.4π and ωs = 0.25π radians is required. The size
of the ripple δs in the stopband is to be 4 times that in the passband δp . The sampling
frequency is fs = 512 Hz. Design the filter.
The 21 impulse response values, with a precision of four digits after the decimal point, are
7.10 A Type II 19-th order optimal linear-phase lowpass filter with the passband and
stopband edge frequencies are 0.34π and 0.39π radians, respectively, is required. The size of
the ripple in the stopband is to be 3/2 times that of the passband. The sampling frequency
is fs = 512 Hz. Design the filter.
The 20 impulse response values, with a precision of four digits after the decimal point, are
0.3451, 0.3451, 0.2118, 0.0297, −0.0626, −0.0737, 0.0169, 0.0197, 0.0706, −0.0537, −0.0711}
δp = 0.1345 and δs = 0.2018
74
7.11 The six edge frequencies of a 18th order linear-phase Type I bandstop filter in radians
are
{0, 0.1π, 0.2π, 0.8π, 0.9π, π}
The ripple ratio in the stopband is to be 3 times that in the passband. Find the impulse
response of the filter using the optimum FIR filter design method. The sampling frequency
is fs = 512 Hz. The 19 impulse response values, with a precision of four digits after the
decimal point, are
0.3189, 0.0000, 0.2666, 0.0000, 0.1451, 0.0000, 0.0315, 0.0000, −0.0805, −0.0000}
δp = 0.0493 and δs = 0.1480
7.12 The six edge frequencies of a 23th order linear-phase Type II bandpass filter in radians
are
{0, 0.1π, 0.2π, 0.8π, 0.9π, π}
The ripple ratio in the stopband is to be 4 times that in the passband. Find the impulse
response of the filter using the optimum FIR filter design method. The sampling frequency
is fs = 512 Hz.
The 24 impulse response values, with a precision of four digits after the decimal point, are
7.13 The cutoff frequencies of the two edges of the passband of a 20th order Type III Hilbert
transformer filter are 0.2π and 0.8π radians, respectively. Find the impulse response of the
filter using the optimum FIR filter design method. The sampling frequency is fs = 512 Hz.
The 21 impulse response values, with a precision of four digits after the decimal point, are
7.14 The cutoff frequencies of the the passband and stopband of a 19th order Type IV
differentiating filter filter are 0.6π and 0.7π radians, respectively. The magnitude of the
frequency response is to be 1 at the passband edge frequency. The ripple ratio in the
stopband is to be 4 times that in the passband. Find the impulse response of the filter using
the optimum FIR filter design method. The sampling frequency is fs = 512 Hz.
The 20 impulse response values, with a precision of four digits after the decimal point, are
{−0.0047, −0.0236, 0.0572, −0.0369, −0.0201, 0.0717, −0.0480, −0.0798, 0.2333, 0.2192,
−0.2192, −0.2333, 0.0798, 0.0480, −0.0717, 0.0201, 0.0369, −0.0572, 0.0236, 0.0047}
δp = 0.0335 and δs = 0.1340
75
76
Chapter 8
8.1 Design a lowpass digital filter with Butterworth response. The passband and stopband
edge frequencies of the digital filter are fdc = 41 Hz and fds = 81 Hz, respectively. The
maximum passband attenuation is Ac = 3 dB and the minimum stopband attenuation is
As = 10 dB. Let te stopband attenuation be better than the specification. The sampling
frequency is fs = 512 Hz.
Step 1: Prewarp the frequencies.
In the analog frequency domain, the prewarped edge frequencies, which are slightly higher
than the specified ones, correspond to
πfdc π41
ωac = (2fs ) tan = 2(512) tan = 263.1864 rad/sec
fs 512
πfds π81
ωas = (2fs ) tan = 2(512) tan = 555.4444 rad/sec
fs 512
Step 2: The order of the required filter is found as
0.1A 0.1(10)
s −1
log10 10
100.1Ac −1
log10 10 −1
100.1(3) −1
N≥ = = 1.4741
2 log10 ( ωωsc ) 2 log10 ( 555.4444
263.1864 )
To make the filter order an integer, we find the nearest integer greater than or equal to
1.4741 to be N = 2.
Step 3: Find the factored form of the second order normalized analog lowpass Butterworth
filter transfer function.
The transfer function is given in Table 8.1 as
1
H(s) =
(s2 + 1.41421s + 1)
Step 4: Find the analog frequency transformation from the normalized frequency to the
desired frequency.
The lowpass to lowpass analog frequency transformation is s = ωl s/ωd , where ωl and ωd
are, respectively, the reference frequency of the normalized filter and the desired frequency.
The normalized reference frequency ωl has to be computed. As the estimated filter order
N is usually a real value, it is rounded to the nearest higher integer. Due to this, the filter
performance becomes better at the edge frequencies. Using N = 2, we get the reference
frequency as
ωl = (100.1Ac − 1)1/(2N ) = (100.1(3) − 1)1/(2(2)) = 0.9988
The frequency transformation is given by
s = 0.0.9988s/263.1864 = s/263.4991
77
can be combined with the bilinear transformation as
2fs (z − 1) (z − 1) (z − 1)
s= = 3.8862 =k
263.4991 (z + 1) (z + 1) (z + 1)
Then, using the formulas given earlier, for the second-order section
a2 z 2 + a1 z + a0
H(z) = ,
z 2 + b 1 z + b0
we get, with k = 3.8862,
1 2 1 2(1 − k 2 ) (1 − d1 k + k 2 )
a2 = , a 1 = , a 0 = , b1 = , b0 = ,
D D D D D
where D = (1 + d1 k + k 2 ).
The transfer function of the lowpass digital filter H(z) is obtained as
0.0463(z 2 + 2z + 1)
H(z) =
(z 2 − 1.3059z + 0.4911)
8.2 Design a highpass digital filter with Chebyshev response. The passband and stopband
edge frequencies of the digital filter are fdc = 60 Hz and fds = 30 Hz, respectively. The
maximum passband attenuation is Ac = 1 dB and the minimum stopband attenuation is
As = 11 dB. The sampling frequency is fs = 512 Hz.
Step 1: Prewarp the frequencies
In the analog frequency domain, the edge frequencies correspond to
πfdc π60
ωac = (2fs ) tan = 2(512) tan = 395.0004 rad/sec
fs 512
πfds π30
ωas = (2fs ) tan = 2(512) tan = 190.6538 rad/sec
fs 512
Now, we design an analog lowpass filter with ωc = ωas and ωs = ωac .
Step 2: The order of the required filter is found as
q q
100.1As −1 100.1(11) −1
cosh−1 10 0.1A c −1
cosh −1
10 0.1(1) −1
N≥ = = 1.9066
cosh−1 ( ωωsc ) cosh−1 ( 395.0004
190.6538 )
To make the filter order an integer, we find the nearest integer greater than or equal to
1.9066 to be N = 2.
Step 3: Find the factored form of the fifth order normalized analog lowpass Chebyshev
filter transfer function.
The transfer function is given in Table 8.3 as
0.9826
H(s) =
(s2 + 1.0977s + 1.1025)
Step 4: Find the analog frequency transformation from the normalized frequency to the
desired frequency.
The lowpass to highpass analog frequency transformation is s = (ωl ωd )/s, where ωl and ωd
are, respectively, the reference frequency of the normalized filter and the desired frequency.
With ωl = 1 and ωd = 395.0004, the transformation is s = (395.0004/s).
Step 5: Find the factored form of the fifth order highpass digital filter function.
This transformation
s = (395.0004/s)
78
can be combined with the bilinear transformation as
395.0004 (z + 1) (z + 1) (z + 1)
s= = 0.3857 =k
2fs (z − 1) (z − 1) (z − 1)
Then, using the formulas given earlier, for the second-order section
a2 z 2 + a1 z + a0
H(z) = ,
z 2 + b 1 z + b0
we get, with k = 0.3857,
1 2 1 −2(d0 − k 2 ) (d0 − d1 k + k 2 )
a2 = , a 1 = − , a 0 = , b1 = , b0 = ,
D D D D D
where D = (d0 + d1 k + k 2 ).
The transfer function of the Chebyshev highpass digital filter H(z) is obtained as
0.5867(z 2 − 2z + 1)
H(z) =
(z 2 − 1.1389z + 0.4943)
8.3 Design a bandpass digital filter with Butterworth response. The cutoff and stopband
edge frequencies of the filter are fdc1 = 800, fdc2 = 1700 Hz and fds1 = 300, fds2 = 2700
Hz, respectively. The maximum attenuation in the passband is Ac = 3 dB. The minimum
attenuation in the stopband attenuation is As = 11 dB. Let te stopband attenuation be bet-
ter than the specification. Design the bandpass digital filter using the analog Butterworth
filter. The sampling frequency is fs = 8192 Hz.
79
To make the filter order an integer, we find the nearest integer greater than or equal to
0.9900 to be N = 1.
Step 3: Find the factored form of the third order normalized analog lowpass Butter filter
transfer function.
The transfer function is given in Table 8.1 as
1
H(s) =
(s + 1)
The factored form of the second order denormalized Butterworth analog bandpass filter
s
transfer function, in terms of sn , where sn = Wo .
The lowpass to bandpass frequency transformation is
s2 + ωd1 ωd2
s = ωl
s(ωd2 − ωd1 )
where ωl is the reference frequency of the normalized lowpass filter and ωd1 and ωd2 are the
corresponding desired frequencies of the bandpass filter. Let us specify that the specification
of the lowpass filter is to be met exactly at the passband edge frequency. In this case, the
passband edge frequency of the normalized lowpass filter is computed as
This transformation is applied to the first-order denominator terms of the normalized trans-
fer function. The order of the filter doubles to N = 2. The numerator is
(0.9101sn )N = (0.9101sn ),
where 0.9101 is the constant in the denominator of the transformation formula. The transfer
function H(sn ) is
0.9101sn
H(sn ) =
(sn + 0.9101sn + 1)
Step 5: Find the factored form of the eighth order bandpass digital filter.
The transformation sn = sn /Wo = sn /8056.6 can be combined with the bilinear transfor-
mation as
2fs (z − 1) (z − 1) (z − 1)
sn = = 2.0336 =k
8056.6 (z + 1) (z + 1) (z + 1)
Then, for the second-order section, we get
k −k 2(d0 − k 2 ) (d0 − d1 k + k 2 )
a2 = , a1 = 0, a0 = , b1 = , b0 = ,
D D D D
80
where D = (d0 + d1 k + k 2 ). The transfer function of the digital filter H(z) is obtained as
0.2649(z 2 − 1)
H(z) =
(z 2 − 0.8976z + 0.4702)
As the filter order must be an integer, by rounding 0.9837 up to the nearest integer, we get
N = 1.
Step 3: Find the factored form of the second order normalized analog lowpass Chebyshev
filter transfer function.
The transfer function is given in Table 8.6 as
1
H(s) =
(s + 1)
Step 4: Find the factored form of the fourth order denormalized Chebyshev analog bandstop
s
filter transfer function in terms of sn , where sn = Wo and Wo = 7231.7 is the center
frequency of the bandstop filter. The frequency transformation for lowpass to bandstop is
s(ωc2 − ωc1 )
s=
s2 + ωc1 ωc2
For this design, the frequency transformation becomes
81
We apply this transformation to the first-order denominator polynomial. The first order
polynomial (s + a) transforms to
with the numerator (1/a)(s2n + 1). where sn = s/Wo. The transfer function H(sn ) is
(s2n + 1)
(s2n + 3.5578n + 1)
Step 5: Find the second-order digital bandstop filter.
The transformation sn = s/Wo = s/7231.7 can be combined with the bilinear transforma-
tion as
2fs (z − 1) (z − 1) (z − 1)
s= = 2.2656 =k
7231.7 (z + 1) (z + 1) (z + 1)
Then, for the second-order section, we get
1 + k2 2(1 − k 2 ) 2(d0 − k 2 ) (d0 − d1 k + k 2 )
a2 = a0 = , a1 = , b1 = , b0 = ,
D D D D
where D = (d0 + d1 k + k 2 ). The transfer function of the digital filter H(z) is obtained as
0.4321(z 2 − 1.3478z + 1)
(z 2 − 0.5824z − 0.1358)
The constant 0.4321 in the numerator is the (1 + k 2 )/D.
8.5
Design a lowpass digital filter with Butterworth response. The passband and stopband
edge frequencies of the digital filter are fdc = 51 Hz and fds = 81 Hz, respectively. The
maximum passband attenuation is Ac = 3 dB and the minimum stopband attenuation is
As = 17 dB. Let te stopband attenuation be better than the specification. The sampling
frequency is fs = 512 Hz.
Step 1: Prewarp the frequencies.
In the analog frequency domain, the prewarped edge frequencies, which are slightly higher
than the specified ones, correspond to
πfdc π51
ωac = (2fs ) tan = 2(512) tan = 331.3290 rad/sec
fs 512
πfds π81
ωas = (2fs ) tan = 2(512) tan = 555.4444 rad/sec
fs 512
For example, fdc = 51 Hz corresponds to 52.7326 Hz. Now, we find the transfer function of
the analog lowpass filter with ωc = ωac and ωs = ωas .
Step 2: The required order N of the filter has to be determined.
The order of the required filter is found as
0.1A 0.1(17)
s −1
log10 10
100.1Ac −1
log 10
10 −1
100.1(3) −1
N≥ = = 3.7733
2 log10 ( ωωsc ) 555.4444
2 log10 ( 331.3290 )
To make the filter order an integer, we find the nearest integer greater than or equal to
3.7733 to be N = 4.
Step 3: Find the factored form of the fifth order normalized analog lowpass Butterworth
filter transfer function.
The transfer function is given in Table 8.1 as
1
H(s) =
(s2 + 0.7654s + 1)(s2 + 1.8478s + 1)
82
Step 4: Find the analog frequency transformation from the normalized frequency to the
desired frequency.
The lowpass to lowpass analog frequency transformation is s = ωl s/ωd , where ωl and ωd
are, respectively, the reference frequency of the normalized filter and the desired frequency.
The normalized reference frequency ωl has to be computed. As the estimated filter order
N is usually a real value, it is rounded to the nearest higher integer. Due to this, the
filter performance becomes better at the edge frequencies. Now, we have three choices. We
can specify that the filter performs better at both the edge frequencies or one of the edge
frequencies and meeting the given specification at the other.
We can specify that the specification of the filter is to be met exactly at the cutoff
frequency. The cutoff frequency of the normalized filter, with the attenuation to be exact
as specified, is computed as
With the desired prewarped cutoff frequency ωac = 331.3290, the frequency transformation
is given by
0.9994s s
s= =
331.3290 331.5258
Step 5: Find the factored form of the fifth order lowpass digital filter transfer function.
This transformation
0.9994s s
s= =
331.3290 331.5258
can be combined with the bilinear transformation as
2fs (z − 1) (z − 1) (z − 1)
s= = 3.0887 =k
331.4896 (z + 1) (z + 1) (z + 1)
Then, using the formulas given earlier, for each second-order section
a2 z 2 + a1 z + a0
H(z) = ,
z 2 + b 1 z + b0
we get, with k = 3.0887,
1 2 1 2(1 − k 2 ) (1 − d1 k + k 2 )
a2 = , a 1 = , a 0 = , b1 = , b0 = ,
D D D D D
where D = (1+d1 k +k 2 ). The transfer function of the lowpass digital filter H(z) is obtained
as
0.0048(z 2 + 2z + 1)(z 2 + 2z + 1)
H(z) =
(z 2 − 1.0513z + 0.2975)(z 2 − 1.3236z + 0.6336)
8.6 Design a highpass digital filter with Chebyshev response. The passband and stopband
edge frequencies of the digital filter are fdc = 60 Hz and fds = 40 Hz, respectively. The
maximum passband attenuation is Ac = 2 dB and the minimum stopband attenuation is
As = 31 dB. The sampling frequency is fs = 512 Hz.
Step 1: Prewarp the frequencies
In the analog frequency domain, the edge frequencies correspond to
πfdc π60
ωac = (2fs ) tan = 2(512) tan = 395.0004 rad/sec
fs 512
πfds π40
ωas = (2fs ) tan = 2(512) tan = 256.4986 rad/sec
fs 512
Now, we design an analog lowpass filter with ωc = ωas and ωs = ωac .
83
Step 2: The required order N of the filter has to be determined.
The order of the required filter is found as
q q
100.1As −1 100.1(31) −1
cosh−1 100.1Ac −1
cosh−1 100.1(2) −1
N≥ = = 4.5418
cosh−1 ( ωωsc ) cosh−1 ( 395.0004
256.4986 )
To make the filter order an integer, we find the nearest integer greater than or equal to
4.5418 to be N = 5.
Step 3: Find the factored form of the fifth order normalized analog lowpass Chebyshev
filter transfer function.
The transfer function is given in Table 8.3 as
0.0817
H(s) =
(s + 0.2183)(s2 + 0.1349s + 0.9522)(s2 + 0.3532s + 0.3932)
Step 4: Find the analog frequency transformation from the normalized frequency to the
desired frequency.
The lowpass to highpass analog frequency transformation is s = (ωl ωd )/s, where ωl and ωd
are, respectively, the reference frequency of the normalized filter and the desired frequency.
With ωl = 1 and ωd = 395.0004, the transformation is s = (395.0004/s).
Step 5: Find the factored form of the fifth order highpass digital filter function.
This transformation
s = (395.0004/s)
can be combined with the bilinear transformation as
395.0004 (z + 1) (z + 1) (z + 1)
s= = 0.3857 =k
2fs (z − 1) (z − 1) (z − 1)
Then, using the formulas given earlier, for each second-order section
a2 z 2 + a1 z + a0
H(z) = ,
z 2 + b 1 z + b0
we get, with k = 0.3857,
1 2 1 −2(d0 − k 2 ) (d0 − d1 k + k 2 )
a2 = , a 1 = − , a 0 = , b1 = , b0 = ,
D D D D D
where D = (d0 + d1 k + k 2 ). For the first-order section, the transformation yields
1
(z+1)
k (z−1) + 0.2183
The transfer function of the Chebyshev highpass digital filter H(z) is obtained as
8.7
Design a bandpass digital filter with Butterworth response. The cutoff and stopband
edge frequencies of the filter are fdc1 = 800, fdc2 = 1700 Hz and fds1 = 300, fds2 = 2700
Hz, respectively. The maximum attenuation in the passband is Ac = 2 dB. The minimum
attenuation in the stopband attenuation is As = 15 dB. Let te stopband attenuation be bet-
ter than the specification. Design the bandpass digital filter using the analog Butterworth
filter. The sampling frequency is fs = 8192 Hz.
84
Step 1: Prewarp the frequencies
In the analog frequency domain, the edge frequencies correspond to
πfdc1 π800
ωac1 = (2fs ) tan = 2(8192) tan = 5190.4 rad/sec
fs 8192
πfdc2 π1700
ωac2 = (2fs ) tan = 2(8192) tan = 12505 rad/sec
fs 8192
πfds1 π300
ωas1 = (2fs ) tan = 2(8192) tan = 1893.3 rad/sec
fs 8192
πfds2 π2700
ωas2 = (2fs ) tan = 2(8192) tan = 27623 rad/sec
fs 8192
Bandpass frequency transformation is derived assuming that (ωac1 ωac2 ) = (ωas1 ωas2 ). As-
sume that the passband are edges are fixed. If (ωac1 ωac2 ) 6= (ωas1 ωas2 ), ωas1 has to be
increased or ωas2 has to be decreased. The frequency ωas1 is increased to (ωac1 ωac2 )/ωas2 =
2349.8, since (ωac1 ωac2 ) > (ωas1 ωas2 ). Then, the cutoff frequency of the normalized lowpass
filter becomes
ωc = ωac2 − ωac1 = 7315
The stopband edge frequency becomes
To make the filter order an integer, we find the nearest integer greater than or equal to
1.5963 to be N = 2.
Step 3: Find the factored form of the second-order normalized analog lowpass Butterworth
filter transfer function.
The transfer function is given in Table 8.1 as
1
H(s) =
(s2 + 1.4142s + 1)
The factored form of the sixth order denormalized Butterworth analog bandpass filter trans-
s
fer function, in terms of sn , where sn = Wo .
The lowpass to bandpass frequency transformation is
s2 + ωd1 ωd2
s = ωl
s(ωd2 − ωd1 )
where ωl is the reference frequency of the normalized lowpass filter and ωd1 and ωd2 are the
corresponding desired frequencies of the bandpass filter. Let us specify that the specification
of the lowpass filter is to be met exactly at the passband edge frequency. In this case, the
passband edge frequency of the normalized lowpass filter is computed as
85
The passband bandwidth Bw is
ωas2 − ωas1
= 7315/0.7984 = 9162.6
ωl
For this design, the frequency transformation becomes
where
√ sn = s/Wo. The constants a1 , a2 , b1 , and b2 are computed as follows. Let x =
+ b, y = x/a, z = (Bw/Wo)x, and p = 1 + z42 . Then,
v s
u
y u 4
m = √ t p + p2 − 2
2 (yz)
The numerator is
(1.1373sn )N = 1.2935s2n ,
where 1.1373 is the constant in the denominator of the transformation formula. The transfer
function H(sn ) is
1.2935s2n
H(sn ) =
(s2n + 1.0013sn + 2.1439)(s2n + 0.4670sn + 0.4664)
Step 5: Find the factored form of the eighth order bandpass digital filter.
The transformation sn = sn /Wo = sn /8056.6 can be combined with the bilinear transfor-
mation as
2fs (z − 1) (z − 1) (z − 1)
sn = = 2.0336 =k
8056.6 (z + 1) (z + 1) (z + 1)
Then, for each second-order section, we get
k −k 2(d0 − k 2 ) (d0 − d1 k + k 2 )
a2 = , a1 = 0, a0 = , b1 = , b0 = ,
D D D D
where D = (d0 + d1 k + k 2 ). The transfer function of the digital filter H(z) is obtained as
0.0966(z 2 − 2z + 1)(z 2 + 2z + 1)
H(z) =
(z 2 − 0.4790z + 0.5103)(z 2 − 1.3218z + 0.6579)
The constant is the product of the k/D terms of each of the two second-order terms multi-
plied by 1.2935.
8.8 The cutoff and stopband edge frequencies of a bandstop filter are fdc1 = 600, fdc2 = 5400
Hz and fds1 = 1600, fds2 = 3400 Hz, respectively. The maximum passband attenuation is
specified as Ac = 2 dB. The minimum stopband attenuation is specified as As = 15 dB.
Design the bandstop digital filter using the analog Chebyshev filter. The sampling frequency
is fs = 16384 Hz.
86
Step 1: Prewarp the frequencies and find the specification of the prototype lowpass filter.
We prewarp the frequencies to get
πfdc1 π600
ωac1 = (2fs ) tan = 2(16384) tan = 3786.6 rad/sec
fs 16384
πfdc2 π5400
ωac2 = (2fs ) tan = 2(16384) tan = 55245 rad/sec
fs 16384
πfds1 π1600
ωas1 = (2fs ) tan = 2(16384) tan = 10381 rad/sec
fs 16384
πfds2 π3400
ωas2 = (2fs ) tan = 2(16384) tan = 25011 rad/sec
fs 16384
The bandstop frequency transformation is derived assuming that (ωac1 ωac2 ) = (ωas1 ωas2 ).
If (ωac1 ωac2 ) 6= (ωas1 ωas2 ), with fixed passband edges, ωas1 has to be decreased or ωas2 has
to be increased. The frequency ωas1 is decreased to (ωac1 ωac2 )/ωas2 = 8364.1 since
(ωac1 ωac2 ) < (ωas1 ωas2 ). Now, we design a lowpass filter with cutoff frequency ωc = ωac2 −
ωac1 = 51458 and stopband edge frequency ωs = ωas2 − ωas1 = 16647.
Step 2: Find the required filter order N .
The order of the required filter is found as
q q
100.1As −1 100.1(15) −1
cosh−1 100.1Ac −1
cosh−1 10 0.1(2) −1
N≥ = = 1.4865
cosh−1 ( ωωsc ) cosh−1 ( 51458
16647 )
As the filter order must be an integer, by rounding 1.4865 up to the nearest integer, we get
N = 2.
Step 3: Find the factored form of the second order normalized analog lowpass Chebyshev
filter transfer function.
The transfer function is given in Table 8.4 as
0.65378
H(s) =
(s2 + 0.80382s + 0.82306)
Step 4: Find the factored form of the fourth order denormalized Chebyshev analog bandstop
s √
filter transfer function in terms of sn , where sn = Wo and Wo = ωc1 ωc2 = 14463 is
the center frequency of the bandstop filter. The frequency transformation for lowpass to
bandstop is
s(ωc2 − ωc1 )
s= 2
s + ωc1 ωc2
For this design, the frequency transformation becomes
Bw s Bw s 51458s 3.5578(s/14463)
s= = 2 = 2 =
s2 + ωc1 ωc2 s + Wo2 s + (14463)2 (s/14463)2 + 1
The polynomial
where
√ sn = s/Wo. The constants a1 , a2 , b1 , and b2 are computed as follows. Let x =
+ b, y = x/a, z = Bw/(Wo x), and p = 1 + z42 . Then,
v s
u
y u 4
m = √ tp + p 2 − 2
2 (yz)
87
Let q = zm/y. Then,
p p
n1 = 0.5(q + q 2 − 4) n2 = 0.5(q − q 2 − 4)
b1 = n21 , b2 = n22 , a1 = n1 /m, a2 = n2 /m
0.7943(s2n + 1)2
(s2n + 3.2780sn + 16.6748)(s2n + 0.1966sn + 0.06)
Step 5: Find the factored form of the fourth order digital bandstop filter.
The transformation sn = s/Wo = s/14463 can be combined with the bilinear transformation
as
2fs (z − 1) (z − 1) (z − 1)
s= = 2.2656 =k
14463 (z + 1) (z + 1) (z + 1)
Then, for each second-order section, we get
The constant 0.1813 in the numerator is the product of the (1 + k 2 )/D of the two terms and
the constant 0.7943.
88
Chapter 9
9.1 Given the nonzero samples of x(n), find its DTFT X(ejω ). Express the DTFT Xd (ejω )
of x(M n) in terms of X(ejω ) using the formula
M −1
1 X ω−2πk
Xd (ejω ) = X(ej( M ) )
M
k=0
Verify that the inverse of Xd (ejω ) is the same as x(M n). Approximate the DTFT and
inverse DTFT, respectively, by DFT and IDFT.
9.1.1
x(n) = {x(0) = −1, x(1) = 4, x(2) = 3, x(3) = −3}, M = 1
9.1.2
x(n) = {x(0) = −1, x(1) = 4, x(2) = 3, x(3) = −3}, M =2
* 9.1.3
x(n) = {x(0) = −1, x(1) = 4, x(2) = 3, x(3) = −3}, M =3
9.1.1
Xd (ejω ) = X(ejω )
9.1.2
1
1X ω−2πk
Xd (ejω ) = X(ej( 2 ) )
2
k=0
With k = 0, the partial DFT samples, using the defining equation, are
With k = 1, the partial DFT samples, using the defining equation, are
9.1.3
2
1X ω−2πk
Xd (ejω ) = X(ej( 3 ) )
3
k=0
With k = 0, the partial DFT samples, using the defining equation, are
89
With k = 1, the partial DFT samples, using the defining equation, are
With k = 2, the partial DFT samples, using the defining equation, are
Xd (k) = {−4, −2.5 + j2.5981, 0.5 + j2.5981, 2, 0.5 − j2.5981, −2.5 − j2.5981}
9.2 Given the samples over one period of a periodic signal x(n) starting with index 0, find
its DTFT X(ejω ). Filter X(ejω ) by an ideal lowpass filter with cutoff frequency π/M . Find
the inverse of the filtered spectrum and downsample by a factor of M to get the decimated
version xdec (n) of x(n). Approximate the DTFT and inverse DTFT, respectively, by DFT
and IDFT.
9.2.1
x(n) = {2, 0.8660, −0.5, 0, 0.5, −0.8660, −2, −0.8660, 0.5, 0, −0.5, 0.8660}, M =4
xf (n) = {1, 0.8660, 0.5, 0, −0.5, −0.8660, −1, −0.8660, −0.5, 0, 0.5, 0.8660}
9.2.2
x(n) = {2, 1, 0, 1, 2, 1, 0, 1, 2, 1, 0, 1}, M =4
The DFT of x(n) is
X(k) = {12, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0}
After filtering,
Xf (k) = {12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
The IDFT of Xf (k) is
xf (n) = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}
Downsampling by a factor M = 4, we get
9.2.3
x(n) = {2, −0.1340, 1.5, −1, 0.5, −1.8660, 0, −1.8660, 0.5, −1, 1.5, −0.1340}, M =2
90
The DFT of x(n) is
X(k) = {0, 6, 0, 0, 0, 0, 12, 0, 0, 0, 0, 6}
After filtering,
Xf (k) = {0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6}
The IDFT of Xf (k) is
xf (n) = {1, 0.8660, 0.5, 0, −0.5, −0.8660, −1, −0.8660, −0.5, 0, 0.5, 0.8660}
9.3 Given the nonzero samples of x(n), find its DTFT X(ejω ). Express the DTFT Xu (ejω )
of x(n/L) in terms of X(ejω ) using the formula
Verify that the inverse of Xu (ejω ) is the same as x(n/L). Approximate the DTFT and
inverse DTFT, respectively, by DFT and IDFT.
9.3.1
x(n) = {2, 1, 3, 4}, L = 2
The DFT of x(n) is
X(k) = {10, −1 + j3, 0, −1 − j3}
The DFT of xu (n) is
9.3.2
x(n) = {2, 1, 3, 4}, L=3
The DFT of x(n) is
X(k) = {10, −1 + j3, 0, −1 − j3}
The DFT of xu (n) is
Xu (k) = {10, −1 + j3, 0, −1 − j3, 10, −1 + j3, 0, −1 − j3, 10, −1 + j3, 0, −1 − j3}
9.3.3
x(n) = {2, 3}, L=4
The DFT of x(n) is
X(k) = {5, −1}
The DFT of xu (n) is
Xu (k) = {5, −1, 5, −1, 5, −1, 5, −1}
The IDFT of Xu (k) is
xu (n) = {2, 0, 0, 0, 3, 0, 0, 0}
91
9.4 Given the samples over one period of a periodic signal x(n) starting with index 0, find
its DTFT X(ejω ). Express the DTFT Xu (ejω ) of x(n/L) in terms of X(ejω ) using the
formula
Xu (ejω ) = X(ejLω ), 0 < ω < 2π
Filter Xu (ejω ) by an ideal lowpass filter with cutoff frequency π/L. Find the inverse of the
filtered spectrum multiplied by L to get the interpolated version xi (n) of x(n). Approximate
the DTFT and inverse DTFT, respectively, by DFT and IDFT.
9.4.1
x(n) = {1, 0, −1, 0}, L = 2
The DFT of x(n) is
X(k) = {0, 2, 0, 2}
Xu (k) = {0, 2, 0, 2, 0, 2, 0, 2}
The filtered spectrum is
Xu (k) = {0, 2, 0, 0, 0, 0, 0, 2}
The IDFT of the filtered spectrum multiplied by 2 is
9.4.2
x(n) = {0, 1, 0, −1}, L=3
The DFT of x(n) is
X(k) = {0, −j2, 0, j2}
Xu (k) = {0, −j2, 0, j2, 0, −j2, 0, j2, 0, −j2, 0, j2}
The filtered spectrum is
{0, −j2, 0, 0, 0, 0, 0, 0, 0, 0, 0, j2}
The IDFT of the filtered spectrum multiplied by 3 is
xi (n) = {0, 0.5, 0.8660, 1, 0.8660, 0.5, 0, −0.5, −0.8660, −1, −0.8660, −0.5}
9.5 Find the convolution of x(n) and h(n) in the time domain: (i) directly and (2) convolving
x(n) with he (n) and ho (n).
9.5.1
x(0) = 1, x(1) = 0, x(2) = 3, x(3) = 0
h(0) = 3, h(1) = −2, h(2) = 1
9.5.2
x(0) = 1, x(1) = 0, x(2) = 1, x(3) = 0
h(0) = 3, h(1) = −2, h(2) = 1
9.5.3
x(0) = 4, x(1) = 0, x(2) = 1, x(3) = 0
h(0) = 3, h(1) = −2, h(2) = 1
92
k 0 1 2 3 k 0 1 3
h(k) 3 −2 1 h(k) 3 −2 1
xu (k) 1 0 3 0 x(k) 1 3
h(0−k) 1 −2 3 he (0−k) 1 3
h(1−k) 1 −2 3 ho (0−k) −2
h(2−k) 1 −2 3 he (1−k) 1 3
h(3−k) 1 −2 3 ho (1−k) −2
h(4−k) 1 −2 3 he (1−k) 1 3
n 0 1 2 3 4 n 0 1 2 3 4
y(n) 3 −2 10 −6 3 y(n) 3 −2 10 −6 3
(a) (b)
Figure 1: 9.5.1 (a) Convolution of an upsampled sequence xu (n) with h(n); (b) convolution
of x(n) with he (n) and ho (n) with the same output
k 0 1 2 3 k 0 1 3
h(k) 3 −2 1 h(k) 3 −2 1
xu (k) 1 0 1 0 x(k) 1 1
h(0−k) 1 −2 3 he (0−k) 1 3
h(1−k) 1 −2 3 ho (0−k) −2
h(2−k) 1 −2 3 he (1−k) 1 3
h(3−k) 1 −2 3 ho (1−k) −2
h(4−k) 1 −2 3 he (1−k) 1 3
n 0 1 2 3 4 n 0 1 2 3 4
y(n) 3 −2 4 −2 1 y(n) 3 −2 4 −2 1
(a) (b)
Figure 2: 9.5.2 (a) Convolution of an upsampled sequence xu (n) with h(n); (b) convolution
of x(n) with he (n) and ho (n) with the same output
k 0 1 2 3 k 0 1 3
h(k) 3 −2 1 h(k) 3 −2 1
xu (k) 4 0 1 0 x(k) 4 1
h(0−k) 1 −2 3 he (0−k) 1 3
h(1−k) 1 −2 3 ho (0−k) −2
h(2−k) 1 −2 3 he (1−k) 1 3
h(3−k) 1 −2 3 ho (1−k) −2
h(4−k) 1 −2 3 he (1−k) 1 3
n 0 1 2 3 4 n 0 1 2 3 4
y(n) 12 −8 7 −2 1 y(n) 12 −8 7 −2 1
(a) (b)
Figure 3: 9.5.3(a) Convolution of an upsampled sequence xu (n) with h(n); (b) convolution
of x(n) with he (n) and ho (n) with the same output
93
9.6 Given a periodic signal x(n), find its sampling rate converted version y(n) by a factor
L/M using DFT and IDFT.
9.6.1
2π
x(n) = cos( n), L = 3, M = 2
4
Y (k) = {0, 3, 0, 0, 0, 3}
9.6.2
2π
x(n) = cos( n), L = 2, M =3
6
Y (k) = {0, 2, 0, 2}
9.7 Let the nonzero values of the input signal and the impulse response of the filter, with
the starting index zero, be, respectively,
Find the every second, M = 2, convolution output of x(n) and h(n) directly and by the
polyphase approach.
The complete output y(n) of convolving h(n) and x(n) is
y(n) = x(n) ∗ h(n) = {6, −1, 12, 12, 3, 23, −1, 12, 2, 12, 10, 19, 9, 20, 8, 8}
94
First, zero-pad the impulse response to make its length equal to an integral multiple of
M = 2 to get
h(n) = {2, −1, 3, 1, 2, 0}
By grouping the even- and odd-indexed values, we get
9.8 Let the input signal and the impulse response of the filter be, respectively,
The interpolation factor is L = 2 and xu (n) = {2, 0, 1, 0, −3, 0, 4, 0}. Find the convolution
of xu (n) and h(n) using the direct and polyphase method.
The upsampled input is
xu (n) = {2, 0, 1, 0, −3, 0, 4, 0}
The convolution output of convolving h(n) and xu (n) is
The output y(n) is obtained by interleaving the two partial outputs, which is the same that
obtained by the direct method.
9.9 Using the Haar transform matrix, find the DWT of x(n). Verify that x(n) is recon-
structed by computing the IDWT. Verify Parseval’s theorem.
{x(0) = 1, x(1) = 2}
Xφ (0, 0) 1 1 1 1 2.1213
=√ =
Xψ (0, 0) 2 1 −1 2 −0.7071
x(0) 1 1 1 2.1213 1
=√ =
x(1) 2 1 −1 −0.7071 2
95
9.10 Using the Haar transform matrix, find the 1-level DWT of x(n). Verify that x(n) is
reconstructed by computing the IDWT. Verify Parseval’s theorem.
The inverse is
x(0) 1 0 1 0 2.1213 2
x(1) 1 1 0 −1 0 4.9497 1
x(2) = √2 0 1
=
0 1 0.7071 3
x(3) 0 1 0 −1 −0.7071 4
96
Chapter 10
10.1 Given the samples of a waveform x(n), find the samples of its even half-wave symmetric
and odd half-wave symmetric components. Verify that the sum of the samples of the two
components add up to the samples of x(n). Compute the DFT of x(n) and its components.
Verify that the DFT of the even half-wave symmetric component consists of zero-valued odd-
indexed spectral values. Verify that the DFT of the odd half-wave symmetric component
consists of zero-valued even-indexed spectral values.
10.1.1 x(n) = {0̌, 1, 2, 3}.
10.1.2 x(n) = {0̌, 1, 0, 1}.
10.1.3 x(n) = {1̌, 3, −1, −3}.
10.1.4 x(n) = {2̌, 1, 3, 4}.
10.1.5 x(n) = {3̌, 1, 2, 4}.
10.1.1
xe(n) = {1, 2, 1, 2}, xo(n) = {−1, −1, 1, 1}
X(k) = {6, −2 + j2, −2, −2 − j2}, Xe(k) = {6, 0, −2, 0}, Xo(k) = {0, −2 + j2, 0, −2 − j2}
10.1.2
xe(n) = {0, 1, 0, 1}, xo(n) = {0, 0, 0, 0}
X(k) = {2, 0, −2, 0}, Xe(k) = {2, 0, −2, 0}, Xo(k) = {0, 0, 0, 0}
10.1.3
xe(n) = {0, 0, 0, 0}, xo(n) = {1, 3, −1, −3}
X(k) = {0, 2 − j6, 0, 2 + j6}, Xe(k) = {0, 0, 0, 0}, Xo(k) = {0, 2 − j6, 0, 2 + j6}
10.1.4
xe(n) = {2.5, 2.5, 2.5, 2.5}, xo(n) = {−0.5, −1.5, 0.5, 1.5}
X(k) = {10, −1 + j3, 0, −1 − j3}, Xe(k) = {10, 0, 0, 0}, Xo(k) = {0, −1 + j3, 0, −1 − j3}
10.1.5
xe(n) = {2.5, 2.5, 2.5, 2.5}, xo(n) = {0.5, −1.5, −0.5, 1.5}
X(k) = {10, 1 + j3, 0, 1 − j3}, Xe(k) = {10, 0, 0, 0}, Xo(k) = {0, 1 + j3, 0, 1 − j3}
10.2 Given a waveform x(n) with period 8, find the samples of the waveform. (a) Give
the trace of the PM DIF DFT algorithm in computing its DFT X(k). (b) Give the trace of
the PM DIT DFT algorithm in computing its DFT X(k). Verify that both are the same.
In both cases, find the IDFT of X(k) using the same DFT algorithms, give the trace and
verify that the samples of the input x(n) are obtained.
2π π
10.2.1 x(n) = −2e−j( 8 n+ 6 )
2π π
10.2.2 x(n) = −e−j( 8 6n− 3 )
2π π 2π π
10.2.3 x(n) = ej( 8 0n− 3 ) + ej( 8 4n− 6 )
2π π 2π π
10.2.4 x(n) = −ej( 8 n+ 4 ) + ej( 8 2n+ 6 )
97
2π π 2π π
10.2.5 x(n) = 3ej( 8 6n− 4 ) + ej( 8 7n+ 3 )
10.2.1
98
Y (k) = {0, 0, 0, 3.4641 − j2, 0, 3.4641 + j2, 0, 0}
10.3.2
10.4 Given a waveform x(n) with period 8, find the samples of the waveform. Find its
DFT X(k) using the PM RDFT algorithm. Find the IDFT of X(k) using the PM RIDFT
algorithm to get back the samples of x(n). Verify the DFT X(k) by expressing x(n) into
its complex exponential components.
10.4.1 cos( 2π π
8 0n + 6 ).
99
10.4.2 cos( 2π
8 1n −
π
6 ).
10.4.3 cos( 2π
8 2n +
π
4 ).
10.4.4 cos( 2π
8 3n −
π
4 ).
10.4.5 cos( 2π
8 4n +
π
3 ).
10.4.1
x(n) = {0.8660, 0.8660, 0.8660, 0.8660, 0.8660, 0.8660, 0.8660, 0.8660}
X(k) = {6.9282, 0, 0, 0, 0, 0, 0, 0}
10.4.2
X(k) = {0, 0, 0, 0, 4, 0, 0, 0}
100
Chapter 11
11.1 Determine the 2’s complement 4-bit representation B of the decimal number x with
rounding. Determine also the 2’s complement representation of −x. Add the two represen-
tations and verify that the sum of the two numbers is zero.
11.1.1 x = 0.6321.
* 11.1.2 x = −0.0728.
11.1.3 x = 0.8321.
11.1.1
B = 0.1010
B ∗ = 1.0110
11.1.2
B = 0.0001
B ∗ = 1.1111
11.1.3
B = 0.1110
B ∗ = 1.0010
11.2 A white noise signal has amplitudes uniformly distributed between -1 and 1. Find the
total signal variance.
The variance σq2 , is
1 1 2 1
Z
σq2 = e de =
2 −1 3
The variance, for uniform density function, is equal to the square of the width of the density
function divided by 12.
* 11.3 Let the number of input samples to the DFT be N = 256 with the desired SNR 30
dB. Determine the number of bits required: (i) with all the scaling carried out at the input
and (ii) with distributed scaling in fast DFT algorithms.
101
11.4 The difference equation
characterizes a IIR filter and it is realized with a wordlength of 4 bits. Using the time- and
frequency-domain relations, find the output round-off noise power, due to quantization. Use
256-point DFT to compute the noise power in the frequency domain. Verify that the noise
power is the same in both the domains.
In the time-domain, the output noise power, with a = 0.8, is
2−2b 1 2−2(4) 1
2
= = 9.0422e − 04
12 1 − a 12 1 − (0.8)2
ejω
H(ejω ) =
ejω − 0.8
With N = 256 we get the noise power as 9.0422e − 04.
are connected in cascade in that order and is realized with a word length of four bits. Find
the output round-off noise power, due to quantization.
2 1
σqo = σq2 = σq2 2.7778,
1 − 0.82
where
2−2b
σq2 =
12
and b = 4. For the second stage, the noise power is
2 1
σqo = σq2 = σq2 1.9608
1 − 0.72
The impulse response of the cascade stages is the convolution of the individual stages, which
is
h(n) = (8(0.8)n − 7(0.7)n )u(n)
The corresponding noise power is
2 82 72 8(7)
σqo = σq2 ( 2
+ 2
− ) = σq2 146.5835
1 − 0.9 1 − 0.7 1 − 0.8(0.7)
102
Let the input be x(n) = 10δ(n) with the initial condition y(−1) = 0. Let the multiplier
output is rounded to the nearest integer. By iteration, find the first 10 values of the output
of the filter. List also the first 10 output values with infinite precision. Is there limit cycle
oscillation?
y(n) = {10, −8.5, 7.2250, −6.1412, 5.2201, −4.4371, 3.7715, −3.2058, 2.7249, −2.3162}
1
{K1 = = −1, and K2 = −2}
1−2
103