Beruflich Dokumente
Kultur Dokumente
Problem 3.1
Problem
Using the definition determine the DTFT of the following sequences. It it does not exist say why:
a) xn 0.5n un
b) xn 0.5n
c) xn 2n un
d )xn 0.5n un
e) xn 2n
f) xn 30.8n cos0.1n
Solution
X 0.5n ejn
1
10.5e
j
n0
X 0.5n ejn 0.5n ejn
n0 n1
0.5 ejn 0.5 ejn 1
n
1
10.5e
j
n
1
10.5e j 1
n0 n0
2. 0.5
1.5
which becomes
j0.1 un j0.1 un 1
n n
j0.1 n un j0.1 n un 1
xn
2 0.8 e
3
2 1.25 e
3
2 0.8 e
3
2 1.25 e
3
ej a , if a 1
DTFTan un an ejn
e j
ej a , if a 1
n0
DTFTan un 1 an ejn an ejn 1
e j
n1 n0
Therefore we obtain
X w =
jw jw jw jw
e
+
e jw -0.8e j0 .1 p
e
-
e jw -0.8e-j0 .1 p
e
-
e jw -1.25e j0 .1 p
e
e jw -1.25e-j0 .1 p
Solutions_Chapter3[1].nb 3
Problem 3.2
Problem
Given the fact that DTFT0.8n un 1 1 0.8ej and using the properties, compute
the DTFT of the following sequences:
a) xn 0.8n un 2
b) xn 0.8n uncos0.1n
c) xn n0.8n un
d) xn 0.8n un
e) xn
0.8n if 0 n 5
0 otherwise
Solution
b) xn 0.8n uncos0.1n
2 0.8 une
1 n
which yields
1
X
1
2
1
10.8ej0.1 10.8ej0.1
c) X
j
1
d
d
1
10.8e which yields
j
4.5.
20.
X
2
d) X 0.8n unejn 0.8n unejn
1
10.8e j
n0 n0
Problem 3.3
Problem
Solution
X 0, 2, 0, 2
n0
4 nk
7 7
Xk j
4 n ej
4 nk ej
4 n ej
2 e
1
4 k1n
n0 n0
7 7
j
4 k1n ej
2 e
1
n0 n0
Problem 3.4
Problem
Solution
a) xn 14
Recall DFTxn mN wN km Xk. In our case w4 ej24 j and therefore
DFTxn 14 jk Xk for k 0, ..., 3
This yields DFTxn 14 1, 1, 1, 1
b) DFTxn 34 j3k Xk 1, 1, 1, 1
where the ..4 has been inserted since Xk is periodic with period N 4. Finally
n0 n0
DFT1n xn 1, 1, 0, 1
DFTjn xn j, 1, j, 1
n0
DFTxn4
3
x0 x4 njnk
let m 4 n
n1
x0 xmj4mk
3
m1
3
x0 xmjmk
xmjmk Xk4
m1
3
Finally: DFTxn4 1, j, 1, j.
m0
Problem 3.5
Problem
Solution
n0 n0
Solutions_Chapter3[1].nb 7
Therefore DFTxnej2 8 n 1 j, 1, 1 j, 1, 0, 1, 0, 1
b) DFTn 28 ej
8 2k since DFTn 1. Therefore
2
DFTxn n 28 1, 1 j, 1, 0, 1, 0, 1, 1 j
Problem 3.6
Problem
A 4-point sequence x has DFT X 1, j, 1, j. Using the properties of the DFT determine the
DFT of the following sequences:
Solution
xnej 2 k2n Xk 24
n0
3
n0
The circular shift comes from the fact that Xk is periodic with period 4, and therefore any shift is
going to be circular. Substituting for Xk we obtain
DFT1n xn Xk 24 1, j, 1, j.
b) DFTxn 14 jk Xk
c) DFTxn n 24 j2k Xk
d) DFTxn4 Xk4 1, j, 1, j
Problem 3.7
Problem
Two finite sequences x = x0, x1, x2, x3 and h = h0, h1, h2, h3 have DFT's given by
X = DFT x = 1, j, -1, - j
H = DFT h = 0, 1 + j, 1, 1 - j
Using the properties of the DFT (do not compute x and h explicitly, compute the following:
8 Solutions_Chapter3[1].nb
Solution
Y k = S yn wnk 2 mk + S y2 m + 1 w2 m+1 k
7 3 3
8 = S y2 m w8 8
n=0 m=0 m=0
Y = 1, j + 1 + j e- 4 , -1 - j, - j + 1 - j e- 4 , 1, j + 1 + j e 4 , -1 + j, - j + 1 - j e 4
This yields
jp 3 jp 3 jp jp
Problem 3.8
Problem
Solution
b) y0 = 14 S Y k = 14 1 0 + j 1 + j + -1 1 + - j 1 - j =
3
-3
and
Problem 3.9
Problem
Solution
we obtain
Y = 1, 12 , 1, 12
c) DFT xn - 14 = e- j2 p4 k X k = - jk X k and therefore
Y = 0, 1 - j, -1, 1 + j
d) DFT xn - 24 = - j2 k X k = -1k X k = 0, -1, j, 1, -1 + j
10 Solutions_Chapter3[1].nb
Problem 3.11
Problem
You know that DFT 1, 2, 3, 4 = 10, -2 + 2 j, -2, -2 - 2 j. Use the minimum number of opera-
tions to compute the following transforms:
Solution
a) Let
x = 1, 2, 3, 4
s = 1, 2, 3, 4, 1, 2, 3, 4
y = 1, 2, 3, 4, 0, 0, 0, 0
Then we can write yn = sn wn, n = 0, ..., 7 where
w = 1, 1, 1, 1, 0, 0, 0, 0
and then, by a property of the DFT we can determine
Y k = DFT yn = DFT sn wn =
1
N
W k Sk
Let's relate the respective DFT's:
Sk = DFT s = S sn wn8 k
7
n=0
= S sn wn8 k + S sn + 4 wn+4
3 3
k
8
n=0 n=0
n=0 n=0
= 1 + -1k S sn wn8 k
3
n=0
S2 k = 2 X k
S2 k + 1 = 0
and therefore
S = DFT 1, 2, 3, 4, 1, 2, 3, 4 = 2 X 0, 0, X 1, 0, X 2, 0, X 3, 0
Furthermore:
W = DFT w = S =
k
1--1
3
1-wk
if k = 1, ..., 7
w8n k 8
n=0
4 if k = 0
and therefore
W = 4, 1 - j2 .4142, 0 , 1 - j 0.4142, 0, 1 + j0 .4142, 0, 1 + j 2.4142
Finally the result:
Y k = 18 S Sm W k - m8
7
m=0
= 18 S 2 X p W k - 2 p8
3
p=0
= 14 S X p W k - 2 p8
3
The final result is simpler than it seems. In fact notice that W 2 = W 4 = W 6 = 0. This implies that
Y 0 = 14 W 0 X 0 = 12 X 0 = 10
Y 2 = 14 W 0 X 1 = 12 X 1 = -2 + 2 j
Y 4 = 14 W 0 X 2 = 12 X 2 = -2
and we have only to compute
Y 1 = 14 W 1 X 0 + W 7 X 1 + W 5 X 2 + W 3 X 3 = -0.4142 - j 2.4142
Y 3 = 14 W 3 X 0 + W 1 X 1 + W 7 X 2 + W 5 X 3 = 2.4142 - j 1.2426
All other terms are computed by symmetry as Y 8 - k = Y * k, for k = 1, 2, 3.
Y k = S yn wn8 k = S xm w28 m k
7 3
n=0 m=0
we can write
4 = X k, k = 0, 1, ..., 7
Y k = S xm wm
3
k
m=0
and therefore
Y = 10, -2 + 2 j, -2, -2 - 2 j, 10, -2 + 2 j, -2, -2 - 2 j
Problem 3.12
Problem
Solution
Sk 1 1k xnw2N nk
2 if k is even
N1 0 if k is odd
n0 2X
k
b) Y2m xnw2N 2m n . But again w2N 2 wN and therefore Y2m Xm, for
N1
n0
m 0, ..., N 1
c) Since clearly yn snwn for all n 0, ..., 2N 1, we can use the property of the
DFT which states
DFTsn wn
2N Sk Wk
1
2N Xm Hk 2m2N
N1
Yk
1
m0
where we take into account the result in part a). ie S2m Xm and S2m 1 0.
Problem 3.13
Problem
want to determine the DFT of the sequence x 0, 1, 2, 3, 4 , 5, 6, 7 with the zero index
A problem in many software packages is that you have access only to positive indexes. Suppose you
n0
as shown, and the DFT algorithm let you compute the DFT of a sequence like
x0, ..., xN 1, what do you do?
Solution
Since x is effectively a period of a periodic sequence, we determine the DFT of one period starting at
n 0, which yields
X DFT4, 5, 6, 7, 0, 1, 2, 3
Problem 3.14
Problem
Solution
a) DFTx n x nwnk
N xnwN X kN
N1 N1
nk
2 DFTx n 2 X kN
n0 n0
c) DFTRexn
2 DFTxn 2 Xk
1 1 1 1
14 Solutions_Chapter3[1].nb
2j DFTx n 2j X kN
d) DFTImxn
2j DFTxn 2j Xk
1 1 1 1
e) DFTx n 1, 3j, 2, j
DFTxnN 1, 3j, 2, j
DFTRexn 1, 2j, 2, 2j
DFTImxn 0, 1, 0, 1
Problem 3.15
Problem
Solution
a) IDFTX k
N X kwN
nk
N XkwN x nN
N1 N1
1 1 nk
b) IDFTXkN
1 Xk wnk
1 Xkwnk xn
k0 k0
N1 N1
N N N N
2 IDFTX k 2 x nN
N k0 N k0
c) IDFTReXk
2 IDFTXk 2 xn
1 1 1 1
2j IDFTX k 2j x nN
d) IDFTImXk
2j IDFTXk 2j xn
1 1 1 1
e) IDFTX k 1, 4j, j, 2j
IDFTXkN 1, 4j, j, 2j
IDFTReXk 1, j, 0, j
IDFTImXk 0, 3, 1, 3
Solutions_Chapter3[1].nb 15
Problem 3.16
Problem
Let xn be an infinite sequence, periodic with period N. This sequence is the input to a BIBO stable
LTI system with impulse response hn, n . Say how you can use the DFT to determine
the output of the system.
Solution
Call x x0, ..., xN 1 one period of the signal, and let X DFTx. Then the whole
N1
infinite sequence xn can be expressed as xn j
N n . Therefore the output
k2
N Xke
1
k0
becomes
N e
N1
yn j
N n
k2
N XkH
1 k2
k0
We can see that the output sequence yn is also periodic, with the same period N given by
k2 Xk, for n, k 0, ..., N 1
yn IDFTH
N
Problem 3.17
Problem
Let xn be a periodic signal with one period given by 1, 2, 3 , 4, 5, 6 with the zero
n0
index as shown.
It is the input to a LTI system with impulse response hn 0.8n . Determine one period of the
output sequence yn.
Solution
xn = 16 S X k e j k 3 n , for all n,
5 p
k=0
where
X k = DFT 3, -4, 5, -6, 1, -2 =
-3.0, 3.0 + j 1.7321, -3.0 - j 5.1962, 21.0, -3.0 + j 5.1962, 3.0 - j 1.7321
The frequency response of the system is given by
Hw = DTFT 0.8n un + 1.25n u-n - 1 =
jw jw
e
-
e jw -0.8
e
e jw -1.25
16 Solutions_Chapter3[1].nb
yn = 16 S Hk X k e j k 3 n , for all n,
5 p
k=0
with
Hk = Hw w=kp3 =
j k p3 j k p3
e
-
e j k -0.8
p
3
e
p , k = 0, ..., 5
e j k -1.25
3
Problem 3.18
Problem
A narrowband signal is sampled at 8kHz and we take the DFT of 16 points as follows. Determine the
best estimate of the frequency of the sinusoid, its possible range of values and an estimate of the
amplitude:
X 0.4889, 4.0267 j24.6698, 2.0054 j5.0782,
1.8607 j2.8478, 1.8170 j1.8421, 1.7983 j1.2136,
1.7893 j0.7471, 1.7849 j0.3576, 1.7837, 1.7849 j0.3576 ,
1.7893 j0.7471, 1.7983 j1.2136, 1.8170 j1.842,
1.8607 j2.8478, 2.0054 j5.0782, 4.0267 j24.6698
Solutions_Chapter3[1].nb 17
Solution
Looking at the DFT we see that there is a peak for k 1 and k 15, withe the respective values
k0 1
N F k0 1
Fs Fs
N
Problem 3.19
Problem
A real signal xt is sampled at 8kHz and we store 256 samples x0, ..., x255. The
magnitude of the DFT Xk has two sharp peaks at k 15 and k 241. What can you say about
the signal?
Solution
Problem 3.21
Problem
We have seen in the theory that the frequency resolution with the DFT is F 2Fs N, with Fs the
sampling frequency and N the data length. Since the lower F the better, by lowering the sampling
frequency Fs , while keeping the data length N constant, we get arbitrary good resolution! Do you buy
that? Why? or Why not?
Solution
It is true that by lowering the sampling frequency Fs and keeping the number of points N constant we
improve the resolution. In fact by so doing the sampling interval Ts gets longer and we get a longer
interval of data. However we cannot decrease the sampling frequency Fs indefinitely, since we have to
keep it above twice the bandwidth of the signal to prevent aliasing.
18 Solutions_Chapter3[1].nb
Problem 3.23
We want to plot the DTFT of a sequence which is not in the tables. Using the DFT and an increasing
number of points sketch a plot of the DTFT (magnitude and phase) of each of the following sequences:
Solution
For every signal in this problem we need to take the DFT of the following sequence
xN = x0, ..., xN - 1, x-N, ..., x-1
of length 2 N . In other words the first N points correspond to positive indexes, while the last N points
correspond to negative indexes. By increasing the value of the parameter N we observe the conver-
gence of the DFT.
a) xn
n un 1
1
The following figures show the DFT for different lengths N = 27 , 29 , 211 (magnitude and phase):
10
0
-3 -2 -1 0 1 2 3
-2
-3 -2 -1 0 1 2 3
N = 27
Solutions_Chapter3[1].nb 19
10
0
-3 -2 -1 0 1 2 3
-2
-3 -2 -1 0 1 2 3
N = 29
10
0
-3 -2 -1 0 1 2 3
-2
-3 -2 -1 0 1 2 3
N = 211
Notice that at w = 0 the DFT does not converge (the magnitude increases with N ) while it converges
at all other frequencies. As a consequence, we can say that the DFT converges to the DTFT for all
w 0. This is expected, since the signal xn is NOT absolutely summable.
Also notice the discontinuity in the phase at 0.
b) xn
n2 un 1
1
20 Solutions_Chapter3[1].nb
The following figures show the DFT for different lengths N = 27 , 211 (magnitude and phase):
1.5
0.5
0
-3 -2 -1 0 1 2 3
-2
-3 -2 -1 0 1 2 3
N 27
1.5
0.5
0
-3 -2 -1 0 1 2 3
-2
-3 -2 -1 0 1 2 3
Solutions_Chapter3[1].nb 21
N 211
Notice that the DFT converges everywhere, as expected since the signal is absolutely summable.
c) xn
n2 1
1
The following figures show the DFT for different lengths N = 27 , 211 (magnitude and phase):
4
3
2
1
0
-3 -2 -1 0 1 2 3
-2
-3 -2 -1 0 1 2 3
N 27
4
3
2
1
0
-3 -2 -1 0 1 2 3
-2
-3 -2 -1 0 1 2 3
22 Solutions_Chapter3[1].nb
N 211
Notice that the DFT converges everywhere, as expected since the signal is absolutely summable.
n1
d) xn
1
The following figures show the DFT for different lengths N = 27 , 29 , 211 (magnitude and phase):
20
15
10
0
-3 -2 -1 0 1 2 3
-2
-3 -2 -1 0 1 2 3
N 27
Solutions_Chapter3[1].nb 23
20
15
10
0
-3 -2 -1 0 1 2 3
-2
-3 -2 -1 0 1 2 3
N 29
20
15
10
0
-3 -2 -1 0 1 2 3
-2
-3 -2 -1 0 1 2 3
N 211
24 Solutions_Chapter3[1].nb
Notice that at w = 0 the DFT does not converge (the magnitude increases with N ) while it converges
at all other frequencies. As a consequence, we can say that the DFT converges to the DTFT for all
w 0. This is expected, since the signal xn is NOT absolutely summable.
Review Problems
Problem 3.26
Problem.
In the system shown, let the continuous time signal xt have Fourier Transform as shown. Sketch
X DTFTxn for the given sampling frequency.
Solution.
we can write
X Fs XF FFs 2 , for
In other words we just need to rescale the frequency axis (F 2F Fs ) and the vertical axis
(multiply by Fs ), as shown below. For the "delta" function recall that the value associated is not the
amplitude but it is the area. This implies
F F0 FFs 2
2 0
Fs 2
where 0 2F0 Fs .
Fs 0
Solutions_Chapter3[1].nb 25
X ( )
8,000
4 4
3
7
8
3
4
7
8
4
b) Fs 6kHz. In this case the two "delta" functions are aliased, as shown below
X ( F kF )
k
s
3 F (kHz)
6 3.5 2.5
(aliased)
The aliased frequency is at 6-3.5=2.5kHz. The DTFT of the sampled signal is then given in the figure
below.
X ( )
6,000
4 4
5
6
5
6
c) Fs 2kHz. In this case the whole signal is aliased, not only the narrowband component as in the previous
case. In order to make the figure not too confusing, consider the parts of the signal separately.
For the "broadband" component of the signal, the repetition in frequency yields the following:
26 Solutions_Chapter3[1].nb
1 1 2 3 4 5 F (kHz)
Then summing all components we obtain the result shown. Just sum within one period (say
1kHz F 1kHz) and repeat periodically.
X ( F kF )
k
s
5
3
2
3
1 1 F (kHz)
For the "narrowband" component (the two "delta" functions) we obtain the following:
2
F (kHz)
3.5 1 1 3.5
3.5 2.0 1.5
3.5 2.0 1.5 3.5 2 2.0 0.5
3.5 2 2.0 0.5
10 , 000
3
X ( )
4, 000
3
2
2
Problem 3.27
Problem.
Solution.
F F2 e F F2
XF
2 e
3
1 2 e
3
1
e j0.2 j0.2
e j 0.2 e j 0.2
4 3 3 4 F (kHz )
X ( )
3e j 0.25 3e j 0.25
2e j 0.2 2e j 0.2
8 2
3
2
3
8
9 9
b) Fs 7kHz. In this case there is aliasing as shown:
X (F )
3
2 e j 0.25 3
e j 0.25
2
e j 0.2 e j 0.2
4 3 3 4 F (kHz )
3
e j 0.25 3
e j 0.25
2
e j 0.2 e j 0.2 2
X ( F Fs ) X ( F Fs )
Summing the components within the interval 3.5kHz F 3.5kHz we obtain only two "delta"
functions as
XF kFs ej0.2
2 e
3 j0.25 F 3, 000
j0.25 F 3, 000
k
ej0.2
2 e
3
Therefore
7 2 1.9285e 7
X 2 1.9285ej0.2477
6 j0.2477
6
c) Fs 5kHz. The aliased components are computed from the figure below.
Solutions_Chapter3[1].nb 29
X (F )
3
2 e j 0.25 3
e j 0.25
2
e j 0.2 e j 0.2
4 3 3 4 F (kHz )
e j 0.2 e j 0.2
3
2 e j 0.25 3
e j 0.25
2
2 1 1 2
X ( F Fs ) X ( F Fs )
Therefore
5 2e 5
5 2e 5
X 3ej0.25
4 j0.2
2
3ej0.25
4 j0.2
2
for .
Problem 3.28
Problem.
You want to compute the DCT of a finite set of data., but you have only the DFT. Can you still com-
pute it?
Solution.
XII k
N1 k2n1
2 Ck xncos
N 2N
k0
N1 k2n1 N1 N1
xncos j
2N xnejk
k
2N n
2
j
2N xnejk
k
2N n
2
2 e 2 e
1 1
k0 2N k0 k0
2N X k, k 0, ..., N 1
N1 k2n1
xncos j k
2 Ree
1
2N 0
k0
and therefore
XIIk
CkRee 2N X0 k, k 0, ..., N 1.
j
1 k
2N
Problem 3.29
Problem
Solution
b) Now let XDCT k = DCT xn and set L coefficients to zero, for L = 20, 30, 40, as
XDCT 127 - L =. .. = XDCT 127 = 0. Notice that in this case a real signal always yields a real DCT
and viceversa. This is due to the basis functions being "cosines" and not "complex exponentials" as in
the DFT. As a consequence we do not have to worry about symmetry to keep the signal real, as we did
for the DFT in a). The inverse DCT obtained for L = 20, 30, 40 are shown below. Notice that the error
is very small compared to the signal itself, and it is not concentrated at any particular point.
32 Solutions_Chapter3[1].nb
Problem 3.30
Problem.
A =
... aN - 2
a1 a0
... aN - 1
Then, do the following:
Solutions_Chapter3[1].nb 33
Solution.
b) Verify that the eigenvectors are always given by ek = 1, wkN , w2Nk , ..., wN-1 , with
k T
N
k = 0, ..., N - 1 and wN = e -j2pN
By multiplying the matrix A by each vector ek we obtain the k -th component of the DFT of each
row is DFT an - kN = wkN X k, where X k = DFT an is the DFT of the first row. Therefore
row. Since the k -th row is obtained by circularly shifting the first row k times, the DFT of the k -th
X k
wkN X k
A ek = = X k ek
N-1 k
wN X k
which shows that ek is an eigenvector, and X k is the corresponding eigenvalue.
c) Determine a factorization A = E L E*T with L diagonal and E*T E = I .
"Pack" all eigenvectors e0 , ..., eN-1 in an N N matrix E as
E = e0 , e1 , ..., eN-1
*T
First notice that E E = N since
k em =
0 if k m
e*T
N if k = m
Then the matrix
e0 , e1 , ..., eN-1
E =
1
E = 1
N N
X 0 0
Then use the fact that the vectors ek are eigenvectors, to obtain
0 X 1
... 0
e e
N-1
0
0
A E = A
1
, e , ..., e =
1
, e , ..., e
... X N - 1
0 1 N-1 0 1
0
N N 0
0
which can be written as
AE =EL
with L = diagX 0, ..., X N - 1. Since E-1 = E*T we obtain the desired decomposition
34 Solutions_Chapter3[1].nb
A = E L E*T
lution between the two sequences. Show that you can write the vector y = y0, ..., yN - 1T in
d) Let hn and xn be two sequences of equal length N , and yn = hn xn be the circular convo-
terms of the product y = H x where x = x0, ..., xN - 1T and H circulant. Show how to determine
the matrix H .
From the definition of circular convolution
yn = S hn - kN xk = S Hk, n xk
N-1 N-1
k=0 k=0
Therefore
y = HT x
with H being circulant.
y = E * L ET x
Multiplying on the left by ET we obtain
ET y = L ET x
where L = H0, ..., HN - 1. Now
eT0 Y 0 eT0 X 0
1
eT
1 1
Y 1 1
e1
1
X 1
y =
, and E x =
x =
N N N N
T
E y =
T T
T N T N
eN-1 Y - 1 eN-1 X - 1