Download - 1 Fourier Analysis
-
8/18/2019 1 Fourier Analysis
1/60
Discrete Time Periodic Signals
A discrete time signal x[n] is periodic with period N if and only if
][][ N n xn x +=for all n .
Definition:
N
][n x
n
Meaning: a periodic signal keeps repeating itself forever
-
8/18/2019 1 Fourier Analysis
2/60
!xample: a Sin"soid
( )[ ] 2cos 0.2 0.9 x n nπ π = +#onsider the Sin"soid:
$t is periodic with period since 10= N
( )
( ) ][29.02.0cos2
9.0)10(2.0cos2]10[
n xn
nn x
=++=++=+
π π π
π π
for all n.
-
8/18/2019 1 Fourier Analysis
3/60
%eneral Periodic Sin"soid
+= α π n
N
k An x 2cos][
#onsider a Sin"soid of the form:
$t is periodic with period N since
][22cos
)(2cos][
n xk n N
k A
N n N
k A N n x
=
×++=
++=+
π α π
α π
for all n.
with k & N integers'
-
8/18/2019 1 Fourier Analysis
4/60
( )π π 1.03.0cos5][ −= nn x#onsider the sin"soid:
$t is periodic with period since 20= N
( )( ) ][231.03.0cos5
1.0)20(3.0cos5]20[n xn
nn x=×+−=
−+=+π π π
π π
for all n.
(e can write it as:
−= π π 1.0203
2cos5][ nn x
!xample of Periodic Sin"soid
-
8/18/2019 1 Fourier Analysis
5/60
n N
k j
Aen x
=π 2
][
#onsider a #omplex !xponential of the form:
for all n.
$t is periodic with period N since
Periodic #omplex !xponentials
][
][
2
2
)(2
n xe Ae
Ae N n x
jk n
N k j
N n N
k j
=×=
=+
+
π
π
π
1=
-
8/18/2019 1 Fourier Analysis
6/60
n je jn x π 1.0)21(][ +=
#onsider the #omplex !xponential:
(e can write it as
!xample of a Periodic #omplex !xponential
n j
e jn x
+= 201
2
)21(][π
and it is periodic with period N = )*'
-
8/18/2019 1 Fourier Analysis
7/60
%oal:(e want to write all discrete time periodic signals in terms
of a common set of +reference signals,'
-eference .rames
$t is like the pro/lem of representing a vector in a
reference frame defined /y• an origin +*,
• reference vectors
x
,..., 21 ee
x
0
1e
2eReference
Frame
-
8/18/2019 1 Fourier Analysis
8/60
-eference .rames in the Plane and in Space
.or example in the plane we need two reference vectors
x
0
1e
2e
21,ee
Reference
Frame
0 while in space we need three reference vectors 321 ,, eee
0
1e2e
ReferenceFrame
x3e
-
8/18/2019 1 Fourier Analysis
9/60
A -eference .rame in the Plane
$f the reference vectors have "nit length and they areperpendic"lar 1orthogonal 2 to each other& then it is very simple:
2211 eaea x +=0
11ea
22ea
(here pro3ection of along
pro3ection of along
1a2a 2e
1e x x
The plane is a ) dimensional space'
-
8/18/2019 1 Fourier Analysis
10/60
A -eference .rame in the Space
$f the reference vectors have "nit length and they areperpendic"lar 1orthogonal 2 to each other& then it is very simple:
332211 eaeaea x ++=0
11ea22ea
(here pro3ection of along
pro3ection of along pro3ection of along
1a
2
a2e
1e x
x
The +space, is a 4 dimensional space'
3a x 3e
33ea
-
8/18/2019 1 Fourier Analysis
11/60
!xample: where am I 5
6
!0
1e
2e
x
m300
m200
Point + x” is 4**m !ast and )**m 6orth of point +*,'
-
8/18/2019 1 Fourier Analysis
12/60
-eference .rames for Signals
(e want to expand a generic signal into the s"m of reference
signals'
The reference signals can /e& for example& sin"soids or complex
exponentials
n
][n x
=
∑
reference signals
-
8/18/2019 1 Fourier Analysis
13/60
7ack to Periodic Signals
A periodic signal x [n] with period N can /e expanded in terms of N
complex exponentials
1,...,0 ,][2
−== N k enen
N
k j
k
π
as
∑−
=
=1
0
][][ N
k
k k nean x
-
8/18/2019 1 Fourier Analysis
14/60
A Simple !xample
Take the periodic signal x [n] shown /elow:
n0
1
2
6otice that it is periodic with period N=)'
Then the reference signals are
nn j
nn j
ene
ene
)1(][
11][
2
12
1
2
02
0
−==
===
π
π
(e can easily verify that 1try to /elieve2:
nn
nenen x
)1(5.015.1
][5.0][5.1][ 10
−×−×=
+=
for all n.
-
8/18/2019 1 Fourier Analysis
15/60
Another Simple !xample
Take another periodic signal x [n] with the same period (N 8)2:
n0
3.0−
3.1
Then the reference signals are the same0
2 20
12
21
[ ] 1 1
[ ] ( 1)
j n n
j nn
e n e
e n e
π
π
= = =
= = −(e can easily verify that 1again try to /elieve2:
nn
nenen x
)1(8.015.0
][8.0][5.0][ 10
−×+×=+=
for all n.
Same reference signals& 3"st different coefficients
-
8/18/2019 1 Fourier Analysis
16/60
9rthogonal -eference Signals
6otice that& given any N, the reference signals are all orthogonal
to each other& in the sense
=
≠=∑
−
= k m N
k mnene
N
n
mk if
if 0][][
1
0
*
∑∑∑
−
=−
−−−
=
−−
= −
−
=
==
1
0 2
)(221
0
21
0
*
1
1
][][
N
n N
k m j
k m jn
N
k m j N
n
n N
k m j N
nmk
e
e
eenene π
π π π
Since
/y the geometric s"m
-
8/18/2019 1 Fourier Analysis
17/60
0 apply it to the signal representation 0
k
N
m
N
n
mk m
N
n
k
n x
N
m
mm
N
n
k
Nanenea
neneanen x
=
=
=
∑ ∑
∑ ∑∑
−
=
−
=
−
=
−
=
−
=
1
0
1
0
*
1
0
*
][
1
0
1
0
*
][][
][][][][
and we can comp"te the coefficients' #all thenk Nak X =][
1,...,0 ,][][1
0
2
−=== ∑−
=
− N k en x Nak X
N
n
kn N
j
k
π
-
8/18/2019 1 Fourier Analysis
18/60
Discrete .o"rier Series
1,...,0 ,][][1
0
2
−== ∑−
=
− N k en xk X
N
n
kn N
j π
%iven a periodic signal x [n] with period N we define theDiscrete .o"rier Series 1D.S2 as
Since x [n] is periodic& we can s"m over any period' The general
definition of Discrete .o"rier Series 1D.S2 is
{ } 1,...,0 ,][][][1 20
0
−=== ∑−+=
− N k en xn x DFS k X
N n
nn
kn N
j π
for any 0n
-
8/18/2019 1 Fourier Analysis
19/60
$nverse Discrete .o"rier Series
{ } ∑−=
==1
0
2
][1][][ N
k
kn N
j
ek X N
k X IDFS n xπ
The inverse operation is called $nverse Discrete .o"rier Series
1$D.S2& defined as
-
8/18/2019 1 Fourier Analysis
20/60
-evisit the Simple !xample
-ecall the periodic signal x [n] shown /elow& with period N=):
n0
1
2
1,0,)1(21)1](1[]0[][][1
0
2
2
=−×+=−+== ∑=− k x xen xk X k k
n
nk j
π
Then 1]1[,3]0[ −== X X Therefore we can write the se"ence as
{ }
n
k
kn j
ek X k X IDFS n x
)1(5.05.1
][2
1][][
1
0
2
2
−×−=
== ∑=
π
-
8/18/2019 1 Fourier Analysis
21/60
!xample of Discrete .o"rier Series
#onsider this periodic signal
The period is N=;*' (e comp"te the Discrete .o"rier Series
25
102 2
9 4 210 10
100 0
1 if 1, 2,...,9[ ] [ ]
1
5 if 0
j k
j kn j kn j k
n n
ek k x n e e
e
k
π
π π
π
−
− −−
= =
−
== = = −
=
∑ ∑
][n x
n010
1
-
8/18/2019 1 Fourier Analysis
22/60
0 now plot the val"es 0
0 2 4 6 8 100
5magnitude
0 2 4 6 8 10-2
0
2phase (rad)
k
k
|][| k X
][k X
-
8/18/2019 1 Fourier Analysis
23/60
!xample of D.S
#omp"te the D.S of the periodic signal
)5.0cos(2][ nn x π =
#omp"te a few val"es of the se"ence
,...0]3[,2]2[,0]1[,2]0[ ==== x x x xand we see the period is N=)' Then
k
n
kn j
x xen xk X )1(]1[]0[][][1
0
2
2
−×+==
∑=−
π
which yields
2]1[]0[ == X X
-
8/18/2019 1 Fourier Analysis
24/60
Signals of .inite 1ie )*&***
samples?sec2' Then we have
( ) ( ) pointsdata 60010201030 33 =×××= − N
-
8/18/2019 1 Fourier Analysis
25/60
Series !xpansion of .inite Data
(e want to determine a series expansion of a data set of length N.
@ery easy: 3"st look at the data as one period of a periodic se"ence
with period N and "se the D.S:
n
1− N 0
-
8/18/2019 1 Fourier Analysis
26/60
Discrete .o"rier Transform 1D.T2
%iven a finite interval of a data set of length N, we define the
Discrete .o"rier Transform 1D.T2 with the same expression as theDiscrete .o"rier Series 1D.S2:
{ }
21
0[ ] [ ] [ ] , 0,..., 1
N j kn N
n X k DFT x n x n e k N
π − −
== = = −∑And its inverse
{ }21
0
1[ ] [ ] [ ] , 0,..., 1
N j kn N
n
x n IDFT X k X k e n N N
π −
=
= = = −∑
-
8/18/2019 1 Fourier Analysis
27/60
Signals of .inite 1ie )*&***
samples?sec2' Then we have
( ) ( ) pointsdata 60010201030 33 =×××= − N
-
8/18/2019 1 Fourier Analysis
28/60
Series !xpansion of .inite Data
(e want to determine a series expansion of a data set of length N.
@ery easy: 3"st look at the data as one period of a periodic se"ence
with period N and "se the D.S:
n
1− N 0
-
8/18/2019 1 Fourier Analysis
29/60
Discrete .o"rier Transform 1D.T2
%iven a finite of a data set of length N we define the Discrete .o"rier
Transform 1D.T2 with the same expression as the Discrete .o"rierSeries 1D.S2:
{ }
21
0[ ] [ ] [ ] , 0,..., 1
N j kn N
n X k DFT x n x n e k N
π − −
== = = −∑and its inverse
{ }21
0
1[ ] [ ] [ ] , 0,..., 1
N j kn N
n
x n IDFT X k X k e n N N
π −
=
= = = −∑
-
8/18/2019 1 Fourier Analysis
30/60
!xample of Discrete .o"rier Transform
#onsider this signal
The length is N=;*' (e comp"te the Discrete .o"rier Transform
25
102 29 4
210 10
100 0
1 if 1, 2,...,9[ ] [ ]
1
5 if 0
j k
j kn j kn j k
n n
ek k x n e e
e
k
π
π π
π
−
− − −
= =
−
== = = −
=
∑ ∑
][n x
n0 9
1
-
8/18/2019 1 Fourier Analysis
31/60
0 now plot the val"es 0
0 2 4 6 8 100
5magnitude
0 2 4 6 8 10-2
0
2phase (rad)
k
k
|][| k X
][k X
-
8/18/2019 1 Fourier Analysis
32/60
D.T of a #omplex !xponential
#onsider a complex exponential of fre"ency rad '0
ω
,][ 0n j
Aen x ω = +∞
-
8/18/2019 1 Fourier Analysis
33/60
-ecall Magnit"de& .re"ency and Phase
0π ω π − < ≤ +)' (e represented it in terms of magnitude and phase:
( )rad ω 0ω
0ω
magnitude
phase
|| A
A∠
-ecall the following:
;' (e ass"me the fre"ency to /e in the interval
π −
π − π
π
( )rad ω
-
8/18/2019 1 Fourier Analysis
34/60
#omp"te the D.T0
{ }
00
21
0
221 1
0 0
[ ] [ ] [ ]
, 0,..., 1
N j kn N
n
N N j k n j kn j n N N
n n
X k DFT x n x n e
Ae e Ae k N
π
π π ω
ω
− −
=
− − − −− ÷
= =
= =
= = = −
∑
∑ ∑
6otice that it has a general form:
0
2[ ] N X k A W k
N
π ω
= × − ÷
1
0
1( )
1
j N N j n
N jn
eW e
e
ω
ω
ω ω
−−−
−=
−= =
−∑
where 1"se the geometric series2
-
8/18/2019 1 Fourier Analysis
35/60
See its general form:
1( 1)/2
0
sin2
( )
sin2
N j n j N
N
n
N
W e eω ω
ω
ω
ω
−− − −
=
÷ = =
÷
∑
-
8/18/2019 1 Fourier Analysis
36/60
0 since:
1
0
/2 / 2 /2 / 2
/ 2 /2 /2 / 2
/ 2 / 2 /2( 1)/2
/ 2 / 2 / 2
1( )
1
sin2
sin
2
j N N j n
N jn
j N j N j N j N
j j j j
j N j N j N j N
j j j
eW e
e
e e e e
e e e e
N
e e ee
e e e
ω
ω
ω
ω ω ω ω
ω ω ω ω
ω ω ω
ω
ω ω ω
ω
ω
ω
−− −−
=
− − −
− − −
− −− −
− −
−= =−
−=
− ÷ − = = ÷ ÷− ÷
∑
-
8/18/2019 1 Fourier Analysis
37/60
0 and plot the magnit"de
-3 -2 -1 0 1 2 30
2
4
6
8
10
12
( ) N W ω
ω
π π −
N
2
N
π 2
N
π −
-
8/18/2019 1 Fourier Analysis
38/60
!xample
#onsider the se"ence
0.3[ ] , 0,...,31 j n x n e nπ = =
$n this case 32,3.00 == N π ω
Then its D.T /ecomes
( ) 23232
[ ] 0.3 , 0,...,31k
X k W k π ω
ω π =
= − =
-
8/18/2019 1 Fourier Analysis
39/60
''' first plot this 0
0 1 2 3 4 5 60
10
20
30
40
( )π ω 3.032 −W
ω
2π
32= N
π ω 3.00 =
d th th l t f it D.T
-
8/18/2019 1 Fourier Analysis
40/60
0 and then see the plot of its D.T
0 5 10 15 20 25 300
5
10
15
20
25
30
35
( ) 2[ ] 0.3 , 0,..., 1
N k N
X k W k N π ω
ω π
== − = −
k The max corresponds to fre"ency π π π ω 3.0312.032/25 ≅=×=
S ! l i M tl /
-
8/18/2019 1 Fourier Analysis
41/60
Same !xample in Matla/
%enerate the data:
BB n8*:4;C
BBx8exp13*'4pin2C
#omp"te the D.T 1"se the +.ast, .o"rier Transform& ..T2:
BB E8fft1x2C
Plot its magnit"de:
BB plot1a/s1E22
0 and o/tain the plot we saw in the previo"s slide'
S ! l i M tl /
-
8/18/2019 1 Fourier Analysis
42/60
Same !xample in Matla/
%enerate the data:
BB n8*:4;C
BBx8exp13*'4pin2C
#omp"te the D.T 1"se the +.ast, .o"rier Transform& ..T2:
BB E8fft1x2C
Plot its magnit"de:
BB plot1a/s1E22
0 and o/tain the plot we saw in the previo"s slide'
S ! l 1 d t i t 2
-
8/18/2019 1 Fourier Analysis
43/60
Same !xample 1more data points2
#onsider the se"ence
0.3[ ] , 0,..., 255 j n x n e nπ = =
$n this case 0 0.3 , 256 N ω π = =BB n8*:)FFC
BBx8exp13*'4pin2C
BB E8fft1x2C
BB plot1a/s1E22
See the plot …
d it it d l t
-
8/18/2019 1 Fourier Analysis
44/60
0 and its magnit"de plot
0 50 100 150 200 250 3000
50
100
150
200
k
| [ ] | X k
(h t d it 5
-
8/18/2019 1 Fourier Analysis
45/60
(hat does it mean5
The max corresponds to fre"ency
38 2 / 256 0.2969 0.3ω π π π= × = ≅
A peak at index means that yo" have a fre"ency0k
0 50 100 150 200 250 3000
50
100
150
200
k
| [ ] | X k
0 38k =
( )0 0 2 /k N ω π ;
! l
-
8/18/2019 1 Fourier Analysis
46/60
!xample
Go" take the ..T of a signal and yo" get this magnit"de:
0 50 100 150 200 250 3000
200
400
600
800
1000
1200
|][| k X
k 271 =k 2 81k =
There are two peaks corresponding
to two fre"encies:π
π π ω
π π π
ω
6328.0256
281
2
2109.0256
227
2
22
11
===
===
N k
N k
D.T f Si id
-
8/18/2019 1 Fourier Analysis
47/60
D.T of a Sin"soid
#onsider a sin"soid with fre"ency rad '0
ω
0[ ] cos( ), x n A nω α = + +∞
-
8/18/2019 1 Fourier Analysis
48/60
Sin"soid 8 s"m of two exponentials
-ecall that a sin"soid is the s"m of two complex
exponentials n j jn j j ee A
ee A
n x 0022
][ ω α ω α −−+=
( )rad ω 0ω
0ω
magnitude
phase
/ 2 A
α
π −
π − π
π
( )rad ω
0ω −
0
ω −
/ 2 A
α −
Hse of positive fre"encies
-
8/18/2019 1 Fourier Analysis
49/60
Hse of positive fre"encies
0 0[ ]2 2
j n j n j j A A X k DFT e e DFT e eω ω α α −− = +
Then the D.T of a sin"soid has two components
0 /"t we have seen that the fre"encies we comp"te
are positive' Therefore we replace the last exponential
as follows:
0 0(2 )[ ]2 2
j n j n j j A A X k DFT e e DFT e eω π ω α α −− = +
-epresent a sin"soid with positive fre
-
8/18/2019 1 Fourier Analysis
50/60
-epresent a sin"soid with positive fre'
Then the D.T of a sin"soid has two components
( )rad ω 0ω
0ω
magnitude
phase
/ 2 A
α
π
π
( )rad ω 2π
2π 0
2π ω −
/ 2 A
02π ω −
α −
0 0(2 )[ ]2 2
j n j n j j A A X k DFT e e DFT e eω π ω α α −− = +
!xample
-
8/18/2019 1 Fourier Analysis
51/60
!xample
#onsider the se"ence
[ ] 2cos(0.3 ), 0,...,31 x n n nπ = =
$n this case 32,3.00 == N π ω
Then its D.T /ecomes
( ) ( ) 232 3232
[ ] 0.3 1.7 , 0,...,31k
X k W W k π ω
ω π ω π =
= − + − =
-
8/18/2019 1 Fourier Analysis
52/60
''' first plot this 0
0 1 2 3 4 5 60
5
10
15
20
( ) ( )32 321
0.3 1.72
W W ω π ω π − + −
/ 2 32 / 2 N =
π ω 3.00 = 0 1.7ω π =
/ 2 32 / 2 N =
ω
2π
and then see the plot of its D.T
-
8/18/2019 1 Fourier Analysis
53/60
0 and then see the plot of its D.T
k The first max corresponds to fre"ency π π ω 3.032/25 ≅×=
( ) ( )32 32 21
[ ] 0.3 1.7 , 0,..., 12 k
N
X k W W k N π
ω
ω π ω π
== − + − = −
0 5 10 15 20 25 30 350
5
10
15
20
his is N! a fre"uency
Symmetry
-
8/18/2019 1 Fourier Analysis
54/60
Symmetry
$f the signal is real& then its D.T has a symmetry: ][n x
*][][ k N X k X −=
$n other words:
][][
|][||][|
k N X k X
k N X k X
−−∠=∠−=
Then the second half of the spectr"m is red"ndant 1it does not
contain new information2
7ack to the !xample:
-
8/18/2019 1 Fourier Analysis
55/60
7ack to the !xample:
0 5 10 15 20 25 30 350
5
10
15
20
$f the signal is real we 3"st need the first half of the spectr"m&
since the second half is red"ndant'
Plot half the spectr"m
-
8/18/2019 1 Fourier Analysis
56/60
Plot half the spectr"m
$f the signal is real we 3"st need the first half of the spectr"m&
since the second half is red"ndant'
0 5 10 150
5
10
15
20
Same !xample in Matla/
-
8/18/2019 1 Fourier Analysis
57/60
Same !xample in Matla/
%enerate the data:
BB n8*:4;C
BBx8cos1*'4pin2C
#omp"te the D.T 1"se the +.ast, .o"rier Transform& ..T2:
BB E8fft1x2C
Plot its magnit"de:
BB plot1a/s1E22
0 and o/tain the plot we saw in the previo"s slide'
Same !xample 1more data points2
-
8/18/2019 1 Fourier Analysis
58/60
Same !xample 1more data points2
#onsider the se"ence
[ ] cos(0.3 ), 0,..., 255 x n n nπ = =
$n this case 0 0.3 , 256 N ω π = =BB n8*:)FFC
BBx8cos1*'4pin2C
BB E8fft1x2C
BB plot1a/s1E22
See the plot …
and its magnit"de plot
-
8/18/2019 1 Fourier Analysis
59/60
0 and its magnit"de plot
k
| [ ] | X k
0 50 100 150 200 2500
20
40
60
80
100
0 38k = 0 218 N k − =
The first max corresponds to fre"ency 0 38 2 / 256 0.3ω π π = × ≅
!xample
-
8/18/2019 1 Fourier Analysis
60/60
!xample
Go" take the ..T of a signal and yo" get this magnit"de:
|][| k X
k
There are two peaks corresponding
to two fre"encies:π
π π ω
π π π
ω
6328.0256
281
2
2109.0256
227
2
22
11
===
===
N k
N k
0 50 100 150 200 250 3000
50
100
150
271 =k 2 81k =