Vous êtes sur la page 1sur 36

Fourier series of periodic discrete-time signals

1
Discrete-time signal x(n):
Dened for integer time instants n:
{x(n)} = {. . . , x(2), x(1), x(0), x(1), x(2), . . .}
2
In analogy with continuous-time signals, discrete-
time signals can be expanded in terms of sinusoidal
components of form A
k
cos(
k
n +
k
)
2 0 2 4 6 8 10 12
1
0
1
cos(2fn + ), f = 0.1(Hz), = 2f 2(rad)
3
Consider a periodic discrete-time signal with period
N:
x(n) = x(n + N), all n
4
In analogy with continuous-time case the discrete
sinusoidal signals
cos(
2k
N
n), sin(
2k
N
n), k = 0, 1, 2, . . .
have period N.
It follows that an N-periodic signal {x(n)} can be
expanded in terms of sinusoidal signals
cos(
2k
N
n), sin(
2k
N
n), k = 0, 1, 2, . . .
5
Important dierence compared to continuous-
time case:
We have
cos(n) = cos(n + 2nl)
= cos (n( + 2l)), all integers l
=
Frequencies and + 2l give the same discrete-
time sequence
NOTE: works only because time n is an integer!
6
Hence we need only include frequency components
cos(2
1
N
n), cos(2
2
N
n), . . . , cos(2
N 1
N
n)
sin(2
1
N
n), sin(2
2
N
n), . . . , sin(2
N 1
N
n)
and we obtain the Fourier series
x(n) = a
0
+
N1

k=1
a
k
cos(k
2
N
n) +
N1

k=1
b
k
sin(k
2
N
n)
7
As before, we can express each frequency component
in terms of complex exponentials:
x(n) =
N1

k=N+1
c
k
e
j2kn/N
As time n is an integer we can eliminate the negative
exponentials:
e
j2(m)n/N
= e
j2(m)n/N+j2n
= e
j2(Nm)n/N
=
Terms with k = m < 0 can be replaced by a term
with k = N m > 0
8
NOTE:
As c
k
= c

k
, we have
c
k
e
j2(k)n/N
= c

k
e
j2(Nk)n/N
Fourier series of discrete-time periodic signal
An N-periodic discrete-time signal can be expanded
as
x(n) =
N1

k=0
d
k
e
j2kn/N
where d
Nk
= d

k
9
Here the complex-valued frequency components are
given by
d
k
=
1
N
N1

n=0
x(n)e
j2kn/N
Proof:
Multiply expression for x(n) with e
j2mn/N
and sum
over time n over one period:
1
N
N1

n=0
_
e
j2mn/N

_
x(n) =
N1

k=0
d
k
e
j2kn/N
__
10
Here the right-hand side becomes
1
N
N1

k=0
d
k
N1

n=0
e
j2(km)n/N
which vanishes if m = k, because
N1

n=0
e
j2(km)n/N
=
_
N, if k m = 0, N, 2N, . . .
0, otherwise
Hence
1
N
N1

k=0
d
k
N1

n=0
e
j2(km)n/N
= d
m
11
and
1
N
N1

n=0
x(n)e
j2mn/N
= d
m
giving the result
12
EXAMPLE: Periodic discrete-time square wave with period
N = 4:
x(0) = 1
x(1) = 1
x(2) = 0
x(3) = 1
-5 -4 -3 -2 -1 0 1 2 3 4 5

x(n)
n
and x(n) = x(n 4), all n
Frequency components: 0,
2
4
,
22
4
,
23
4
(Next frequency
24
4
= 2 is equivalent to frequency
component 0)
13
Fourier series:
d
k
=
1
4
3

n=0
x(n)e
j2kn/4
=
1
4
_
1 e
j2k0/4
+ 1 e
j2k1/4
+ 0 + 1 e
j2k3/4
_
=
1
4
_
1 + e
jk/2
+ e
jk3/2
_
=
1
4
[1 + 2 cos (k/2)]
=
d
0
=
3
4
, d
1
=
1
4
, d
2
=
1
4
, d
3
=
1
4
0 2 /2

3/2
d
k
14
Hence
x(n) =
3

k=0
d
k
e
j2kn/4
=
3
4
+
1
4
e
j21n/4

1
4
e
j22n/4
+
1
4
e
j23n/4
=
3
4
+
1
4
[cos (n/2) + j sin(n/2)]

1
4
[cos (n) + j sin(n)] +
1
4
[cos (3n/2) + j sin(3n/2)]
Note that as x(n) is real the imaginary components should
vanish
15
Here we have:
- sin(n) = 0
- cos(n) = (1)
n
In addition, frequency components 3/2 and /2 are related,
because
- sin(3n/2)=sin(3n/22n)=sin(n/2)=sin(n/2),
and
- cos(3n/2)=cos(3n/2 2n)=cos(n/2)=cos(n/2)
=
x(n) =
3
4
+
1
2
cos
_
2
4
n
_

1
4
(1)
n
16
NOTE:
In above example the Fourier series coecients d
k
were real.
Reason: Recall that
a
k
cos(2kn/N)+b
k
sin(2kn/N) = c
k
e
j2kn/N
+c

k
e
j2kn/N
where
c
k
=
1
2
(a
k
jb
k
) , c

k
=
1
2
(a
k
+ jb
k
)
As x(n) is even, x(n) = x(n), the sine-terms vanish so that
b
k
= 0 and hence c
k
and d
k
are real.
17
Next example illustrates a signal which is not even.
Consider the periodic signal
x(0) = 1
x(1) = 1
x(2) = 1
x(3) = 0
and x(n) = x(n 4), all n
We see that x(n) = x(n 1), all n.
18
Hence
x(n) = x(n 1)
=
3

k=0
d
k
e
j2k(n1)/4
=
3

k=0
d
k
e
j2k/4
e
j2kn/4
=
3

k=0

d
k
e
j2kn/4
where

d
k
= d
k
e
j2k/4
19
or

d
0
= d
0
e
j0
=
3
4

d
1
= d
1
e
j/2
=
1
4
(j)

d
2
= d
2
e
j
=
1
4
(1)

d
3
= d
3
e
j3/2
=
1
4
j
20
Fourier series of non-periodic discrete-time
signals
In analogy with the continuous-time case a non-periodic
discrete-time signal consists of a continuum of frequencies
(rather than a discrete set of frequencies)
But recall that
cos(n) = cos(n + 2nl)
= cos (n( + 2l)), all integers l
=
Only frequencies up to 2 make sense
21
Hence a discrete-time signal {x(n)} can be expanded as
x(n) =
1
2
_
2
0
X()e
jn
d
where it can be shown that the Fourier transform X() is given
by
X() =

n=
x(n)e
jn
22
THE DISCRETE FOURIER TRANSFORM (DFT)
Next lets introduce the standard denition of the discrete
Fourier transform of a sequence
{x(0), x(1), . . . , x(N 1)}
of nite length N.
We do not make any assumptions about the signal (periodicity
etc) outside the range 0 n N 1.
23
Facts:
- from N signal values x(0), x(1), . . . , x(N 1) at most N
independent frequency components can be computed
- frequency components 2 are redundant (identical with
frequencies < 2
- lower bound on frequency resolution is 2/N (= frequency
corresponding to period length equal to sequence length N)
Hence it makes sense to determine the frequency components
at the N equidistant frequencies
0,
1
N
2,
2
N
2, . . . ,
N 1
N
2
i.e., the same frequencies contained in an N-periodic signal
24
DISCRETE FOURIER TRANSFORM (DFT):
The DFT {X(k)}
N1
k=0
of a sequence {x(k)}
N1
k=0
is
dened as
X(k) =
N1

n=0
x(n)e
j2
k
N
n
, k = 0, 1, . . . , N1 (DFT)
and the inverse DFT (IDFT) is given by
x(n) =
1
N
N1

k=0
X(k)e
j2
k
N
n
, n = 0, 1, . . . , N 1
Observe similarity with Fourier transform of periodic
signal
25
EXAMPLE
Show that the Discrete Fourier Transform of the
sequence
{x(n)} = {1, 0, 0, 1}
is given by
{X(k)} = {2, 1 + j, 0, 1 j}
26
PROPERTIES OF DFT
Symmetry property.
For a real sequence {x(n)}, the DFT satises
X(N k) = X(k)

(complex conjugate)
i.e.,
Re[X(N k)] =Re[X(k)]
Im[X(N k)] =Im[X(k)], k = 1, . . . , N 1
27
Follows from the fact that in the denition of X(N k),
x(n)e
j2
Nk
N
n
= x(n)e
j2
k
N
nj2
= x(n)e
j2
k
N
n
=
_
x(n)e
j2
k
N
n
_

DC component.
For k = 0 we have
X(0) =
N1

n=0
x(n)e
j2
0
N
n
=x(0) + x(1) + + x(N 1)
Hence X(0) is real if x(n) are real and the
28
contribution of X(0) to x(n) is
1
N
X(0)e
0
=
1
N
X(0)
i.e., a constant component (usually called the DC
component).
Oscillating component.
For even values of N, we have for k = N/2
X(N/2) =
N1

n=0
x(n)e
j2
N/2
N
n
=
N1

n=0
x(n)e
jn
= x(0) x(1) + x(N 1)
Hence X(N/2) is real if x(n) are real and the
29
contribution of X(N/2) to x(n) is
1
N
X(N/2)e
j2
N/2
N
n
=
1
N
X(N/2) (1)
n
i.e., an oscillating component.
Parsevals relation.
The energy of the signal {x(n)} dened as
P
x
=
N1

n=0
x(n)
2
can be computed in the frequency domain using
30
Parsevals relation,
P
x
=
N1

n=0
x(n)
2
=
1
N
N1

k=0
|X(k)|
2
It follows that
1
N
|X(k)|
2
can be interpreted as the
contribution to the total energy of the signal from
frequency component 2k/N.
Note: important in signal compression!
DFT of a function.
The function,
(n) =
_
1, n = 0
0, n = 0
31
has DFT X(k) = 1, k = 0, 1, . . . , N 1.
Hence it consists of equal amounts of all
frequencies!
32
DIRECT COMPUTATION OF DFT SUM IS
NOT ADVISABLE IN PRACTICE:
- HIGH COMPUTATIONAL BURDEN:
Computation of sequence X(k) requires N
2
complex additions and multiplications (a lot for
long sequences)
- Numerical round-o errors add up when evaluation
long sum
33
EFFICIENT ALGORITHM FOR SOLUTION:
Fast Fourier Transform (FFT)
- FFT: N log
2
N complex additions and
(N/2) log
2
N complex multiplications (compare
N
2
using direct evaluation)
- Each element X(k) is obtained by only log
2
N
complex additions (compare with N using direct
evaluation) signicantly smaller round-o errors
34
FFT uses the fact that the discrete Fourier transform
X(k) of a sequence {x(0), x(1), . . . , x(N 1)} with
N even can be determined as
X(k) = X
11
(k) + W
k
N
X
12
(k), k = 0, 1, . . . , N/2 1
X(k + N/2) = X
11
(k) W
k
N
X
12
(k), k = 0, 1, . . . , N/2 1
where W
N
= e
j2/N
,
{X
11
(k)} is the Fourier transform of the even
subsequence {x(0), x(2), . . . , x(N 2)}, and
X
12
(k)} is the Fourier transform of the odd
subsequence {x(1), x(3), . . . , x(N 1)}.
35
INTERPRETATION OF FOURIER TRANSFORM
COMPONENTS
0
X(0)
X(1)
1

X(k)
k

X(N/2)
N/2

X(N-k)=X(k)

N-k

X(N-1)=X(1)

N-1 N
Normalized frequency 0
1
N
k
N
1
2
Nk
N
N1
N
1 (Hz)
Actual frequency
Sampling frequency f
s
= 1/Ts
0
1
N
f
s
k
N
f
s
1
2
f
s
Nk
N
f
s
N1
N
f
s
f
s
(Hz)
Matlab indexing X(1) X(2) X(k+1) X(N/2+1) X(N-k+1) X(N)
36

Vous aimerez peut-être aussi