exercises solved5
TRANSCRIPT
-
7/28/2019 Exercises Solved5
1/9
DIGITAL SIGNAL PROCESSING
Discrete Fourier Transform
Solved problems:
1. Find the Discrete Fourier Transform of the following signal:
}1,1,1,1{3,2,1,0],[ ==nnf .
Solution:
The Discrete Fourier Transform (DFT) of the discrete signal f[n]
is F[k]:
NjN
n
kn eWNkWnfkF
21
0
,1,...1,0,][][
=
=== wherefor
In our case, N=4 so the last equation for F[k], written in matrix
notation is:
fTF = , where T is matrix of the transform, with elements Tij=Wij,
i, j = 0..N- 1:
jWjW
jeeW
WWW
WWW
WWW
F
F
F
F
jj
===
===
=
322
24
2
963
642
32
;1)(
;
1
1
1
1
1
1
1
1111
]3[
]2[
]1[
]0[
Using the property of periodicity of W ( ZrWWNrpp
=+ , ) with
basic period N=4, we get:
jWWWWWWWWW ========= 89429924660444 ;1;1
Now we can compute F[k], k=0..3 with this matrix equation:
+
=
=
j
j
jj
jj
F
F
F
F
22
0
22
0
1
1
1
1
11
1111
11
1111
]3[
]2[
]1[
]0[
DFT of the signal f[n], n=0..3 is F[k], k=0..3 = {0, 2-2j, 0, 2+2j}
2. Find the inverse DFT of F[k], k=0,1,2,3 = {0, 2-2j, 0, 2+2j}.
Solution:
The Inverse Discrete Fourier Transform (IDFT) of F[k] is thesignal f[n]:
-
7/28/2019 Exercises Solved5
2/9
1,...1,0,][1
][1
0
==
=
NnWkF
Nnf
N
k
kn, where N
j
eW
2
=
The last equation written in matrix notation is:
FTN
1FTf
*1==
, whereTis the matrix of transform.
From previous we have
=
=
jj
jj
jj
jj
11
1111
11
1111
,
11
1111
11
1111
*TT so
=
+
=
1
1
1
1
22
0
22
0
11
1111
11
1111
1
]3[
]2[
]1[
]0[
j
j
jj
jj
N
f
f
f
f
We got that IDFT of F[k], k=0..3 is the signal f[n], n=0..3 = {1, 1, -1, -1}.
3. Find the Z-transform of the following signal:
f[n], n=...-2,-1,0,1,2,3,5,... = {...0, 0, 1, 1, -1, -1, 0, 0,...}
Find its frequency spectrum for the following frequencies:
2
3,,
2
,0
==== TTTT and
Solution:
The Z-transform of the signal f[n] is:
)1()1()1(11][)( 21121321
=
+=++=+== zzzzzzzzznfzF
n
n
The frequency spectrum of the signal f[n] is:
)( TjeF = Tjez
zF =
)(
)1()1()( 2 TjTjTj eeeF +=
The spectrum for the specific frequencies is:
;222)1()1()1()(
;000)1()1()(
;222)1()1()1()(
;0)11()11()(
32
3
2
3
2
22
0
jjeeeF
eeeF
jjeeeF
eF
jjj
jjj
jjj
j
+=+=+=
==+=
==+=
=+=
If we compare the values of the frequency spectrum with thevalues from the previous example (DFT of the same signal) we can
see that by computing N-point DFT of a signal we actually
-
7/28/2019 Exercises Solved5
3/9
compute N equally-spaced samples from the frequency spectrum of
that signal:
1,...1,0),(|)(][
2
2 ===
=
NkeFeFkFk
Nj
kN
T
Tj
4. Find the even and the odd part of the following signals:
f[n], n=0..3 = {1, 1, -1, -1}, and
F[k], k=0..3 = {0, 2-2j, 0, 2+2j}
Solution:
The even part of f[n] is fp[n], where fp[n] is computed by:
)])[(][(2
1][ nNfnfnf
p
+= ,
while odd part of f[n] is fn[n]:
)])[(][(2
1][ nNfnfnfn =
Where (N-n) means NnN mod)( .
For example, if f[n] is the following signal:
]}1[],2[],...2[],1[],0[{1..0],[ == NfNffffNnnf ,
then, the signal )][( nNf is:
]}1[],2[],...2[],1[],0[{1..0)],[( ffNfNffNnnNf==
In our case, f[n]={1, 1, -1, -1}, so f[(N-n)]={1, -1, -1, 1}
The even part of f[n] is:
)])[(][(2
1][ nNfnfnfp += = {1, 0, -1, 0}, while the odd part is:
)])[(][(2
1][ nNfnfnfn = = {0, 1, 0, -1}.
Similarly, for F[k] we get:
F[(N-k)]={0, 2+2j, 0, 2-2j};
The even part is: Fp[k]={0, 2, 0, 2};
The odd part is: Fn[k]={0, -2j, 0, 2j}.
5. Find the DFT of the signals fp[n] and fn[n], using the resultsfrom the previous example.
Solution:
-
7/28/2019 Exercises Solved5
4/9
On figure 14 are shown the correspondences between the real, the
imaginary, the even and the odd parts of signal and his Discrete
Fourier Transform. The black arrow connects the signals
that form transform pair.
Figure 14
According to this property of symmetry of the Discrete Fourier
Transform, if DFT of f[n]={1, 1, -1, -1} is F[k]={0, 2-2j, 0, 2+2j}, then DFT of
the even part of f[n], fp[n], which is real, is the real even part
of F[k], that is Fp[k]={0, 2, 0, 2} (computed in the previous example).Similarly, DFT of the odd part of f[n], fn[n], which is also real,
according to this property is the imaginary odd part of F[k], that
is Fn[k]={0, -2j, 0, 2j}.
6. If the signal f[n], n=0..N-1 is real and even, show that the
signal F[k]=DFT{f[n]}, k=0..N-1 is also real and even.
Solution:We know that the signal f[n] is real i.e. ][][ * nfnf = , and that is
also even, i.e. )][(][ nNfnf = .
We need to show that:
][][ * kFkF = and )][(][ kNFkF = .
If we start from the definition of DFT ][* kF we get:
=
=
=
===
1
0
1
0
*1
0
** ][][]][[][N
n
knN
n
knN
n
knWnfWnfWnfkF ;
Now, if we use the relation )][(][ nNfnf = :
=
=
1
0
* )][(][N
n
kNknWWnNfkF , 1
0==
WW
kNdue to periodicity of W
=
=
1
0
)(* )][(][N
n
nNkWnNfkF
The value of the congruence (N-n) is equal to the difference N-n
for all 0n . For n=0, (N-n)=0, while N-n=N. But, the value of)( nNk
W is same as))(( nNk
W for n=0, so we can make this
replacement:
-
7/28/2019 Exercises Solved5
5/9
][][)][(][1
0
1
0
))((*kFWmfWnNfkF mk
N
m
N
n
nNk===
=
=
We got that ][][* kFkF = which means that F[k] is real.
In order to show that F[k] is even we start from )][( kNF :
=
=
1
0
))((][)][(
N
n
kNnWnfkNF , and same as previously, the value of the
congruence (N-k) is different from N-k only for k=0. But for k=0,))(( kNn
W
is same as)( kNn
W, so again we can make the replacement
))(( kNnW
=
)( kNnW
:
=
=
==
1
0
1
0
)(][][)][(
N
n
knNnN
n
kNnWWnfWnfkNF , 1
0==
WW
Nn
][][)][()][(][)][(*
1
0
*1
0
**1
0kFkFWnfWnfWnfkNF
N
n
knN
n
knN
n
kn
=====
=
=
=
We got that ][)][( kFkNF = which means that F[k] is even.
7. If the length of x[n] is N=4, and if its 8-point DFT is:
}23,3,21,1,21,3,23,5{7..0],[8 jjjjkkX ++== , find the 4-
point DFT of the signal x[n].
Solution:The samples of ][8 kX are eight equally-spaced samples from the
frequency spectrum of the signal x[n]:
kT
TjeXkX
82)(][8
=
= , k=0..7
More precisely, they are samples from the spectrum for the
following frequencies: }4
7,
2
3,
4
5,,
4
3,
2,
4,0{
=T .
With 4-point DFT of x[n] we get 4 samples from the spectrum of x[n]:
kT
TjeXkX
42)(][4
=
= , k=0..3
These samples are for the following frequencies:
}2
3,,
2,0{
=T
If we compare the two sets of frequencies we can easily see
that:
-
7/28/2019 Exercises Solved5
6/9
3]6[)(]3[
1]4[)(]2[
3]2[)(]1[
5]0[)(]0[
82
3
4
84
82
4
80
4
===
===
===
===
XeXX
XeXX
XeXX
XeXX
j
j
j
j
So, 4-point DFT of x[n] is: }3,1,3,5{][4 =kX
8. Two N-length signals are given, N is even number:
1..0],[1..0],[ == NnngNnnf i
The relation between f[n] and g[n] is: ][)1(][ nfng n = .
Find the relation between ]}[{][ ngDFTkG = and ]}[{][ nfDFTkF = .
Solution:
=
=
==
1
0
1
0
][)1(][][N
n
N
n
knnknWnfWngkG
if we replacen)1( by
jne :
=
=
==
1
0
2
221
0
2
][][][N
n
nN
Njkn
NjN
n
jnkn
Nj
eenfeenfkG
)]2
[(][][
1
0
)
2
(2
NkFenfkG
N
n
Nkn
N
j
+==
=
+
, k=0..N-1
We got that G[k] is circular shifted (for2
Nsamples) version of
F[k].
2. The relation between 12
..0],[1..0],[ ==N
nngNnnf and , where N
is even number, is:
12
..0],2
[][][ =++= NnNnfnfng
Find the relation between ]}[{][ ngDFTkG = , 12
..0 =N
k and the
frequency spectrum of the signal f[n], )( TjeF .
Solution:
=
=
++==
12
0
12
0
])
2
[][(][][
N
n
kn
N
n
knW
NnfnfWngkG
-
7/28/2019 Exercises Solved5
7/9
=
=
++=
12
0
12
0
]2
[][][
N
n
kn
N
n
knW
NnfWnfkG
We multiply the second sum byk
N
W
2 (its value is 1):
=
=
++=
12
0
2
12
0
]2
[][][
N
n
kN
kn
N
n
knWW
NnfWnfkG
=
+
=
++=
12
0
)2
(1
2
0
]2
[][][
N
n
kN
n
N
n
knW
NnfWnfkG
=
=
+=
1
2
12
0
][][][N
N
m
km
N
n
knWmfWnfkG
12
..0],2[][][][1
0
221
0
====
=
=
NkkFenfWnfkGN
n
knN
jN
n
kn
12
..0,)(]2[][2
2 ====
NkeFkFkG
kN
T
Tj
We got that the samples of G[k] are2
Nequally-spaced samples
from the frequency spectrum of f[n].
9. From the real signal 1..0],[ = Nnnf , where N is even number,
the following signals gi[n], i=1..4 are constructed:
1..0],1[][1 == NnnNfng
=
==
12..],[
1..0],[][2
NNnNnf
Nnnfng
=
==
12..,0
1..0],[][3
NNn
Nnnfng
=
120,0
120],2
[][4
Nnn
Nnnn
fng
neparno,e
parno,e
Find the DFT of the signals gi[n], i=1..4, and find their relation
with the frequency spectrum )( TjeF of the signal f[n].
Solution:
Its easy to see that the signal ][1 ng is the inverted signal f[n].
-
7/28/2019 Exercises Solved5
8/9
=
=
==
1
0
21
0
11 ]1[][][N
n
knN
jN
n
kn enNfWngkG
If we make replacement nNm = 1 :
=
=
==
1
0
)(2
)1(21
0
)1(2
1 ][][][
N
m
kmN
jNkN
jN
m
mNkN
j
emfeemfkG
=
=
1
0
)(222
1 ][][N
m
kmN
jkN
jNkN
j
emfeekG
Since 1
2
= Nk
Nj
e
we get that:
][][
2
1 kFekGk
Nj
=
And the relation between ][1 kG and )(TjeF e:
kN
T
Tjk
Nj
eFekG
2
2
1 )(][=
= , k=0..N-1
Since the module ofk
Nj
e
2
is 1, it turns out that with DFT of the
signal ][1 ng we get samples from the amplitude spectrum of the
signal f[n].
The signal ][2 ng has length of 2N, and its obtained by periodic
extension of f[n].
=
=
+=
122
21
0
2
2
2 ][][][N
Nn
knN
jN
n
knN
j
eNnfenfkG
If we make replacement m=n-N:
kNN
jN
m
kmN
jN
n
knN
j
eemfenfkG
=
=
+= 221
0
2
21
0
2
2
2 ][][][
kN
m
kmN
jN
n
knN
j
emfenfkG )1(][][][1
0
2
21
0
2
2
2 +=
=
=
))1(1(][][1
0
2
2
2k
N
n
knN
j
enfkG +=
=
We got that the odd-indexed samples of ][2 kG are zero, while the
remaining are equal to the samples of 2 ][kF :
= =
120,0
120,)(2][
2
22
Nkk
NkkeFkG k
NT
Tj
neparno,e
parno,e
-
7/28/2019 Exercises Solved5
9/9
The signal ][3 ng has length of 2N, and its obtained by adding N
zeros to f[n].
kN
T
Tjkn
NjN
n
N
n
knN
j
eFenfengkG
2
22
21
0
12
0
2
2
33 )(][][][
=
=
=
=== , k=0..2N-1
We got that the samples of ][3 kG are 2N equally-spaced samples
from the spectrum of f[n].
The signal ][4 ng also has length of 2N samples, and its obtained
from f[n] by inserting one zero after every sample from f[n]. The
DFT of ][4 ng is:
=
=
==
1
0
22
212
0
2
2
44 ][][][N
m
kmN
jN
n
knN
j
emfengkG
kN
T
TjN
n
knN
j
eFenfkG
2
1
0
2
4 )(][][=
=
== , k=0..2N-1
We got that the samples of ][4 kG are 2N equally-spaced samples
from the spectrum of f[n] for the frequency range from 0 to 4 ,
which means that ][4 kG can be obtained with one periodic
expansion of ][kF .