Professional Documents
Culture Documents
Exercises Solutions
Exercises Solutions
Spring 2020
a) cos(0.01π(n + N )) = cos(0.01πn) for this to be true, 0.01πN = 2πk and Nk = 200. So x(n) is periodic and its
period is N = 200.
b) Periodic, N = 7.
c) Periodic, N = 2.
d) sin(3n) = sin(3(n + N )) about 3N = 2πp and p integer. Then N cannot be integers so sin(3n) is not periodic.
e) Periodic, N = 10.
Solution 1.5
a) See c).
50 ) = 3 sin(2πn · 1 ). Periodic with period N = 6 and frequency
b) x(n) = xa (nT ) = 3 sin(2πnT · 50) = 3 sin(2πn · 300 6
f = 1/6.
c) N = 6 and T = 1/300, so Tp = N T = 0.02 s.
0
5 10 15 20 25 30
−2
−4
d) x(0) = 0 and x(1) = 3 = 3 sin 2π · 14 = 3 sin 2π · 50 50 1
Fs , so Fs = 4 and thereby Fs = 200 Hz.
Solution 1.7
a) Fs ≥ 2Fmax = 2 · 10 kHz = 20 kHz.
b) x(n) = xa (nT ) = cos 2πn · 5000 5 5 1 3 3
8000 = cos 2πn · 8 but since 8 > 2 so x(n) = cos 2πn 1 − 8 = cos −2πn · 8 =
cos 2πn · 83 so xa (t) = cos(2πt · 3000), that is to say folding to 3 kHz.
c) Folding to 1 kHz.
Solution 1.8
a) Nyquist rate FN is the lowest sample rate so that folding does not occur. FN = 2Fmax = 2 · 100 = 200 Hz.
b) Fs = 250 Hz so Fmax ≤ 125 Hz.
2
Solution 1.11
The analog signal is:
1
x(n) = xa n · (2)
200
50 125
= 3 cos 2πn · + 2 sin 2πn · (3)
200 200
1 5
= 3 cos 2πn · + 2 sin 2πn · (4)
4 8
1 3
= 3 cos 2πn · + 2 sin −2πn · (5)
4 8
Reconstruct with Frek = 1000 Hz.
1000 3 · 1000
ya (t) = 3 cos 2πt · + 2 sin −2πt · (6)
4 8
= 3 cos (2πt · 250) − 2 sin (2πt · 375) (7)
Solution 1.13
xmax −xmin
The number of levels is L = ∆
+ 1 and the number of bits are b = log2 L.
a) b = 7
b) b = 10
Solution 1.14
F
Bitrate = numberof bitsXsamplingf requency = nFs , so rate = 20 Hz · 8 bitar = 160 bitar/s. Fmax = 2s = 10 Hz.
DynamicRange
∆= 2n −1 = 1/255 V.
Solution E1.1
Simulation in Matlab.
3
Solution N1.1
Euler’s formulae:
1 j2πn 1 −j2πn
cos(2πn) = e + e (8)
2 2
1 j2πn 1 −j2πn
sin(2πn) = e − e (9)
2j 2j
d d 1 j2πn 1 −j2πn
cos(2πn) = ( e + e ) (10)
dn dn 2 2
1 1
= (j2π)ej2πn + (−j2π)e−j2πn (11)
2 2
−j j2πn j −j2πn
= (−2π)( e + e ) (12)
2 2
1 j2πn 1 −j2πn
= (−2π)( e − e ) (13)
2j 2j
d d 1 j2πn 1 −j2πn
sin(2πn) = ( e − e ) (16)
dn dn 2j 2j
1 1
= (j2π)ej2πn − (−j2π)e−j2πn (17)
2j 2
1 1
= (2π)( ej2πn + e−j2πn ) (18)
2 2
= (2π) cos(2πn) (19)
(20)
Solution N1.2
See the formulas for the sum of a geometric series from Lecture 1 slides.
a)
PN n 1−2N +1 N +1
n=0 2 = 1−2 = −1 + 2
b)
P∞ n 1
n=0 0.5 = 1−0.5 = 2
Solution N1.3
The Nyquist rate(NR) is twice the maximum signal frequency available in the signal.
a) fmax = 75 Hz, N R = 150 Hz.
b) fmax = 200 Hz, N R = 400 Hz.
c) x(t) = 3 sin(100πt) cos(250πt) = 23 (sin(350πt) − sin(150πt)). so,fmax = 175 Hz, N R = 350 Hz.
4
Solution N1.4
a) x(n) = nu(n) = 1δ(n − 1) + 2δ(n − 2) + 3δ(n − 3) + 4δ(n − 4) + ... = ∞
P
k=1 kδ(n − k).
P∞
b) x(n) = u(n + 1) = δ(n + 1) + δ(n) + δ(n − 1) + δ(n − 2) + .. = k=−1 δ(n − k)
Solution N1.5
A causal signal means that the signal is zero before n=0.
a) x(n) = u(n + 1), is non zero before n = 0 so it is noncausal.
b) x(n) = u(n − 1), is zero before n = 0 so it is causal.
Solution N1.6
a) x(n + 1) = {1, 2, 1, −3, 5, 8}, and the corresponding values of n = {−1, 0, 1, 2, 3, 4}
b) x(n − 1) = {1, 2, 1, −3, 5, 8}, and the corresponding values of n = {1, 2, 3, 4, 5, 6}
c) x(2n) = {1, 1, 5}, interpolation, and the corresponding values of n = {0, 1, 2}
d) x(0.5n) = {1, 2, 1, −3, 5, 8}, and the corresponding values of n = {0, 2, 4, 6, 8, 10}.
Solution N1.7
Hint: For the signal to be an energy signal, the energy should be finite and the power should be zero. If the
energy is infinite and the power is zero then it is a power signal.
Suggestion: The signals with decaying amplitude are energy signals and signals having constant amplitude are
power signals. The signals whose amplitude increases are neither energy nor power signals.
a) x(n) = u(n), n ≥ 0
5
Solution N1.8
Even signal if x(−n) = x(n), odd signal if x(−n) = −x(n).
1 e−jn − 1 ejn = −( 1 ejn − 1 e−jn ) = −sin(n), hence odd signal.
a) sin(−n) = 2j 2j 2j 2j
Solution N1.9
Linearity: Linear systems should satisfy homogeneity(if y(n) = f (x(n)) then ay(n) = af (x(n))) and additivity prop-
erty (if y1 (n) = f (x1 (n)), y2 (n) = f (x2 (n)) then y1 (n) + y2 (n) = f (x1 (n) + x2 (n)).
Homogeneity: for the input ax1 (n), the output is y1 (n) = ax1 (n2 ) so y(n) = ay1 (n). Hence satisfied.
Additive:y1 (n) = x1 (n2 ), y2 (n) = x2 (n2 ). For the input,x1 (n) + x2 (n),output is y(n) = x1 (n2 ) + x2 (n2 ) =
y1 (n) + y2 (n). The additive property is satisfied.
Hence linear.
Time invariance check:
y(n) = x(n2 ) and y(n − D) = x(n2 − D). Let us delay the input by D. Now the output is y(n) = x((n − D)2 ),
which is not the same as y(n − D), hence not time invariant.
c) Linearity check:
Homogeneity: For the input ax1 (n), output is y1 (n) = a2 x1 (n)2 so y(n) , ay1 (n). Hence not satisfied.
Additive:y1 (n) = x1 (n)2 , y2 (n) = x2 (n)2 . For the input,x1 (n) + x2 (n),output is y(n) = (x1 (n) + x2 (n))2 ,
y1 (n) + y2 (n). The additive property is not satisfied.
Hence not linear. Even if one of the properties are not satisfied, it will be non-linear.
Time invariance check:
y(n) = x(n)2 and y(n − D) = x(n − D)2 . Let us delay the input by D. Now the output is y(n) = x(n − D)2 ,
which is the same as y(n − D), hence time invariant.
Solution N1.10
The analog signal is xa (t) = 3 cos(500πt) + 2 sin(1000πt).
a) The maximum signal frequency component Fm ax = 500 Hz, so the Nyquist rate is 1000 Hz. The sampling
frequency should be at least higher than the Nyquist rate for ideal reconstruction.
6
b) For Fs = 400 Hz,
250 500
x(n) = 3 cos(2πn ) + 2 sin(2πn ) (21)
400 400
5 5
= 3 cos(2πn ) + 2 sin(2πn ) (22)
8 4
3 1
= 3 cos(2πn ) + 2 sin(2πn ) (23)
8 4
3 1
x(t) = 3 cos(2πn 400) + 2 sin(2πn 400) (24)
8 4
= 3 cos(300πt) + 2 sin(200πt) (25)
Here the sampling frequency is very low compared to the Nyquist rate, so the signal cannot be recovered
after sampling.
For Fs = 600 Hz,
250 500
x(n) = 3 cos(2πn ) + 2 sin(2πn ) (26)
600 600
5 5
= 3 cos(2πn ) + 2 sin(2πn ) (27)
12 6
5 1
= 3 cos(2πn ) − 2 sin(2πn ) (28)
12 6
(29)
5 1
x(t) = 3 cos(2πt 600) − 2 sin(2πt 600) (30)
12 6
= 3 cos(500πt) − 2 sin(200πt) (31)
(32)
Now reconstructing with Fs = 600 Hz,. As the frequency signal is higher than the Nyquist rate of 250 Hz only
this signal is recovered.
For Fs = 1100 Hz
250 500
x(n) = 3 cos(2πn ) + 2 sin(2πn ) (33)
1100 1100
5 5
= 3 cos(2πn ) + 2 sin(2πn ) (34)
22 11
Now reconstructing with F= 1100 Hz
5 5
x(t) = 3 cos(2πt 1100) + 2 sin(2πt 1100) (35)
22 11
= 3 cos(500πt) + 2 sin(10000πt) (36)
(37)
All frequency components are recovered as the sampling frequency is higher than the Nyquist rate.
7
x(n)
−10 −5 0 5 10
x(−n) x(−n + 4)
−10 −5 0 5 10 −10 −5 0 5 10
b) i)
x(n − 4) x(−n − 4)
−10 −5 0 5 10 −10 −5 0 5 10
ii)
x(−n + 4)
−10 −5 0 5 10
c)
d) First fold x(n) and then delay the resulting signal by k samples.
e) x(n) = 1/3 δ(n + 2) + 2/3 δ(n + 1) + u(n) − u(n − 4)
Solution 2.7
a) output at nth instant that means y(n) only depends on the input at the same nth time instant x(n). So this is
static system and causal
cos(a1 x1 (n) + a2 x2 (n)) , a1 cos(x1 (n)) + a2 cos(x2 (n)). it is a non linear system.
y(i) = cos(x(i)) if i = n − k so y(n − k) = cos(x(n − k) system is time invariant.
−1 ≤ cos(x(n)) ≤ +1 any input produces a bounded output.
Static, nonlinear, time invariant, causal ,stable
8
b) Here output at nth instant depends on input at k th instant, where k = −∞, ..., n − 1, n, n + 1 . output depends
on present input as well as past and future inputs..So the system is dynamic.
n+1
X n+1
X
y1 (n) = x1 (k) y2 (n) = x2 (k) x(n) = a1 x1 (n) + a2 x2 (n)
k=−∞ k=−∞
n+1
X n+1
X n+1
X
y(n) = (a1 x1 (k) + a2 x2 (k)) = a1 x1 (k) + a2 x2 (k)
k=−∞ k=−∞ k=−∞
n+1
X n+1
X
= a1 x1 (k) + a2 x2 (k) = a1 y1 (n) + a2 y2 (n)
k=−∞ k=−∞
system is linear.
n−i+1
X n+1
X
y(n − i) = x(k) = x(k ∗ − i)
k=−∞ k ∗ =−∞
n+1
X
= x(k − i)
k=−∞
system is linear.
suppose the system input is x(n − i) so the output is y ∗ (n) = x(n − i) cos(ω0 n) , y(n − i)
suppose that x(n) is bounded since we know that cos(ω0 n) is bounded so y(n) is bounded. system is stable.
9
n) Static, linear, time invariant, causal ,stable
Solution 2.13
a)
X XX X X X X
y(n) = h(n − k)x(k) = x(k) h(n − k) = x(k) h(l) (38)
n n k k n k l
P P
b) (1) Sufficient: Suppose that n |h(n)| = Mh < ∞. Then apply with limited input signal, n |x(n)| ≤ Mx <
∞,by using the fundamental properties of absolute values (Multiplicativity ,Subadditivity)
X∞ X∞
y(k) = h(n)x(k − n) ≤ |h(n)| · |x(k − n)| ≤ Mh · Mx < ∞ (39)
n=−∞ n=−∞
Solution 2.14
1)
2)
10
Solution 2.16
1) Graphic solution:
h(0 − k) 4 2 1
x(k) 1 1 1 1 1
h(1 − k) 4 2 1
x(k) 1 1 1 1 1
h(2 − k) 4 2 1
x(k) 1 1 1 1 1
h(3 − k) 4 2 1
x(k) 1 1 1 1 1
h(5 − k) 4 2 1
x(k) 1 1 1 1 1
h(6 − k) 4 2 1
x(k) 1 1 1 1 1
n o
y(n) = 1 3 7 7 7 6 4
2) Graphic solution:
h(0 − k) -1 2 1
x(k) 1 2 -1
h(k) ∗ x(k) 1 4 2 -4 1
n o
y(n) = 1 4 2 −4 1
3) Graphic solution:
1 2 3 4 5
1 1 2 3 4 5
1 1 2 3 4 5
n o
y(n) = 1 2 3 4 5
4) Grafisk lösning:
11
1 -2 -3 4
1 1 -2 -3 4
1 1 -2 -3 4
0 0 0 0 0
1 1 -2 -3 4
1 1 -2 -3 4
Summera antidiagonalerna,
n o
y(n) = 1 −1 −5 2 3 −5 1 4 , (52)
X X X
y(n) = 0 = x(k) h(l) = 0 · 4 (53)
n k l
(5) Formel-lösning:
∞ k n−k
X 1 1
y(n) = u(k) u(n − k) (54)
2 4
k=−∞
∞ k n−k
X 1 1
= u(n − k) (55)
2 4
k=0
n k n−k
X 1 1
= (56)
2 4
k=0
n
n X
1
= 2k (57)
4
k=0
1 1 − 2n+1
n
= n≥0 (58)
4 1−2
" n n #
1 1
= 2· − u(n) (59)
2 4
X 8 X X 4
y(n) = = x(k) h(l) = 2 · (60)
n
3 3
k l
Solution 2.17
6 5 4 3 2 1 0 0
1 6 5 4 3 2 1 0 0
a) 1 6 5 4 3 2 1 0 0
1 6 5 4 3 2 1 0 0
1 6 5 4 3 2 1 0 0
n o
y(n) = 6 11 15 18 14 10 6 3 1
6 5 4 3 2 1 0 0
1 6 5 4 3 2 1 0 0
b) 1 6 5 4 3 2 1 0 0
1 6 5 4 3 2 1 0 0
1 6 5 4 3 2 1 0 0
n o
y(n) = 6 11 15 18 14 10 6 3 1
12
n o
c) y(n) = 1 2 2 2 1
n o
d) y(n) = 1 2 2 2 1
Solution 2.21
a) Om a , b:
∞
X
y(n) = bk u(k)an−k u(n − k) (61)
k=−∞
n !k
X b
= an (62)
a
k=0
n+1
1 − ba
= an (63)
1 − ba
an+1 − bn+1
= n≥0 (64)
a−b
Om a = b:
n
X
y(n) = an 1k = an · (n + 1) n ≥ 0 (65)
k=0
n o
b) y(n) = 1 1 −1 0 0 3 3 2 1
Solution 2.35
a) Parallel and serial connection:
b)
1 5 5
h(n) = δ(n) + δ(n − 1) + 2δ(n − 2) + u(n − 3) (69)
2 4 2
13
d)
1 5 5
h(n) = δ(n) + δ(n − 1) + 2δ(n − 2) + u(n − 3) (71)
2 4 2
∞ ∞
X 1 5 5X
|h(n)| = + + 1=∞ system is unstable (72)
n=−∞
2 4 2
n=0
Solution 2.61
• For rxx (l):
X 0 +N
nX 0 +N
nX
rxx (l) = x(n)x(n − l) = x(n − l) = 1 = 2N − l + 1 l ≥ 0 (73)
n n=n0 −N n=n0 −N +l
X 0 +N
nX +N +l
n0X
rxx (l) = x(n)x(n − l) = x(n − l) = 1 = 2N + l + 1 l ≤ 0 (74)
n n=n0 −N n=n0 −N
Solution 2.62
a) rxx (l) =n x(n) ∗ x(−n) o n o
x(n) = 1 2 1 1 and x(−n) = 1 1 2 1
n o
rxx (l) = 1 3 5 7 5 3 1
Solution 2.64
14
Låt r1 1 och r2 1:
Solution N3.1
a) Utilizing the linearity and time shifting properties of the z-transform, in the z-domain the difference equation
becomes
1
u(n) ↔ (88)
1 − z−1
yields
5
X(z) = (89)
1 − z−1
The final result of Y (z) becomes
5 1 1
Y (z) = =5 (90)
1 − z−1 1 + z−1 1 − z−2
b) To perform an inverse z-transform, Y(z) should be expressed in individual easy-to-transform terms. This can
be done via a partial fraction. First, the fraction is extended by z2 , after which both sides are divided by z:
Y (z) z
=5 2 (91)
z z −1
The poles of Y (z) are given by setting the denominator to 0:
z2 − 1 = 0 (92)
z1 = 1 (93)
z2 = −1 (94)
Y (z) z A A
=5 = 1 + 2 (95)
z (z − 1)(z + 1) z − 1 z + 1
5z = A1 (z + 1) + A2 (z − 1) (96)
z=1: (97)
5 = A1 (1 + 1) + A2 (1 − 1) (98)
5
A1 = (99)
2
z = −1 : (100)
− 5 = A1 (−1 + 1) + A2 (−1 − 1) (101)
5
A2 = (102)
2
15
Y (z)/z becomes
5 5
Y (z)
= 2 + 2 (103)
z z−1 z+1
By multiplying both sides with z, followed by reducing both fractions with z, we get
5 5
5 1 1
2 2
Y (z) = + = + (104)
1 − z−1 1 + z−1 2 1 − z−1 1 + z−1
These terms conform to tabular inverse z-transform as such:
1
u(n) ↔ (105)
1 − z−1
1
an u(n) ↔ (106)
1 − az−1
This gives the final result
5 5
u(n) + (−1)n u(n) = 1 + (−1)n u(n)
y(n) = (107)
2 2
Try to check the value of y(n) for the first few n:s, so that the original differential equation and the final equation
are equivalent.
Solution N3.2
a) Utilizing the linearity and time shifting properties of the z-transform, in the z-domain the difference equation
becomes
2 1
Y (z) − z−1 Y (z) − z−2 Y (z) = X(z) (108)
3 3
Solving for Y (z) yields
1
Y (z) = X(z) = H(z)X(z) (109)
1 − 23 z−1 − 31 z−2
1
H(z) = (110)
1 − 23 z−1 − 31 z−2
This expression should be expressed as individual easy-to-transform terms in order to determine h(n). This can be
done with a partial-fraction expansion. First, the poles of H(z) should be found. The expression is extended by z2 ,
and both sides are divided by z:
H(z) z
= (111)
z z2 − 32 z − 13
The poles are found by setting the denominator in the right-hand expression to zero.
2 1
z2 − z − = 0 (112)
3 3
Solving for z yields
z1 = 1 (113)
1
z2 = − (114)
3
Thus
H(z) z
= (115)
z (z − 1)(z + 31 )
16
Which should be expressed in the form of
H(z) z A A
= 1
= 1 + 21 (116)
z (z − 1)(z + 3 ) z − 1 z + 3
Multiplying both sides with the denominator of the middle yields
1
z = A1 (z + ) + A2 (z − 1) (117)
3
Inserting the pole values readily produces A1 and A2 :
1
z=1: 1 = A1 (1 + ) + A2 (1 − 1) (118)
3
3
A1 = (119)
4
1 1 1 1 1
z=− : − = A1 (− + ) + A2 (− − 1) (120)
3 3 3 3 3
1
A2 = (121)
4
Having A1 and A2 , we move back to the partial-fraction expression
H(z) A A
= 1 + 21 (122)
z z−1 z+
3
To achieve a transformable form, both sides are first multiplied with z, both fractions are reduced by z, and lastly
A1 and A2 are moved in front of their respective terms:
1 1
H(z) = A1 + A2 (123)
1 − z−1 1 + 13 z−1
Due to the linearity of the z-transform, the right-hand terms can be transformed individually. Both correspond to
the table transformation:
1
u(n) ↔ (124)
1 − z−1
1
an u(n) ↔ (125)
1 − az−1
Thus
n
1
h(n) = A1 u(n) + A2 u(n) (126)
3
Inserting A1 and A2 and a slight restructuring yields the final result:
3 1 1 n
!
h(n) = + u(n) (127)
4 4 3
Solution 3.1
a) The z-transform is defined as
∞
X
X(z) ≡ x(n)z−n (128)
n=−∞
The signal is finite, starting at n = −5 and ending at n = 2. The z-transform can thus be written as
2
X
X(z) = x(n)z−n (129)
n=−5
Compute all individual terms:
n −5 −4 −3 −2 −1 0 1 2
x(n) 3 0 0 0 0 6 1 −4 (130)
x(n)z−n 3z5 0 0 0 0 6z0 = 6 z−1 −4z−2
Add the terms together to produce the final result:
X(z) = 3z5 + 6 + z−1 + −4z−2 (131)
17
b) Utilizing a step function, the signal can be expressed as
1
x(n) = ( )n u(n − 5) (132)
2
Plugging this into the z-transform definition yields
∞
X 1
X(z) = ( )n z−n (133)
2
n=5
Simplifying it gives
∞
X 1
X(z) = ( z−1 )n (134)
2
n=5
(The original signal description can also be plugged into the definition, case by case, yielding the same: X(z) =
4 ∞ ∞
0n z−n + ( 12 )n z−n = ( 21 z−1 )n )
P P P
n=−∞ n=5 n=5
As the signal has no upper bound, the individual terms cannot be manually added together. However, due to the
geometrical fraction ( 12 z−1 )n , it is recognized as a geometric sum. Additionally, since the fraction is between −1
and 1, it converges.
Writing out the terms gives
1 1 1
X(z) = ( z−1 )5 + ( z−1 )6 + ( z−1 )7 + ... (135)
2 2 2
A geometric sum can be solved by finding a similar geometric sum – with an identical fraction but a different
starting term – and then reducing the original sum with the latter sum. Finding such a sum can be done by simply
multiplying the original sum with its geometrical fraction, as such:
1 1 1 1
X(z)( z−1 ) = ( z−1 )6 + ( z−1 )7 + ( z−1 )8 + ... (136)
2 2 2 2
Then, taking the difference, gives
1 1
X(z) − X(z)( z−1 ) = ( z−1 )5 (137)
2 2
as all other terms cancel each other out (which works due to that the fraction approaches zero as n moves to infinity,
if it were a finite signal the very last term of the second sum would remain as well).
Breaking out X(z) gives the final result:
( 1 z−1 )5
X(z) = 2 1 (138)
1 − 2 z−1
Solution 3.2
a) Since the z-transform enjoys the linearity property, the terms of x(n) can be transformed separately. Expanding
x(n) gives
Via table:
1
u(n) ↔ (140)
1 − z−1
and
az−1
nan u(n) ↔ (141)
(1 − az−1 )2
1 z−1
X(z) = + (142)
1−z −1 (1 − z−1 )2
18
(For a non-formulaic transformation, the first term can readily be transformed using the geometric sum method
used in 3.1b; how to transform the second term is shown in example 2.7 in the book.)
Simplifying the expression gives the z-transform result:
1
X(z) = (143)
(1 − z−1 )2
To retrieve the poles and zeros, the denominator is first expanded, as such
1
X(z) = (144)
1 − 2z−1 + z−2
Then, the expression is extended according to the polynomial order:
z2
X(z) = 2 (145)
z − 2z + 1
Set the numerator and denominator to zero, to obtain the zeros and poles, respectively:
Setting the numerator and denominator to zero, gives that there is a zero at z = 0 and a pole at z = − 12
f) In order to perform a formulaic z-transform of x(n) the phase shift is removed using the trigonometric formula
cos(α + β) = cos α cos β − sin α sin β (152)
x(n) becomes
x(n) = Ar n (cos(ω0 n) cos φ − sin(ω0 n) sin φ)u(n) (153)
1 − az−1 cos ω0
an cos(ω0 n)u(n) ↔ (155)
1 − 2az−1 cos ω0 − a2 z−2
az−1 sin ω0
an sin(ω0 n)u(n) ↔ (156)
1 − 2az−1 cos ω0 − a2 z−2
X(z) then becomes (A, cos φ and sin φ are carried through unchanged):
19
The numerator is set to zero to find the zeros:
The trigonometric formula used earlier can be used again in reverse on the second term:
z z cos φ − r cos(ω0 + φ) = 0 (162)
r cos(ω +φ)
0
Zeros are at z = 0 and z = cos φ
The denominator is set to zero to find the poles:
9 n
X 1
X(z) = z−n (166)
2
n=0
1
0 = z10 − z9 (170)
2
1
= z9 (z − ) (171)
2
There are 9 poles at z = 0 and 1 pole at z = 12 . Note however that the zero of z = 21 and the pole of z = 12 cancel each
other out. Thus, zeros are at z = 12 ej2πk/10 , for k = 1...9 and 9 poles are at z = 0.
Solution 3.8
a) That a signal output is the sum of all previous inputs of the signal, can be expressed as a convolution of the
signal with a unit step:
n
X ∞
X
y(n) = x(k) = x(k)u(n − k) = x(n) ∗ u(n) (172)
k=−∞ k=−∞
20
Thus, by using the convolution property of the z-transform, we get
Since
1
u(n) ↔ (174)
1 − z−1
the final result is
1
Y (z) = X(z) (175)
1 − z−1
Since
We get
n
X n
X
u(n) ∗ u(n) = u(k)u(n − k) = 1 (179)
k=0 k=0
Since
1
u(n) ↔ (181)
1 − z−1
the z-transform becomes
1 1
Y (z) = (182)
1 − z−1 1 − z−1
1
= (183)
1 − 2z−1 + z−2
Solution 3.9
Given a pole or a zero at z = rejω1 , it has its complex-conjugate paired pole or zero at z = re−jω1 .
Scaling in the z-domain via table:
z = rejω1 ejω0 = rej(ω1 +ω0 ) and z = re−jω1 ejω0 = rej(−ω1 +ω0 ) (186)
21
Solution 3.14
a) X(z) is a proper rational transform and a partial-fraction can be determined as-is. First it is multiplied with
z2 .
z2 + 3z
X(z) = 2 (187)
z + 3z + 2
This is followed by dividing both sides with z (this helps due to that the individual fraction terms later will have a
maximum power of z; thus it will aid in making the terms conform to the z-transform formulas) :
X(z) z+3
= 2 (188)
z z + 3z + 2
Next the poles are found by setting the denominator to zero:
0 = z2 + 3z + 2 (189)
which gives p1 = −1 and p2 = −2. The transform is written as:
X(z) z+3 z+3 A A
= 2 = = 1 + 2 (190)
z z + 3z + 2 (z + 1)(z + 2) z + 1 z + 2
A1 and A2 can be found by first multiplying with the denominator (z + 1)(z + 2)
z + 3 = A1 (z + 2) + A2 (z + 1) (191)
A1 and A2 are then found by setting z as the poles in turn, thus eliminating either A1 or A2 :
z = p1 = −1 : (192)
− 1 + 3 = A1 (−1 + 2) + A2 (−1 + 1) (193)
A1 = 2 (194)
z = p2 = −2 : (195)
− 2 + 3 = A1 (−2 + 2) + A2 (−2 + 1) (196)
A2 = −1 (197)
Inserting A1 and A2 in the transform yields
X(z) 2 −1
= + (198)
z z+1 z+2
Multiply both sides with z1
2z −z
X(z) = + (199)
z+1 z+2
Extend the right terms with z−1
2 −1
X(z) = + (200)
1 + z−1 1 + 2z−1
These terms can readily be inverse z-transformed individually. Via table:
1
an u(n) ↔ (201)
1 − az−1
Thus
x(n) = 2(−1)n u(n) − (−2)n u(n) (202)
b) X(z) is a proper rational transform and so a partial-fraction can be produced. The fraction is extended by z2 ,
and both sides are divided by z:
X(z) z
= 2 (203)
z z − z + 0.5
The right-hand denominator is set to zero to find the poles:
z2 − z + 0.5 = 0 (204)
1 1
z= ±j (205)
2 2
22
(note that the poles are complex-conjugate). Thus we have
X(z) z z
= 2 = (206)
z z − z + 0.5 (z − ( 21 + j 12 ))(z − ( 12 − j 12 ))
A partial-fraction is sought as
z A1 A2
= + (207)
(z − ( 21 + j 12 ))(z − ( 12 − j 21 )) z − ( 12 + j 12 ) z − ( 12 − j 12 )
In order to find A1 and A2 , both sides are first multiplied with (z − ( 12 + j 12 ))(z − ( 12 − j 12 ))
1 1 1 1 1 1 1 1
z = A1 z − −j + A2 z − +j = A1 z − + j + A2 z − − j (208)
2 2 2 2 2 2 2 2
Then, the pole-values are inserted individually:
1 1
z= +j : (209)
2 2
1 1 1 1 1 1 1 1 1 1
+ j = A1 + j − + j + A2 +j − −j (210)
2 2 2 2 2 2 2 2 2 2
1
+j2 1 1
1
A1 = 2 = −j (211)
j 2 2
1 1
z= −j : (212)
2 2
1 1 1 1 1 1 1 1 1 1
− j = A1 − j − + j + A2 −j − −j (213)
2 2 2 2 2 2 2 2 2 2
1
−j2 1 1
1
A2 = 2 = +j (214)
j 2 2
(In general, it holds that a complex-conjugate pair of poles p1 = p2∗ will result in complex-conjugate coefficients
A1 = A∗2 ). We now have that
1 −j1 1 +j1
X(z) 2 2 2 2
= + (215)
z z − ( 12 + j 21 ) z − ( 12 − j 12 )
Multiplying both sides with z, followed by reducing the fractions with z, yields
1 1 1 1
2 −j2 2 +j2
X(z) = 1 1
+ 1 1
(216)
1 − ( 2 + j 2 )z−1 1 − ( 2 − j 2 )z−1
Inverse z-transforming according to
1
an u(n) ↔ (217)
1 − az−1
yields
1 1 1 1 n 1 1 1 1 n
y(n) = −j +j u(n) + +j −j u(n) (218)
2 2 2 2 2 2 2 2
1 n 1 n
" #
1 1 1 1 1 1
= −j +j + +j −j u(n) (219)
2 2 2 2 2 2 2 2
It is assumed that x(n) is real, and so the complex terms should be reducible to real ones. First they are expressed
in polar form:
" !n !n #
1 1 1 1
y(n) = √ e−jπ/4 √ ejπ/4 + √ ejπ/4 √ e−jπ/4 u(n) (220)
2 2 2 2
Then, the expression is rearranged to isolate the imaginary parts:
!n
1 1
e−jπ/4 ejnπ/4 + ejπ/4 e−jnπ/4 u(n)
y(n) = √ √ (221)
2 2
!n
1 1
ej(n−1)π/4 + e−j(n−1)π/4 u(n)
=√ √ (222)
2 2
23
According to Euler:
ejφ + e−jφ
cos φ = (223)
2
Thus
!n
1 1 π
y(n) = √ √ 2 cos (n − 1) u(n) (224)
2 2 4
!n−1
1 π
= √ cos (n − 1) u(n) (225)
2 4
c)
z−6 + z−7
X(z) = (226)
1 − z−1
By inspection it is seen that the denominator already conforms to the formulaic z-transform
1
u(n) ↔ (227)
1 − z−1
Thus, the fraction is split according to the individual terms of the numerator:
z−6 + z−7 z−6 z−7
X(z) = = + (228)
1 − z−1 1 − z−1 1 − z−1
By using the z-transform formula above, and taking into account the time-shifting property of the z-transform,
x(n) becomes
x(n) = u(n − 6) + u(n − 7) (229)
In general, improper rational transform (the numerator is a same or higher order polynomial than the denominator)
such as this X(z) can always be expressed as a polynomial added with a proper rational transform (which then can
be expressed as a partial fraction, and then can be inverse z-transformed, along with the polynomial). Such a form
can be reached using a long division, as follows:
24
d) The transform is improper and an easy modification that would help is hard to discern. Thus we perform a
long division:
2
z−2 + 1 2z−2 +1
(235)
− 2z−2 +2
−1
Thus
1
X(z) = 2 − (236)
1 + z−2
The rightmost term is now a proper rational and transform a partial-fraction expansion will be helpful. The roots
of the denominator should be found and first we expand the fraction with z−2 , and remove a z to the front of the
expression.
1 z2 z
−2
= 2 =z 2 (237)
1+z z +1 z +1
The roots of the denominator are z = ±j, and we have
z z
z 2 =z (238)
z +1 (z + j)(z − j)
z A A
= 1 + 2 (239)
(z − j)(z + j) z − j z + j
z = A1 (z + j) + A2 (z − j) (240)
z=j : (241)
j = A1 (j + j) + A2 (j − j) (242)
1
A1 = (243)
2
z = −j : (244)
− j = A1 (−j + j) + A2 (−j − j) (245)
1
A2 = (246)
2
X(z) becomes
1 1
X(z) = 2 − z 2 + 2
(247)
z−j z+j
Via table:
δ(n) ↔ 1 (249)
1
an u(n) ↔ (250)
1 − az−1
x(n) becomes
1 1
x(n) = 2δ(n) − (j)n u(n) − (−j)n u(n) (251)
2 2
25
Isolating the complex terms and writing them in polar form:
1 jnπ/2 −jnπ/2
x(n) = 2δ(n) − e −e u(n) (252)
2
According to Euler:
ejφ + e−jφ
cos φ = (253)
2
Thus
1 π π
x(n) = 2δ(n) − 2 cos(n ) u(n) = 2δ(n) − cos(n )u(n) (254)
2 2 2
g) The rational transform is improper and there is no easily discernible simple solution. A long division is
utilized until the remainder forms a proper rational transform (numerator polynom is of a lower order than the
denominator polynom):
1
4
4z−2 + 4z−1 + 1 z−2 +2z−1 +1
(255)
− z−2 +z−1 + 41
z−1 + 43
Thus
3 −1 3
1 4 +z 1 4 z−1
X(z) = + = + + (256)
4 1 + 4z−1 + 4z−2 4 1 + 4z−1 + 4z−2 1 + 4z−1 + 4z−2
The fractions could individually be partial-fraction expanded as usual, however the denominator polynoms have
double zeros (which, if not seen initially, becomes apparent when starting the partial-fraction expansion). I.e.
3
1 4 z−1
X(z) = + 2
+ (257)
−1
4 (1 + 2z ) (1 + 2z−1 )2
δ(n) ↔ 1 (258)
z−1
nan u(n) ↔ (259)
(1 − az−1 )2
as such:
1 3 −2z−1 1 −2z−1
X(z) = +− z 2
+− (260)
4 −1
8 (1 − (−2)z ) 2 (1 − (−2)z−1 )2
1 3 1
x(n) = δ(n) + − (n + 1)(−2)(n+1) u(n + 1) + − n(−2)n u(n) (261)
4 8 2
1 3
= δ(n) + (n + 1)(−2)n u(n + 1) + n(−2)n−1 u(n) (262)
4 4
which is a valid transformation. However, it can be simplified significantly. We start by trying to make the unit
step functions alike. Investigating for n = −1, shows
x(0) = 0 + 0 + 0 = 0 (263)
3 3
(n + 1)(−2)n u(n + 1) = (n + 1)(−2)n u(n) (264)
4 4
Investigating for n = 0, further shows that
1 3
x(0) = + +0 = 1 (265)
4 4
26
Thus,
3 3 3
(n + 1)(−2)n u(n) = δ(n) + (n + 1)(−2)n u(n − 1), (266)
4 4 4
and n(−2)n−1 u(n) = n(−2)n−1 u(n − 1) (267)
We then have that
3
x(n) = δ(n) + (n + 1)(−2)n + n(−2)n−1 u(n − 1) (268)
4
Simplify to final result:
3
x(n) = δ(n) + (n + 1)(−2)n + n(−2)n−1 u(n − 1) (269)
4
3
= δ(n) + (n + 1)(−2)n + n(−2)n (−2)n u(n − 1) (270)
4
3 n
= δ(n) + (−2)n (n + 1) − u(n − 1) (271)
4 2
Solution 3.16
a) As a convolution in the time domain becomes a simple multiplication in the z-domain, it is advantageous to
perform it there. First the individual signals are z-transformed. First they are modified to fit a formulaic transform.
x1 (n) becomes
n n−1+1
1 1 1 1 n−1
x1 (n) = u(n − 1) = u(n − 1) = u(n − 1) (273)
4 4 4 4
Which fits with
1
an u(n) ↔ (274)
1 − az−1
if simple scaling and a time shift of z−1 is used. Meanwhile, x2 (n) can be written as
n ! n
1 1
x2 (n) = 1 + u(n) = u(n) + u(n) (275)
2 2
1 1
and X2 (z) = + (279)
1 − z−1 1 − 21 z−1
This should be expressed in readily inverse z-transformable terms. First, the multiplication is performed
1 z−1 1 z−1
4 4
X(z) = + (281)
(1 − 41 z−1 )(1 − z−1 ) (1 − 41 z−1 )(1 − 12 z−1 )
27
These terms are individually partial-fraction expanded:
1 z−1 1 −1
Xa (z) = 4 Xb (z) = 4z
1
(1− 4 z−1 )(1−z−1 ) (1− 4 z )(1− 12 z−1 )
1 −1
1 1
Xa (z) = z 14 Xb (z) = z 14 1
(z− 4 )(z−1) (z− 4 )(z− 2 )
1 1
Xa (z) 4 A A Xb (z) B B2
z = = 11 2
+ z−1 z =
4 = 11 +
(z− 14 )(z−1) z− 4 (z− 41 )(z− 12 ) z− 4 z− 21
1 = A (z − 1) + A (z − 1 ) 1 = B (z − 1 ) + B (z − 1 ) (282)
4 1 2 4 4 1 2 2 4
z = 1 : A2 = 31 z = 21 : B2 = 1
z = 41 : A1 = − 13 z = 41 : B1 = −1
! !
− 31 1
Xa (z) = z 3
+ z−1 Xb (z) = z −11 + 1 1
z− 14 z− 4 z− 2
− 13 1
3 −1 1
= + + + (284)
1 − 41 z−1 1 − z−1 1 − 14 z−1 1 − 12 z−1
(285)
Which is inverse z-transformable according to
1
u(n) ↔ (286)
1 − z−1
1
and an u(n) ↔ (287)
1 − az−1
giving
1 1 n
n n
1 1 1
x(n) = − u(n) + u(n) − u(n) + u(n) (288)
3 4 3 4 2
1 1 n 1
n n !
1 1
= − + − + u(n) (289)
3 4 3 4 2
1 1 1 n−1
n !
1
= − + u(n) (290)
3 3 4 2
and since
n= 0 1 2 3 4 5 ...
(291)
x(n) = 0 0.5 0.5 0.4375 0.39.. 0.36.. ...
1 1 1 n−1
n !
1
x(n) = − + u(n − 1) (292)
3 3 4 2
28
Multiplication in the z-domain is equivalent to convolution in the time domain:
1 1 + z−1
X(z) = X1 (z)X2 (z) = (297)
1 − 0.5z 1 + 2z−1 + z−2
−1
1 + z−1
= (298)
(1 − 0.5z−1 )(1 + 2z−1 + z−2 )
By finding the roots of the second denominator polynomial, we factorize and get
1 + z−1
X(z) = (299)
(1 − 0.5z−1 )(1 + z−1 )2
z2
X(z) = (301)
(z − 0.5)(z + 1)
X(z) z A1 A2
= = + (302)
z (z − 0.5)(z + 1) (z − 0.5) (z + 1)
z = A1 (z + 1) + A2 (z − 0.5) (303)
2
z = −1 : A2 = (304)
3
1
z = 0.5 : A1 = (305)
3
X(z) becomes
X(z) A1 A2
= + (306)
z (z − 0.5) (z + 1)
A1 A2
X(z) = + (307)
(1 − 0.5z−1 ) (1 + z−1 )
1
an u(n) ↔ (308)
1 − az−1
Resulting in
n
1
x(n) = A1 u(n) + A2 (−1)n u(n) (309)
2
n !
1
= A1 + A2 (−1)n u(n) (310)
2
1 1 n 2
!
= + (−1)n u(n) (311)
3 2 3
1 1 n 2
!
= + cos(πn) u(n) (312)
3 2 3
29
Solution 3.35
a) yzs (n) = h ∗ x(n) when the system is at rest, that is,
1 1 − 14 z −1
Yzs (z) = H(z) · X(z) = · (314)
1 − 31 z −1 1 − 12 z −1 + 14 z −2
A B + Cz −1
=
1
+ 1 1
(315)
1− 3z −1 −1
1− 2z + 4z −2
A − 12 Az −1 + 41 Az −2 + B + Cz −1 − 13 Bz −1 − 13 Cz −2
= (316)
1 − 13 z −1 1 − 21 z −1 + 14 z −2
1
A+B = 1
A=
7
1 1 1
− A− B+C = − 6
⇒ B= (317)
2 3 4
7
1 1
3
A− C = 0
4 3 C=
28
1/7 6 1 + 1/8 z −1
= + · (319)
1 − 1/3 z −1 7 1 − 1/2 z −1 + 1/4 z −2
√ √
1 1 6 1 − 1/4 z −1 3 3 3/4 z −1
= · + · + · (320)
7 1 − 1/3 z −1 7 1 − 1/2 z −1 + 1/4 z −2 7 1 − 1/2 z −1 + 1/4 z −2
" n √
6 1 n 3 3 1 n
#
z -1 1 1 π π
Yzs (z) −→ yzs (n) = + cos n + sin n u(n) (321)
7 3 7 2 3 7 2 3
d)
1 1
y(n) = · x(n) − · x(n − 1)
2 2
π π
⇒ yzs (n) = 5 cos n u(n) − 5 cos (n − 1) u(n − 1) (322)
2 2
π
x(n) = 10 cos n u(n)
2
Solution 3.40
A causal LTI system
n
1 1 1 n−1
x(n) = u(n) − · u(n − 1) (323)
2 4 2
n
1
y(n) = · u(n) (324)
3
a) Causal in, causal out: initial value = 0.
1 z −1 1− 1 −1
1 4 4z
X(z) = − = (325)
1 − 12 z −1 1
1− 2z −1 1− 1 z −1
2
30
1
Y (z) = (326)
1 − 31 z −1
Y (z) 1 1 − 12 z −1
H(z) = = · = (327)
X(z) 1 − z −1 1 − 1 z −1
1
3 4
1 − 21 z −1 −2 3
= 7 1 z −2
= + (328)
1 − 12 z −1 + 12 1 − 31 z −1 1 − 41 z −1
" n n #
z -1 1 1
H(z) −→ h(n) = −2 +3 · u(n) (329)
3 4
7 y(n − 1) + 1 y(n − 2) = x(n) − 1 x(n − 1)
b) y(n) − 12 12 2
c) Realization:
v(n)
x(n) + + y(n)
z −1
7 −1
12 2
+
z −1
1
− 12
d)
|poles| < 1
⇒ stable (330)
h(n) causal
Solution 3.49
b)
Y + (z) − 1.5 z −1 Y + (z) + 1 + 0.5 z −2 Y + (z) + z −1 = 0
h i h i
(331)
1 1 n
!
+ z -1
Y (z) −→ yzi (n) = 2 − · u(n) (334)
2 2
c)
1 + 1 1
Y + (z) = Y (z)z −1 + y(−1) + (335)
2 2 1 − 31 z −1
1 −1 + 1 1
Y + (z) = z Y (z) + + (336)
2 2 1 − 1 z −1
3
1 1
Y + (z) = + (337)
2 1 − 12 z −1 1 − 13 z −1 1 − 12 z −1
1 − 31 z −1 + 2 7/2 −2
= =
1
+ (338)
1 − 31 z −1
1
2 1− 2z −1 1
1− 3z −1 1− 2z −1
31
7 1 n
n
z -1 1
Y + (z) −→ y(n) = · u(n) − 2 · u(n) (339)
2 2 3
d)
1 + 1 1 1
Y + (z) = Y (z)z −2 + z −1 y(−1) + y(−2) + (340)
4 4 4 1 − z −1
1 −2 + 1 1
Y + (z) = z Y (z) + + (341)
4 4 1 − z −1
1 1
Y + (z) = + (342)
4 1 − 14 z −2 1−z −1 1 − 41 z −2
1 − z −1 + 4
= (343)
4 1 − 14 z −2 1 − z −1
3 1 n
n
z -1 7 1 4
Y + (z) −→ y(n) = − · u(n) + − · u(n) + · u(n) (345)
8 2 24 2 3
Solution E3.1
A-III, B-I, C-II
The longer the distance from a pole to the unit circle, the more damped the impulse response will be. A double
pole on the unit circle gives an unstable system, which is the reason that poles should never be allowed on the unit
circle, even if the system is not explicitly unstable. An input signal pole at the same location will give an unlimited
output signal.
Solution E3.2
a)
π z −1
z
x(n) = 3 sin n u(n) −→ X(z) = 3 (346)
2 1 + z −2
1 1 1
y(n) = − y(n − 1) + x(n − 1) där y(−1) = (347)
2 5 3
1 i 1
Y + (z) = − z −1 Y + (z) + y(−1) · z + z −1 X(z)
h
(348)
2 5
− 61 3 z −2
5
Y + (z) = + (349)
1 + 12 z −1 1 + 12 z −1 (1 + z −2 )
− 61
3 −1 2 1 + 2z −1 2 1
= + z − (350)
1 + 1 z −1 5 5 1 + 1 z −1
5 1 + z −2
2 2
1 1 n
" n−1 #
6 π π 1
y(n) = − − u(n) + cos (n − 1) + 2 sin (n − 1) − − u(n − 1) (351)
6 2 25 2 2 2
√
−1 ± j 3 1
z1,2 = = e ±j2π 1/3 gives f0 = (353)
2 3
32
c) A pole on the unit circle at f1 .
N (z) = 1 + a1 z −1 + a2 z −2 = 1 − z −1 + z −2 = 0 (354)
√
1±j 3 1
z1,2 = = e ±j2π 1/6 gives f1 = (355)
2 6
Solution E3.3
3
y(n) − y(n − 1) + y(n − 2) = x(n) (356)
16
3 −2
Y (z) 1 − z −1 + z = X(z) (357)
16
1
Y (z) = · X(z) (358)
1 − 14 z −1 1 − 43 z −1
Poles:
(
1/4
p1,2 = (359)
3/4
1
Y (z) = · X(z) (360)
1 − 14 z −1 1 − 43 z −1
1 9
1 2 2 4
X1 (z) = ⇒ Y1 (z) = + − (363)
1 − 12 z −1 1 − 14 z −1 1 − 3 z −1 1 − 1 z −1
4 2
1 1 1
H ω = 2π = = 13 = 0.776e −j0.888 (364)
4 −j2π 41 3 −j2 π4 2 + j
1−e + 16 e 16
1 1 n 9 3 n
n !
1 1
y(n) = + −4 · u(n) + 0.776 sin 2π n − 0.888 (365)
2 4 2 4 2 4
Solution E3.4
1
H(z) = (366)
1 − z −1 + 0.5z −2
π
Poles: p1,2 = √1 e ±j 4
2
a)
!n
1 π π
yzi (n) = − √ cos( n) + sin( n) u(n) (367)
2 4 4
33
b)
0.5z −1 − (1 − 0.5z −1 )
" #
2
= z −1 + (369)
1 − z −1 + 0.5z −2 1 − z −1
!n
1 π π
= √ · sin n − cos n · u(n) + 2u(n) (370)
2 4 4
c)
!n−1 !n
1 π 3π 1 π π
ytr = √ cos n+ + √ · sin n − cos n (371)
2 4 4 2 4 4
1 π
= −( √ )n 2 cos n, n ≥ 0. (372)
2 4
d)
Solution E3.5
1
y(n) − y(n − 1) = x(n) (374)
4
1 1
Y (z) 1 − z −1 = X(z) where p = (375)
4 4
1 1
H(z) = ⇒ H(ω) = (376)
1 − 14 z −1 1 − 41 e −jω
For n < 0:
1 1 1 4
1
H 2π = = 1
= √ e −j arctan 4 = 0.97e −j0.24 (377)
4 1 −j2π 14 1+ 4j 17
1− 4e
1 4 4 16
y(n) = 0.97 sin 2π n − 0.24 ⇒ y(−1) = − √ · √ = − = 0.94 (378)
4 17 17 17
For n ≥ 0:
1 1 1 1 4 1 n
Y + (n) = · y(−1) = − · ⇒ y(n) = − · u(n) (379)
1 − 1/4 z −1 4 4 1 − 1/4 z −1 17 4
34
where y1 (n) represents the response of input x1 (n) while y2 (n) represents x2 (n). Regarding to y1 (n), we can calculate
it by the z transform
y1 (n) = Z −1 X1 (z)H(z)
h z−1 i
= Z −1
(1 − 0.5z−1 )(1 + 0.5z−1 )
(381)
h 1 1 i
= Z −1 −1
− −1
1 − 0.5z 1 + 0.5z
= (0.5)n − (−0.5)n
Regarding to the y2 (n), we can leverage the frequency response of the system. Since the input signal is sinusoid,
the amplitude and phase response can be calculated directly.
The frequency response of the system can be calculated as:
1 − e−jω
H(ejw ) = (382)
(1 − 0.5e−jω )(1 + 0.5ejω )
when w = π
2 , we can calculate the system response as:
π
1 − e−j 2 π
H(ejw )|w= π = π π = 0.8 + j0.8 = 1.1314∠ (383)
2
(1 − 0.5e−j 2 )(1 + 0.5ej 2 ) 4
Therefore, the second part of the output signal y2 (n) can be represented as
1 π
y2 (n) = 1.1314 sin(2π n + ) (384)
4 2
Finally the output signal is
1 π
y(n) = y1 (n) + y2 (n) = (0.5)n − (−0.5)n + 1.1314 sin(2π n + ) (385)
4 2
Solution N4.2
By applying similar method, we divide the input signal as:
1
x(n) = x1 (n) + x2 (n); x1 (n) = 0.5n−1 u(n − 1) x2 (n) = sin(2π n)
3
Then the output signal can be represented as
y(n) = y1 (n) + y2 (n) (386)
where y1 (n) represents the response of input x1 (n) while y2 (n) represents x2 (n). Regarding to y1 (n), we can calculate
it by the z transform
y1 (n) = Z −1 X1 (z)H(z)
h z−1 1 − 0.5z−1 i
= Z −1
1 − 0.5z−1 1 − z−1
(387)
h z−1 i
= Z −1
1 − z−1
= u(n − 1)
1 − 0.5e−jω
H(ejw ) = (388)
1 − e−jω
when w = 2π
3 , we can calculate the system response as:
2π
jw 1 − 0.5e−j 3
H(e )|w= 2π = = 0.75 − j0.1443 = 0.7638∠−0.19 (389)
3 −j 2π
1−e 3
35
Therefore, the second part of the output signal y2 (n) can be represented as
2
y2 (n) = 0.7638 sin(2π n − 0.19) (390)
3
Finally the output signal is
2
y(n) = y1 (n) + y2 (n) = u(n − 1) + 0.7638 sin(2π n − 0.19) (391)
3
Solution 4.8
a) This part can be solved by using the geometry sum, but we need to analyze this problem by two cases since
ej2πk/N = 1 when k = 0, ±N , ±2N , · · · = `N , ` ∈ Z.
1 − e j2πk/N ·N
=0 for k , 0, ±N , ±2N , . . .
1 − e j2πk/N
N
X −1
e jπkn/N =
(392)
n=0
N
X −1 NX−1
e j2π`N n/N =
1 = N for k = 0, ±N , ±2N , · · · = `N , ` ∈ Z
n=0 n=0
b) Here note that when k is fixed, the signal regarding to n can be plotted on the complex plane because each n
will result in a complex number.
k=1 k=2
n=2 n=1 n = 1, 4
n=3 n=0 n = 0, 3
n=4 n=5 n = 2, 5
k=3 k=4
n = 2, 5
n = 1, 3, 5 n = 0, 2, 4 n = 0, 3
n = 1, 4
k=5 k=6
n=4 n=5
n=3 n=0 n = 0, 1, 2, 3, 4, 5
n=2 n=1
36
c) Here we need to be aware that the harnomic signal can be represented by ej(2π/N )`n , where l = mk and
m = 2, 3, ...N , then by using the geometric sum, we can get:
+N −1
N1X +N −1
N1X (
N k − ` = 0, ±N , ±2N
e j(2π/N )kn · e −j(2π/N )`n = e j(2π/N )(k−`)n = (393)
0 otherwise
n=N1 n=N1
+N −1
N1X (
N k = ` (ty sk (n) = sk+N (n))
e j(2π/N )(k−`)n = (394)
0 otherwise
n=N1
Solution 4.9
a)
∞
X
X(ω) = (u(n) − u(n − 6))e −jωn (395)
n=−∞
5
X 1 − e −jω6 e−jw3 (ejω3 − e−jω3 )
= e −jωn = = ω ω ω (396)
n=0
1 − e −jω e−j 2 (ej 2 − e−j 2 )
sin(3ω) −j 5ω
= ·e 2 (397)
sin ω2
b) Let p = −n, then x(n) = x(−p) = 2−p u(p), then we can leverage the z transform, such as
1 1 1
Z {x(−p)} = Z {x(p)} = X( ) = (398)
1 − 21 z−1 z 1 − 21 z
Then we utilize the relationship between the z transform and discrete fourier transform z = ejw , we can get
easily
1
X(ω) = (399)
1 − 21 e jω
c) We first write the original signal as x(n) = (0.25)−4 (0.25)n+4 u(n + 4), then we can use the z transform so that:
1
X(z) = 256 z4 (400)
1 − 0.25z−1
Then we use the same technology, we can get:
256e j4ω
X(ω) = (401)
1 − 41 e −jω
d)
∞
X
X(ω) = (α n sin ω0 n) · u(n) · e −jωn (402)
n=−∞
∞
X α n e jω0 n − α n e −jω0 n
= · e −jωn (403)
2j
n=0
1 1
= − (404)
2j(1 − αe jω0 e −jω ) 2j(1 − αe −jω0 e
−jω )
α sin ω0 e −jω
= (406)
1 − 2α cos ω0 e −jω + α 2 e −j2ω
Observe that one alternative way for achieving the result is to calculate the z transform and get the result
immediately.
37
g)
n=2
X
X(ω) = x(n)ejωn (407)
n=−2
Solution 4.10
a)
Zπ Zπ
1 jωn 1
x(n) = X(ω)e dω = X(ω) cos(ωn) + jX(ω) sin(ωn)dω (410)
2π −π 2π −π
"Zπ #
= j X(ω) sin(ωn)dω = 0 observe that X(ω) is even function and sin(ωn) is odd function
−π
(411)
Zπ " #π
2 1 sin(ωn)
= 1 · cos(ωn)dω = (412)
2π ω0 π n ω 0
b)
1 1
X(ω) = cos2 ω = + · cos 2ω (414)
2 2
1 1 jω2 1 −jω2
= + ·e + ·e (415)
2 4 4
∞
X
= x(n)e −jωn only the terms with n = 0, −2, 2 exist (416)
n=−∞
1 1 1
x(n) = δ(n) + δ(n + 2) + δ(n − 2) (417)
2 4 4
Solution 4.12
c) Multiplication with e jωc n in the time domain gives a shift ωc in the frequency domain.
Let XL (ω) be an idela low pass filter with a cutoff frequency W /2 and amplitude 2.
sin( W
Z W /2
1 2 n)
2e jωn dω = 2 ·
xL (n) =
2π −W /2 πn
⇒ F {xL (n) · 2 cos ωc n} = X(ω) (418)
2 cos ωc n = e jωc n + e −jωc n
This means
sin W2 n
x(n) = 4 · · cos ωc n (419)
πn
38
Solution 4.14
x(n)e−iωn , the result is
P
a) This is the sum of all the signals, since we can get from the definition that X(ω) =
therefore X(0) = −1.
b) This one I do not think it can completely avoid calculation, we can discuss this later, the result is
arg X(ω) = π [X(ω) real and negative for all ω]
Zπ
c) Here since x(n) = 2π 1 X(ω)ejωn dω by definition, then let n = 0. Because we have already known the value
−π Zπ
x(0), it is easy to get the result: X(ω)dω = −6π
−π
P+∞
d) By definition X(π) = n=0 x(n)ejωn = x(0) − x(1) + x(2) − x(−1) + x(−2). Then we can get result as: X(π) = −9
Zπ X
e) |X(ω)|2 dω = 2π |x(n)|2 = 38π [seeP arseval 0 sf ormula]
−π n
Solution 5.2
a)
∞
X
WR (ω) = wR (n)e −jωn (420)
n=−∞
M
X 1 − e −jω(M+1)
= e −jωn = (421)
n=0
1 − e −jω
e −jω(M+1)/2 e jω(M+1)/2 − e −jω(M+1)/2
= · (422)
e −jω/2 e jω/2 − e −jω/2
(M+1)
sin ω 2
= e −jωM/2 · (423)
sin ω
2
M=5
20
15
10
−0.5 −0.4 −0.3 −0.2 −0.1 0 0.1 0.2 0.3 0.4 0.5
M = 10
20
15
10
−0.5 −0.4 −0.3 −0.2 −0.1 0 0.1 0.2 0.3 0.4 0.5
39
M = 20
20
15
10
−0.5 −0.4 −0.3 −0.2 −0.1 0 0.1 0.2 0.3 0.4 0.5
b)
where
1 n = 0... M
(
wR (n) = 2 −1 (425)
0 f.ö.
M sinω M
4
WR (ω) = e−jω( 2 −1)/2 (426)
sin( ω
2)
M sin2 ω M
4
WT (ω) = WR (ω) · WR (ω) e −jω = e −jω 2 (427)
sin2 ω
2
Solution 5.17
a) According to the block diagram, the collection of formulas
By using the definition of the impulse response, if we input a delta function to the system, the output gives
h i
φ(ω) = arg 1 − 2 cos ω0 e −jω + e −j2ω (435)
40
ω0 = π
3
3
−0.5 −0.4 −0.3 −0.2 −0.1 0 0.1 0.2 0.3 0.4 0.5
c)
π π
x(n) = 3 cos n+ −∞ < n < ∞ (438)
3 6
Here keep in mind that the system response to sinosoid signals can be shown as the phase shift and the the
scaling of the amplitude, which can be calculated from the transfer function.
π π π π
y(n) = 3 · H · cos n + + φ −∞ < n < ∞ (439)
3 3 6 3
√ !2
s
1 2
π H π = 1 + e j2 π/3 = 3
ω0 = ⇒ 1− + =1 (440)
2 3 2 2
π π π π
φ =− ⇒ y(n) = 3 cos n− −∞ < n < ∞ (441)
3 3 3 6
Solution 5.25
Plot |X(f )| with MATLAB. Here keep in mind that the response will be boosted when the digital frequency is closed
to poles and attenuated when the digital frequency is closed to zeros.
Pole zero 1
−0.5 −0.4 −0.3 −0.2 −0.1 0 0.1 0.2 0.3 0.4 0.5
Pole zero 2
−0.5 −0.4 −0.3 −0.2 −0.1 0 0.1 0.2 0.3 0.4 0.5
41
Pole zero 3
2
1.5
0.5
−0.5 −0.4 −0.3 −0.2 −0.1 0 0.1 0.2 0.3 0.4 0.5
Pole zero 4
10
−0.5 −0.4 −0.3 −0.2 −0.1 0 0.1 0.2 0.3 0.4 0.5
Solution 5.26
Here one way to design the transfer function for the system can be shown as:
π π
(z − e−j 4 )(z − ej 4 )
W (z) =
z2
π π (442)
= (1 − e−j 4 z−1 )(1 − ej 4 z−1 )
√
= 1 − 2z−1 + z−2
π n √ o
ω0 = ⇒ h(n) = 1 − 2 1 (443)
4
√1 √1 − √1 − √1
n o
x(n) = 0 1 0 −1 ... (444)
2 2 2 2
√1
n o
y(n) = 0 0 0 0 ... (445)
2
Solution 5.35
I think here I want to suggest a better solution, which is easier to understand.
The transfer function can be shown as
3π 3π
(z − e−j 4 )(z − ej 4 )
W (z) = G (446)
(z − 12 )2
42
Solution 5.39
1−a 1−a
H1 (ω) = ⇒ |H1 (0)| = =1 (447)
1 − ae −jω 1−a
1 1
|H1 (ω3dB )| = |H(0)| · √ = √ (448)
2 2
(1 − a)2 1 4a − a2 − 1
|H1 (ω3dB )|2 = = ⇒ ω3dB = arccos (449)
|1 − a cos ω3dB + aj sin ω3dB |2 2 2a
1 − a 1 + e −jω 1−a 2
H2 (ω) = · ⇒ |H2 (0)| = · =1 (450)
2 1 − ae −jω 2 1−a
Pole zero 1
1
0.8
0.6
0.4
0.2
−0.5 −0.4 −0.3 −0.2 −0.1 0 0.1 0.2 0.3 0.4 0.5
Solution E4.1
Choose zeros in z = j, z = −j, and z = −1. This gives H(z) = b0 (1 + z −1 + z −2 + z −3 ). If the constant amlitude is 1, we
get b0 = 1/4 and b0 = b1 = b2 = b3 = 0.25.
1 sin(2ω) 1 3 1
|H(ω)| = · = · cos ω + cos ω (452)
4 sin(ω/2) 2 2 2
3
arg H(ω) = − ω + π om π/2 < ω < π (453)
2
H(ω) periodical.
Solution E4.2
z 2D + zD + 1
H(z) = 1 + z −D + z −2D = (454)
z 2D
43
Solution E4.3
a) y(n) = x(n) + 0.9x(n − D) gives h(n) = δ(n) + 0.9δ(n − D)
D
b) H(z) = 1 + 0.9z −D = z +0.9
D with D = 500 gives 500 poles in origo. Zeros:
Z
Solution E4.4
sin 4ω
|H(f )| = (458)
sin ω/2
Multiplication with cos(2πn/8) moves the spectrum ±1/8. H(f ) blocks all frequencies except f = 0 (draw the
spectra). This gives y(t) = 4 cos(2π1000t)
Solution N4.3
50 ∗ 2π = 2π rad in the z-domain. A notch filter can be
a) 50 Hz in the time domain represents a frequency of 44100 882
described as such:
(1 − ejω z−1 )(1 − e−jω z−1 )
H(z) = (459)
(1 − rejω z−1 )(1 − re−jω z−1 )
Where ω is the frequency to be suppressed, and r is the radius of the poles. Thus our filter can be written as
2π 2π
(1 − ej 882 z−1 )(1 − e−j 882 z−1 )
H(z) = 2π 2π
(460)
(1 − 0.9ej 882 z−1 )(1 − 0.9e−j 882 z−1 )
3000 ∗ 2π = 2π rad. The new notch filter then becomes:
b) 44100 14.7
2π 2π
(1 − ej 14.7 z−1 )(1 − e−j 14.7 z−1 )
Hn (z) = 2π 2π
(461)
(1 − 0.9ej 14.7 z−1 )(1 − 0.9e−j 14.7 z−1 )
Adding a filter to an existing filter is equivalent with multiplying them in the z-domain. The new filter becomes
2π 2π 2π 2π
(1 − ej 882 z−1 )(1 − e−j 882 z−1 ) (1 − ej 14.7 z−1 )(1 − e−j 14.7 z−1 )
H(z) = 2π 2π
· 2π 2π
(462)
(1 − 0.9ej 882 z−1 )(1 − 0.9e−j 882 z−1 ) (1 − 0.9ej 14.7 z−1 )(1 − 0.9e−j 14.7 z−1 )
Sampling
Solution E4.5
Observe that this problem shows the importance of applying antialiasing filter before sampling especially when
we work with the signal has infinite frequency spectrum range, such as this signal.
a)
xa (t) = e −10t u(t) (463)
By using the standard analog fourier transform definition, we can show that the spectrum is:
Z∞ ∞
−(10+j2πF)t e −(10+j2πF)t
Xa (F) = e dt = (464)
0 −(10 + j2πF)
0
1
= (465)
10 + j2πF
1
|Xa (F)|2 = (466)
102 + (2πF)2
44
b) If we use a antialiasing filter observe that all of the frequency above 50Hz should be blocked, observe that
we should calculate the energy at both negative frequency and positive frequency side, since the energy at
negative frequency part still contributes the total signal energy according to pasaval theorem. Therefore, the
blocked energy can be calculated as:
Z −50 Z∞
Es = |Xa (F)|2 dF + |Xa (F)|2 dF (467)
−∞ 50
Z∞
1
=2 2 + (2πF)2
dF (468)
50 10
1 F ∞
= 2· arctan 2π (469)
10 · 2π 10 50
1 π
= − 1.539 (470)
10π 2
Total energy:
Z +∞ π − 1.539
1 π
Etot = |Xa (F)|2 dF = · ⇒ the blocked fraction is 2 π ≈ 2% (471)
−∞ 10π 2 2
Applying standard DTFT to signal ya (n), we can get the spectrum Y (f ) as:
∞
X
−10n/100 −j2πf n
1
|Y (f )| = e e = (473)
n=0 1 − e −0.1 e −j2πf
1 1
=q =p (474)
(1 − e −0.1 cos(2πf )2 ) + (e−0.1 )2 sin2 2πf 1.8187 − 1.8096 cos 2πf
With filter: Observe that here since the frequency components above 50Hz are removed, the formula (1.16)
See course book page 399) holds, therefore:
1 1
Ỹ (f ) = Fs |Xa (F)| = Fs · p =p . (475)
100 + (2πf Fs )2 0.01 + (2πf )2
Ỹ (f ) |Y (f )|
f =0 10 10.5
f = 0.25 0.64 0.74
f = 0.5 0.32 0.53
Solution E4.6
This problem gives the insight of viewing the sampling process at frequency domain. It is important to understand
the relationship between analog frequency, sampling frequency and digital frequency.
First since the input signal has frequency component at F0 = 600Hz, the spectrum can be plotted by Fig 1. After
F
sampling, since here Fs > 2 ∗ F0 , therefore all the analog frequency components above 2s = 500Hz (below -500Hz)
F
will be folded back with the centre of 2s = 500Hz, which plots figure 2.
Then the signal multiplies (−1)n , which is equivalent to multiply x1 (n) = cos(πn), according to the modulation
property (formula on Course book Page 296), the frequency spectrum is shifted and then we can get Fig 3.
Then the signal is upsampled by a factor of 2, which means that the spectrum is compressed with a factor of 2.
Observe that the spectrum outside the range [-0.5 0.5] is visible after this compression, which generates Fig 4.
The final step we construct the signal with constructing frequency Fs = 1000Hz, which generates Fig 5.
45
Fig.1 Spectrum for the signal xa (t)
1
0.8
0.6
0.4
0.2
0.8
0.6
0.4
0.2
0.8
0.6
0.4
0.2
0.8
0.6
0.4
0.2
0.8
0.6
0.4
0.2
46
Solution 7.1
If x(n) is real |X(ω)| is an even function, and arg(X(ω)) is an odd function. X(ω) is always a periodical function
with the period 2π. This is true even when X(ω) is sampled to X(k) and the period for discrete signal X(k) is N = 8
(eight-point DFT) This means that when
X(k) = X ∗ (N − k) (476)
X(0) = 0.25 (477)
X(1) = 0.125 − j0.3018 (478)
X(2) = 0 (479)
X(3) = 0.125 − j0.0518 (480)
X(4) = 0 (481)
we have
Solution 7.2
PN −1
a) x(n) = x1 x2 = k=0 x1 (k)x2 (n − k modN )where N = 8
47
Solution 7.3
x(n) is low pass filtered when some values in X(k) are set to zero, because the k-values between kc and N − kc
represent high frequencies from ω = π (the hightest frequency) and down to 2πkc /N . The frequencies ω = π up to
2π(N − kc )/N represent the periodicity.
Solution 7.4
a) N2 · sin 2πN n
b) − N2 · sin 2πN `
c) N2 · cos 2πN `
d) N2 · cos 2πN `
Solution 7.7
1) Xc (k) = 12 [X((k − k0 ))N + X((k + k0 ))N ]
1 [X((k − k )) − X((k + k )) ]
2) Xs (k) = 2j 0 N 0 N
Solution 7.8
Circular convolution: make one signal periodic and compute the convolution as usual.
n o
x1 = . . . 1 2 3 1 1 2 3 1 . . . (502)
n o
x2 = 4 3 2 2 (503)
2 3 1 1 2 3 1
4 8 12 4 4 8 12 4
3 6 9 3 3 6 9 3
2 4 6 2 2 4 6 2
2 4 6 2 2 4 6 2
Then y = x1 x2 :
y(0) = 4 · 1 + 3 · 1 + 2 · 3 + 2 · 2 = 17 (504)
y(1) = 4 · 2 + 3 · 1 + 2 · 1 + 2 · 3 = 19 (505)
y(2) = 4 · 3 + 3 · 2 + 2 · 1 + 2 · 1 = 22 (506)
y(3) = 4 · 1 + 3 · 3 + 2 · 2 + 2 · 1 = 19 (507)
n o
yc = 17 19 22 19 (508)
For linear convolution The convolution between x1 (n) and x2 (n) yields yl (n)of length 7,
y l = x1 ∗ x2 :
n o
x1 = 1 2 3 1 (509)
n o
x2 = 4 3 2 2 (510)
48
1 2 3 1
4 4 8 12 4
3 3 6 9 3
2 2 4 6 2
2 2 4 6 2
y(0) = 4 (511)
y(1) = 4 · 2 + 3 · 1 = 11 (512)
y(2) = 4 · 3 + 3 · 2 + 2 · 1 = 20 (513)
y(3) = 4 · 1 + 3 · 3 + 2 · 2 + 2 · 1 = 19 (514)
y(4) = 3 · 1 + 2 · 3 + 2 · 2 = 13 (515)
y(5) = 2 · 1 + 2 · 3 = 8 (516)
y(6) = 2 · 1 = 2 (517)
n o
yl = 4 11 20 19 13 8 2 (518)
n o
yc = 17 19 22 19 (519)
n o
yl = 4 11 20 19 13 8 2 (520)
n o
yc = yl (0) + yl (4) yl (1) + yl (5) yl (2) + yl (6) yl (3) + yl (7) (521)
Solution 7.9
n o
x1 (n) = 1 2 3 1 (522)
n o
x2 (n) = 4 3 2 2 (523)
3
X
X(k) = DFT {xn } = xn e −j2πnk/4 k = 0...3 (525)
n=0
X3 (0) = 77 (531)
X3 (1) = −5 (532)
X3 (2) = 1 (533)
X3 (3) = −5 (534)
49
3
1 X
x(n) = IDFT {X(k)} = X(k)e j2πnk/4 n = 0 . . . 3 (535)
4
k=0
x3 (0) = 17 (536)
x3 (1) = 19 (537)
x3 (2) = 22 (538)
x3 (3) = 19 (539)
Solution 7.10
!
2πk0 n
x(n) = cos 0 ≤ n ≤ N −1 (540)
N
4πk0
−1 1 + cos
N n
N −1 N −1 ! N
X X 2πk0 X
Ex = |x(n)|2 = cos2 n = (541)
N 2
n=0 n=0 n=0
(542)
For k0 = 2i where i = 0, 1, 2, . . .:
!
4πk0
cos n = cos (2πi.n) = 1 (543)
N
Ex = N (544)
(545)
Otherwise:
4πk0
−1 cos
N n
N −1 N
X 1 X
Ex = + (546)
2 2
n=0 n=0
N −1 !
N 1X 4πk0
= + cos n (547)
2 2 N
n=0
N −1
N 1 X e j4πk0 n/N + e −j4πk0 n/N
= + (548)
2 2 2
n=0
N −1 N −1
N 1 X j4πk0 n/N X −j4πk0 n/N
= + ( e + e ) (549)
2 4
n=0 n=0
N 1 1 − e
j4πk 0 N /N 1−e −j4πk 0 N /N N
= + · + = (550)
2 4 1 − e j4πk0 /N 1−e −j4πk 0 /N 2
| {z } | {z }
=0 =0
N 1 1 − e
j4πkN /N 1−e −j4πkN /N N
Ex = + · + = (551)
2 4 1 − e j4πk/N 1−e −j4πk/N 2
| {z } | {z }
=0 =0
50
Solution 7.11
X (k) for k = 0 . . . 7 is given.
k
X (k) = X(k)e −j2π· 8 ·5
x1 (n) = x(n − 5 mod 8)
1
⇒ (552)
X2 (k) = X(k)e −j2π· 8k ·2
x (n) = x(n − 2 mod 8)
2
Solution 7.18
Y (k) = H(f ) where f = Nk .
Solution 7.23
N
X −1
X(k) = x(n)e −j2πkn/N k = 0, 1. . . . N − 1
n=0
N
X −1 j2πk×0
a) X(k) = δ(n)e −j2πkn/N = e − N =1
n=0
N
X −1
b) X(k) = δ(n − n0 )e −j2πkn/N = e −j2πkn0 /N k = 0, . . . , N − 1
n=0
c)
N
X −1
X(k) = an e −j2πkn/N (553)
n=0
N
X −1
= (ae −j2πk/N )n (554)
n=0
1 − (a)N e −j2πkN /N
= k = 1, . . . , N − 1 (555)
1 − ae −j2πk/N
1 − aN
= (556)
1 − ae −j2πk/N
d)
0 ≤ n ≤ N2 − 1
(
1
x(n) = N ≤ n ≤ N −1 N even (557)
0 2
NX
/2−1
X(k) = e −j2πkn/N = {k , 0} (558)
n=0
N
X(0) = (561)
2
51
2π
e) x(n) = e j N k0 n ⇒ X(k) = N · δ(k − k0 )
N
X −1
X(k) = (e j2πk0 n/N × e −j2πkn/N ) = (562)
n=0
N
X −1
= e j2π(k0 −k)n/N = {k , k0 } (563)
n=0
X(k0 ) = N (566)
X(k) = N δ(k − k0 ) (567)
f) x(n) = cos
2πk0 e j2πk0 n/N +e −j2πk0 n/N
N n = 2
2π
e j N k0 n ⇒ N · δ(k − k0 ) (568)
2π
e −j N k0 n ⇒ N · δ(k − (N − k0 )) (569)
N
X(k) = (δ(k − k0 ) + δ(k − (N − k0 ))) (570)
2
g) x(n) = sin
2πk0 e j2πk0 n/N −e −j2πk0 n/N
N n = 2j
2π
e j N k0 n ⇒ N · δ(k − k0 ) (571)
2π
e −j N k0 n ⇒ N · δ(k − (N − k0 )) (572)
N
X(k) = (δ(k − k0 ) − δ(k − (N − k0 ))) (573)
2j
1 1 N
= (1 + (−1)n ) = (e j2π(0)n/N + e j2π( 2 )n/N ) (575)
2 2
2π
e j N 0n ⇒ N · δ(k) (576)
2π N n N
e −j N 2 ⇒ N · δ(k − ) (577)
2
N N
X(k) = δ(k) + δ k − (578)
2 2
Solution 7.24
52
Solution 7.25
a)
n o
x(n) = 1 2 3 2 1 0 (580)
∞
X
X(ω) = x(n)e −jωn = e j2ω + 2e jω + 3 + 2e −jω + e −j2ω = (581)
n=−∞
b)
n o
v(n) = 3 2 1 0 1 2 (583)
5
X k
VDFT (k) = v(n)e −j2π 6 n (584)
n=0
π 2π 4π 5π
= 3 + 2e −j 3 k + e −j 3 k + e −j 3 k + 2e −j 3 k (585)
Solution E5.1
n o
Let x1 (n) = 1 1 1 1 0 0 0 0 and x(n) is the circular shift of x1 (n). A shift only affects the phase.
sin 2π 4k
Thus, |X(k)| = |X1 (k)| = k
.
sin 2π 16
Solution E5.2
n o
a) y(n) = x(−n) = 0 2 2 7 8 3 1 1 .
n o
b) y(n) = x(n − 4 mod 8) = 8 7 2 2 0 1 1 3 .
Solution E5.3
1
HFIR (f ) = HIIR (f ) för f = k · since the input signal is periodical (586)
N
(587)
( !) N −1 !
k 1 X k
hFIR (n) = IDFT HFIR = HFIR · e j2π kn/N (588)
N N N
k=0
where
! ! X∞
k k
HFIR = HIIR = hIIR (m)e −j2π km/N (589)
N N
m=0
(590)
∞ N −1 ∞
1 X X X
hFIR (n) = hIIR (m) e −j2π k/N (n−m) = hIIR (n − `N ) (591)
N
m=0 k=0 `=−∞
53
Compare with aliasing
0
X 1
hFIR (n) = an−`N = an · [u(n) − u(n − N )] (592)
1 − aN
`=−∞
Solution E5.4
n o
f0 = ±138 + n · 400 = 138 262 ... .
Solution E5.5
1-C, 2-F, 3-G, 4-H.
Solution E5.6
a)
0.8
0.6
0.4
0.2
Solution E5.7
Y (k/N ) = X(k/N )
Solution E5.8
a) y(n) = δ(n) + 2 δ(n − 1) + 1.5 δ(n − 2) + 0.5 δ(n − 3)
b) See above.
c) M = 4; generally M = P + Q − 1 where P is the length of the impulse response and Q is the length of the input
signal.
54
Solution E5.9
L
X
yp (n) = bl for n = 0 . . . N − 1 (596)
l=0
Solution E5.10
The method is called overlap-and-add if the computation is done with DFT.
Signal h(n)
0
2 4 6 8 10 12 14
−2
−4
Solution E5.11
1 1 n
1−( 1 )10 ( 2 ) 0≤n≤9
y(n) = 2 (597)
0
otherwise
Solution E5.12
The figure shows how the split is done. Example with M = 4 and N = 12.
× y0 (n)
× y1 (n)
× y2 (n)
55
Realizations, Chapter 9
Solution 9.3
Choose v(n) according to the delay element, which gives
1
v(n + 1) = v(n) + x(n) (598)
2
y(n) = 2[v(n + 1) + 3x(n)] + 2v(n) = (599)
= v(n) + 2x(n) + 6x(n) + 2v(n) = (600)
= 3v(n) + 8x(n) (601)
3z −1 8 − z −1
H(z) = +8 = (603)
1 − 12 z −1 1 − 12 z −1
Solution 9.9
a)
3 1 1
y(n) = y(n − 1) − y(n − 2) + x(n) + x(n − 1) (604)
4 8 3
– Direct I: from the difference equation
– Direct II: from the collection of formulas and the difference equation
– Cascade: Z-transform of the difference equation
1 + 13 z −1
H(z) = (605)
1 − 14 z −1 1 − 21 z −1
– Parallel:
10 7
3 3
H(z) = − (606)
1 − 12 z −1 1 − 1 −1
4z
f)
1
y(n) = y(n − 1) − y(n − 2) + x(n) − x(n − 1) + x(n − 2) (607)
2
The system has complex poles, that is, the Direct form II, the cascade, and the parallel forms are equivalent.
Solution 9.15
Note! There is an error in Proakis, Third Edition, 3: a2 (2) = 31 .
1
H(z) = A2 (z) = 1 + 2z −1 + z −2 (608)
3
1 1
B2 (z) = + 2z −1 + z −2 ger K2 = α2 (2) = (609)
3 3
A2 (z) − K2 B2 (z) 1 + 2z −1 + 31 z −2 − 31 13 + 2z −1 + z −2
A1 (z) = = (610)
1 − K22
2
1 − 13
4/3 −1 3
= 1+ z = 1 + z −1 (611)
8/9 2
56
3 3
B1 (z) = + z −1 ger K1 = α1 (1) = (612)
2 2
1 + 23 z −1 − 32 32 + z −1 5/4
A0 (z) = 2 = =1 (613)
1 − 32 5/4
1 3
K2 = K1 = (K0 = 1) (614)
3 2
Solution 9.19
a)
1 1
K1 = K2 = − K3 = 1 (615)
2 3
1 1 1 1 1
A2 (z) = A1 (z) + K2 (z) · z −1 · B1 (z) = 1 + 2 z −1 − 3 z −1 · 2 + z −1 = 1 + 3 z −1 − 3 z −2
(619)
B2 (z) = − 1 + 1 z −1 + z −2
3 3
1 1 1 1
A3 (z) = 1 + 3 z −1 − 3 · z −2 + z −1 · − 3 + 3 z −1 + z −2 = 1 + z −3
B (z) = 1 + z −3
(620)
3
Zeros:
1 + z −3 = 0 (621)
z −3 = e −jπ(2k+1) (622)
z = e jπ(2k+1)/3
for k = 0, 1, 2 z = e ±j·π/3 z = −1 (623)
b)
1 1 1 1
A3 (z) = 1 + z −1 − z −2 + (−1) · z −1 · − + z −1 + z −2 (624)
3 3 3 3
2 2
= 1 + z −1 − z −2 − z −3 (625)
3 3
2 −1 2 −2
B3 (z) = −1 − z + z +1 (626)
3 3
r √
5 5 25 −5 ± j · 11
A3 (z) = (1 − z −1 ) 1 + z −1 + z −2 − ± −1 = (627)
3 6 36 6
c) If the absolute value of the last reflection coefficient is one, all zeros are on the unit circle
d) For a):
H(z) = 1 + z −3 (628)
3ω
H(ω) = 1 + e −j·3ω = e −j·3ω/2 e j·3ω/2 + e −j·3ω/2 = 2 · cos · e −j 3ω/2
(629)
2
57
π 3ω
0≤ω< → θ(ω) = − (630)
3 2
π 3ω
<ω≤π → θ(ω) = π − (631)
3 2
Linear phase (symmetrical FIR)
For b):
2 2
H(z) = 1 + z −1 − z −2 − z −3 (632)
3 3
2 −jω 2 −j2ω 3ω + π 3 2 ω
−j
H(ω) = 1 + ·e − ·e − e −j3ω = e 2 2 · 2 sin ω + sin (633)
3 3 2 3 2
All zewros are on the unit circle which means linear phase.
z3 + z2 + z + 1
H(z) = 1 + z−1 + z−2 + z−3 = (636)
z3
The three poles then are readily recognizable as
p1,2,3 = 0 (637)
To find the zeros, one zero can be guessed as
z1 = −1 (638)
The others can then be found by a long division using this zero:
z2 +1
z+1 z3 +z2 +z +1
− z3 z2
(639)
z +1
− z +1
0
Thus
z3 + z2 + z + 1 (z + 1)(z2 + 1)
H(z) = = (640)
z3 z3
And the zeroes are
z1 = −1 z2,3 = ±j (641)
b) + d) The magnitude of the system response is asked for, thus the Fourier transform of h(n) should be used.
1 3
= 2e−j3/2f cos f + cos f (646)
2 2
58
The magnitude becomes
1 3
|H(f )| = 2 cos f + cos f (647)
2 2
With this form it is easy to see for instance that |H(0)| = 4. However, seeing where for instance |H(f )| = 0 is trickier.
Another form which might make it easier can be found via geometric sum:
3
X
H(f ) = 1 + e−jf + e−j2f + e−j3f = e−jnf (648)
n=0
(649)
Which can be plugged into the geometric sum formula, however the result can easily be shown as follows:
3
X
H(f ) = e−jnf (650)
n=0
1 − e−j4f
H(f ) = [rewrite to conform with Euler] (655)
1 − e−jf
e−j2f (ej2f − e−j2f ) 2je−j2f sin 2f sin 2f
= = = e−j3/2f (656)
e−j1/2f (ej1/2f − e−j1/2f ) 2je−j1/2f sin 21 f sin 21 f
sin 2f
|H(f )| = (657)
sin 12 f
(658)
Thus |H(f )| = 0 at f = ± 41 , ± 21 .
Plotting (any version of) |H(f )| yields:
|H(f )|
4
−0.5 −0.4 −0.3 −0.2 −0.1 0.1 0.2 0.3 0.4 0.5
c)
The phase function is given by ∠H(f ):
[note that real positive values have argument 0 and real negative values argument π] (660)
1 1
−3/2f − π, − 2 < f < − 4
1
1 1
1
= −3/2f , −4 < f < 4 ,− < f < (661)
2
2
1 <f < 1
−3/2f + π,
4 2
59
∠H(f )
π
−0.5 −0.4 −0.3 −0.2 −0.1 0.1 0.2 0.3 0.4 0.5
−π
e) The filter attenuates (reduces) high frequency components, letting low frequency components “pass”, thus it is
a low-pass filter.
Solution E8.3
a)
1
y(n) = (x(n) + x(n − 1) + x(n − 2) + x(n − 3) + x(n − 4)) (662)
5
1
Y (z) = 1 + z−1 + z−2 + z−3 + z−4 X(z) (663)
5
1
H(z) = 1 + z−1 + z−2 + z−3 + z−4 (664)
5
1
h(n) = [δ(n) + δ(n − 1) + δ(n − 2) + δ(n − 3) + δ(n − 4)] (665)
5
b)
1
1 + z−1 + z−2 + z−3 + z−4
H(z) = (666)
5
i 1
H(f ) = H(z = ejf ) =
h
1 + e−jf + e−j2f + e−j3f + e−j4f (667)
5
This can be simplified by either method employed in E8.1. The geometric sum method yields:
1
H(f ) = 1 + e−jf + e−j2f + e−j3f + e−j4f (668)
5
1 −jf
e−jf H(f ) = e + e−j2f + e−j3f + e−j4f + e−j5f (669)
5
1
H(f ) − e−jf H(f ) = 1 − e−j5f (670)
5
1 1 − e−j5f 1 e−j5/2f (ej5/2f − e−j5/2f )
H(f ) = [rewrite to conform with Euler] = (671)
5 1 − e−jf 5 e−j1/2f (e−j1/2f − e−j1/2f )
−j5/2f sin 5 5
1 2je 2 1 −j3f sin 2
= = e (672)
5 2je−j1/2f sin 1 5 sin 12
2
1
−j3f sin 25 5
1 sin 2
|H(f )| = e = (673)
sin 21 5 sin 1
5 2
|H(0)| = 1
|H(f )| = 0 at f = 15 , 52 , 35 , 54
|H(f )|
60
1
0.8
0.6
0.4
0.2
Solution E8.4
Try a first order FIR filter:
Solution E8.5
Since we should have linear phase, H(z) must be 1. an FIR filter, and 2. have a symmetric or antisymmetric
impulse response h(n). Further, since h(n) should be real, all complex zeros must have a conjugate pair. Given
that H(ω = 2/5) = H(ω = −2/5) = 0, we can begin building our filter as (note that the resulting h(n) would become
symmetrical):
As the equality does not hold, H1 (z) must be appended with a gain, g1 = 1 , which would yield:
4 sin2 2π1/5
1
H2 (z) = g1 (1 − e−j2π2/5 z−1 )(1 − ej2π2/5 z−1 ) = (1 − e−j2π2/5 z−1 )(1 − ej2π2/5 z−1 ) (682)
4 sin2 2π1/5
However, the specification further states that |H(ω = 1/5)| = 1, and evaluation at ω = 1/5 yields
1 −j2π1/5 e−j2π2/5 )(1 − ej2π2/5 e−j2π1/5 ) = 0.618...
H2 (z) = 1 = (1 − e (683)
4 sin2 2π1/5
61
Thus, we instead will add more zeros to satisfy the specifications. We try to remove the gain add a conjugate pair
of zeros with radius r and phase α:
H3 (z) = (1 − e−j2π2/5 z−1 )(1 − ej2π2/5 z−1 )(1 − re−j2πα z−1 )(1 − rej2πα z−1 ) (684)
= (1 − ej2π2/5 z−1 − e−j2π2/5 z−1 + z−2 )(1 − rej2πα z−1 − re−j2πα z−1 + r 2 z−2 ) (685)
= (1 − 2 cos 2π2/5 z−1 + z−2 )(1 − 2r cos 2πα z−1 + r 2 z−2 ) (686)
[c1 = 2 cos 2π2/5, cα = 2 cos 2πα] (687)
= 1 − rcα z−1 + r 2 z−2 − c1 z−1 + rc1 cα z−2 − r 2 c1 z−3 + z−2 − rcα z−3 + r 2 z−4 (689)
However, for any r , 1, h(n) lose symmetry, and thus we set r = 1. However, since we probably (as we have seen)
need two variables to fulfill both |H(ω = 0)| = |H(ω = 1/5)| = 1, we also reintroduce a gain g2 . We have:
H4 (z) = g2 (1 − e−j2π2/5 z−1 )(1 − ej2π2/5 z−1 )(1 − e−j2πα z−1 )(1 − ej2πα z−1 ) (691)
case1 case2
1 − g1 = 4 − cα (2 − c1 ) − 2c1
g2 = 4 − cα (2 − c1 ) − 2c1 2 (695)
1 − g1 −4+2c1
g −4+2c1
cα = − 2(2−c ) cα = − 2(2−c )
1 1
62
|H4 (ω = 1/5)| = 1 = g2 (1 − e−j2π2/5 e−j2π1/5 )(1 − ej2π2/5 e−j2π1/5 )(1 − e−j2πα e−j2π1/5 )(1 − ej2πα e−j2π1/5 )
(696)
= g2 (1 − (cα + c1 )e−j2π1/5 + (2 + c1 cα )e−j2π2/5 − (c1 + cα )e−j2π3/5 + e−j2π4/5 ) (697)
= g2 e−j2π2/5 (ej2π2/5 − (cα + c1 )ej2π1/5 + (2 + c1 cα ) − (c1 + cα )e−j2π1/5 + e−j2π2/5 ) (698)
= g2 e−j2π2/5 (2 cos 2π2/5 − 2(cα + c1 ) cos 2π1/5 + 2 + c1 cα ) (699)
1 − 4g2 + 2c1 g2
= g2 c1 − (−c2 + c1 ) − c1 c2 g2 + 2g2 (704)
(2 − c1 )
1
= (g2 c1 (2 − c1 ) − (1 − 4g2 + 2c1 g2 )(−c2 + c1 ) − c1 c2 g2 (2 − c1 ) + 2g2 (2 − c1 )) (705)
2 − c1
1
= (g2 c1 (2 − c1 ) − (−c2 + c1 ) + 4g2 (−c2 + c1 ) − 2c1 g2 (−c2 + c1 ) − c1 c2 g2 (2 − c1 ) + 2g2 (2 − c1 ))
2 − c1
(706)
1
= (g (c (2 − c1 ) + 4(−c2 + c1 ) − 2c1 (−c2 + c1 ) − c1 c2 (2 − c1 ) + 2(2 − c1 )) + c2 − c1 )) (707)
2 − c1 2 1
1 1
= g2 (c1 (2 − c1 ) + 4(−c2 + c1 ) − 2c1 (−c2 + c1 ) − c1 c2 (2 − c1 ) + 2(2 − c1 )) + (c2 − c1 )
2 − c1 2 − c1
(708)
−4c2 + c1 (4 − 3c1 + c1 c2 ) + 4 c2 − c1
= g2 + (709)
2 − c1 2 − c1
case1.1 case1.2
2−c −2+2c −c (710)
g2 = −4c +c (4−3c2 +c c )+4 g2 = −4c +c (4−3c1 +c2 c )+4
2 1 1 1 2 2 1 1 1 2
1
− − 4 + 2c1
for c = − g2
α , we instead get (711)
(2 − c1 )
case2.1 case2.2
2−2c1 +c2 −2+c (712)
g2 = −4c +c (4−3c g2 = −4c +c (4−3c 2+c c )+4
2 1 1 +c1 c2 )+4 2 1 1 1 2
Choosing for instance g2 = 0.5236 and cα = 1.4721 (yielding a real angle α) gives a valid filter
63
Solution E8.7
An FIR filter with linear phase and 50 dB damping means a Hamming window. −6 dB at f = f1 = 0.1 measn that at
−50 dB and f = 0.15 we get (0.15 − 0.1) · M = 1.62
1.62
M= = 32.4 ⇒ M = 33 (716)
0.05
2π(n−16)
2 · f1 sinc(2f1 (n − 16)) · 0.54 + 0.46 cos 0 ≤ n ≤ 32
32
h(n) =
(717)
0 f.ö.
Solution E8.8
(
HdB (0.2) = −3 dB gives (0.2 − fc ) · M = −0.40
(718)
HdB (0.25) = −40 dB gives (0.25 − fc ) · M = 1.49
1.49 + 0.40
M= = 37.8 ⇒ M = 39 (odd) (719)
0.25 − 0.20
fc = 0.2 + 0.40
(
39 = 0.2103 (720)
fc = 0.25 − 1.49
39 = 0.2118
for n = 0, . . . , 38.
+ + ... + y(n)
b0 b1 b2 b38
x(n) z −1 z −1 ... z −1
Solution E8.9
From the Hamming window diagram:
( (
−0.4 = −(0.16 − fc )M M = 33
⇒ (723)
1.49 = −(0.10 − fc )M fc = 0.1479
2πn
wH (n) = 0.54 + 0.46 cos (724)
32
64
Solution E8.10
Start from an ideal band pass filter:
Truncate hd (n) using wH (n). A Hamming works becaise we only need 40 dB dampning.
2πn − M−1 M−1
(
0.54 + 0.46 cos M−1 2 ≤n≤ 2
wH (n) = (728)
0 f.ö.
Write
M −1
h(n) = ĥ n − (730)
2
WE also need to compute M, f0 , and f1 . First we look at the left side. The collection of formulas gives
(
−(0.05 − (f0 − f1 ))M = 1.49 (−40 dB) (1)
⇒ 0.05 · M = 1.89 ⇒ M = 37.8 (731)
−(0.10 − (f0 − f1 ))M = −0.4 (−3 dB) (2)
To fulfill the demand at both sides, we need M > max(37.8, 52.4): choose M = 53. Theer is also the deamdns that
at the freqeuncies 0.10 and 0.25 the damping should be 3 dB, whcih measdn that when we solve for f0 and f1 we
must use Equations (2) and (3). The M value to be used is M = 53, in both equations
( (
ekv (2) ⇒ (0.10 − (f0 − f1 )) · 53 = 0.4 f0 = 0.175
⇒ (733)
ekv (3) ⇒ (0.25 − (f0 + f1 )) · 53 = −0.4 f1 = 0.0825
Thus:
and
Solution E8.11
The center frequency is f0 = 0.2096, fc = 0.1233, and M = 41 (from the expression). This is used in
65
Solution E8.12
H(z) shoudl have linear phase. Let H2 (z) = a + bz −1 + cz −2 since first order is not enough. Calcuating H(f ) we get
linear phase if
a = cr 2 (740)
H(z) is order 4 and has a symmetrical impulse response. This gives arg(H(f )) = −4πf .
Solution E8.13
Sampling with 10 MHz gives aliasing. The overtoneds appear in 4 MHz to 5 MHz and the disturbances appear in
0 MHz to 1 MHz. This gives a band pass filter with the following demands.
0
−3
−40
A Hamming window gives L = 19, f0 = 0.275, and f1 = 0.0461. The impulse response is
!!
2π(n − 9)
h(n) = 0.54 + 0.46 cos · 4f1 sinc(2f1 (n − 9)) cos(2πf0 (n − 9)) 0 ≤ n ≤ 18 (743)
18
66