Вы находитесь на странице: 1из 11

Connexions module: m10784 1


Discrete Time Fourier Series (DTFS)

Michael Haag
Justin Romberg
This work is produced by The Connexions Project and licensed under the

Creative Commons Attribution License 3.0

Abstract
This modules derives the Discrete-Time Fourier Series (DTFS), which is a fourier series type expansion
for discrete-time, periodic functions. The module also takes some time to review complex sinusoids which
will be used as our basis.

1 Introduction
In this module, we will derive an expansion for discrete-time, periodic functions, and in doing so, derive the
Discrete Time Fourier Series (DTFS), or the Discrete Fourier Transform (DFT). 1

2 DTFS
2.1 Eigenfunction analysis
Since complex exponentials are eigenfunctions of linear time-invariant (LTI) systems , calculating the output
2 3

of an LTI system H given eiωn as an input amounts to simple multiplication, where ω0 = 2πk N , and where
H [k] ∈ C is the eigenvalue corresponding to k. As shown in the gure, a simple exponential input would
yield the output
y [n] = H [k] eiωn (1)

Figure 1: Simple LTI system.

∗ Version 2.15: Dec 19, 2013 9:40 am -0600


† http://creativecommons.org/licenses/by/3.0/
1 "Discrete Fourier Transform (DFT)" <http://cnx.org/content/m10249/latest/>
2 "Continuous Time Complex Exponential" <http://cnx.org/content/m10060/latest/>
3 "Eigenfunctions of LTI Systems" <http://cnx.org/content/m10500/latest/>

http://cnx.org/content/m10784/2.15/
Connexions module: m10784 2

Using this and the fact that H is linear, calculating y [n] for combinations of complex exponentials is
also straightforward.

c1 eiω1 n + c2 eiω2 n → c1 H [k1 ] eiω1 n + c2 H [k2 ] eiω1 n

X X
cl eiωl n → cl H [kl ] eiωl n
l l

The action of H on an input such as those in the two equations above is easy to explain. H indepen-
dently scales each exponential component eiω n by a dierent complex number H [kl ] ∈ C. As such, if we
l

can write a function y [n] as a combination of complex exponentials it allows us to easily calculate the output
of a system.

2.2 DTFS synthesis


It can be demonstrated that an arbitrary Discrete Time-periodic functionf [n] can be written as a linear
combination of harmonic complex sinusoids
N −1
(2)
X
f [n] = ck eiω0 kn
k=0

where ω0 = 2π N is the fundamental frequency. For almost all f [n] of practical interest, there exists cn
to make (2) true. If f [n] is nite energy ( f [n] ∈ L2 [0, N ]), then the equality in (2) holds in the sense
of energy convergence; with discrete-time signals, there are no concerns for divergence as there are with
continuous-time signals.
The cn - called the Fourier coecients - tell us "how much" of the sinusoid ejω0 kn is in f [n]. The formula
shows f [n] as a sum of complex exponentials, each of which is easily processed by an LTI system (since it
is
 an eigenfunction of every LTI system). Mathematically, it tells us that the set of complex exponentials
∀k, k ∈ Z : ejω0 kn form a basis for the space of N-periodic discrete time functions.


http://cnx.org/content/m10784/2.15/
Connexions module: m10784 3

3 DFT Synthesis Demonstration

4
Figure 2: Download or Interact (when online) with a Mathematica CDF demonstrating Discrete
Harmonic Sinusoids. To download, right click and save as .cdf.

4 DTFS Analysis
Say we have the following set of numbers that describe a periodic, discrete-time signal, where N = 4:
{. . . , 3, 2, −2, 1, 3, . . . }

Such a periodic, discrete-time signal (with period N ) can be thought of as a nite set of numbers. For
example, we can represent this signal as either a periodic signal or as just a single interval as follows:
4 See the le at <http://cnx.org/content/m10784/latest/HarmonicSinusoidsDrillDiscrete_display.cdf>

http://cnx.org/content/m10784/2.15/
Connexions module: m10784 4

(a) (b)

Figure 3: Here we can look at just one period of the signal that has a vector length of four and is
contained in C4 . (a) Periodic Function (b) Function on the interval [0, T ]

note: The cardinalsity of the set of discrete time signals with period N equals CN .
Here, we are going to form a basis using harmonic sinusoids. Before we look into this, it will be worth
our time to look at the discrete-time, complex sinusoids in a little more detail.

4.1 Complex Sinusoids


If you are familiar with the basic sinusoid signal and with complex exponentials then you should not have
5 6

any problem understanding this section. In most texts, you will see the the discrete-time, complex sinusoid
noted as:
eiωn

Example 1

Figure 4: Complex sinusoid with frequency ω=0

Example 2
5 "Elemental Signals" <http://cnx.org/content/m0004/latest/>
6 "Continuous Time Complex Exponential" <http://cnx.org/content/m10060/latest/>

http://cnx.org/content/m10784/2.15/
Connexions module: m10784 5

Figure 5: Complex sinusoid with frequency ω= π


4

4.1.1 In the Complex Plane


The complex sinusoid can be directly mapped onto our complex plane , which allows us to easily visualize
7

changes to the complex sinusoid and extract certain properties. The absolute value of our complex sinusoid
has the following characteristic:
∀n, n ∈ R : |eiωn | = 1 (3)


which tells that our complex sinusoid only takes values on the unit circle. As for the angle, the following
statement holds true:
∠ eiωn = wn (4)


For more information, see the section on the Discrete Time Complex Exponential to learn about
Aliasing , Negative Frequencies, and the formal denition of the Complex Conjugate .
Now that we have looked over the concepts of complex sinusoids, let us turn our attention back to nding
a basis for discrete-time, periodic signals. After looking at all the complex sinusoids, we must answer the
question of which discrete-time sinusoids do we need to represent periodic sequences with a period N .
Find a set of vectors ∀n, n = {0, . . . , N − 1} : bk = eiωk n such that

Equivalent Question:
{bk } are a basis for Cn
In answer to the above question, let us try the "harmonic" sinusoids with a fundamental frequency ω0 = 2π
N :

Harmonic Sinusoid
(5)

ei N kn

7 "The Complex Plane" <http://cnx.org/content/m10596/latest/>

http://cnx.org/content/m10784/2.15/
Connexions module: m10784 6

(a) (b) (c)

Figure 6: Examples of our Harmonic Sinusoids (a) Harmonic sinusoid with k = 0 (b) Imaginary
“ 2π ” “ 2π ” part
of sinusoid, = ei N 1n , with k = 1 (c) Imaginary part of sinusoid, = ei N 2n , with k = 2

ei N kn is periodic with period N and has k "cycles" between n = 0 and n = N − 1.


Theorem 1:
If we let  
1 2π
∀n, n = {0, . . . , N − 1} : bk [n] = √ ei N kn
N
where the exponential term is a vector in CN , then {bk } |k={0,...,N −1} is an orthonormal basis 8

for CN .
Proof:
First of all, we must show {bk } is orthonormal, i.e.< bk , bl >= δkl
N −1 N −1
X 1 X i 2π kn −(i 2π
N ln)
< bk , bl >= bk [n] bl [n] = e N e
n=0
N n=0

N −1
1 X i 2π (l−k)n
< bk , bl >= e N (6)
N n=0
If l = k, then
1
PN −1
< bk , bl > = 1
N n=0
(7)
= 1
If l 6= k, then we must use the "partial summation formula" shown below:
N −1 ∞ ∞
X X X 1 αN 1 − αN
αn = αn − αn = − =
n=0 n=0
1−α 1−α 1−α
n=N

N −1
1 X i 2π (l−k)n
< bk , bl >= e N
N n=0

where in the above equation we can say that α = ei N (l−k) , and thus we can see how this is in the

form needed to utilize our partial summation formula.



1 1 − ei N (l−k)N 1 1−1
< bk , bl >= = =0
N 1 − ei 2π
N (l−k) N 1 − ei 2π
N (l−k)

8 "Types of Bases": Section Orthonormal Basis <http://cnx.org/content/m10772/latest/#orthon_b>

http://cnx.org/content/m10784/2.15/
Connexions module: m10784 7

So, 
 1 if k = l
< bk , bl >= (8)
 0 if k 6= l

Therefore: {bk } is an orthonormal set. {bk } is also a basis , since there are N vectors which are
9

linearly independent (orthogonality implies linear independence).


10
n o
And nally, we have shown that the harmonic sinusoids √1N ei N kn form an orthonormal basis

for Cn

4.2 Periodic Extension to DTFS


Now that we have an understanding of the discrete-time Fourier series (DTFS), we can consider the periodic
extension of c [k] (the Discrete-time Fourier coecients). Figure 7 shows a simple illustration of how we
can represent a sequence as a periodic signal mapped over an innite number of intervals.

(a)

(b)

Figure 7: (a) vectors (b) periodic sequences

Exercise 1 (Solution on p. 11.)


Why does a periodic 11
extension to the DTFS coecients c [k] make sense?

4.2.1 Examples
Example 3: Discrete time square wave
9 "Linear Algebra: The Basics": Section Basis <http://cnx.org/content/m10734/latest/#sec_bas>
10 "Linear Algebra: The Basics": Section Linear Independence <http://cnx.org/content/m10734/latest/#lin_ind>
11 "Continuous Time Periodic Signals" <http://cnx.org/content/m10744/latest/>

http://cnx.org/content/m10784/2.15/
Connexions module: m10784 8

Figure 8

Calculate the DTFS c [k] using:


N −1
1 X
f [n] e−(i N kn) (9)

c [k] =
N n=0
Just like continuous time Fourier series, we can take the summation over any interval, so we have
N1
1
e−(i N kn) (10)
X 2π
ck =
N
n=−N1

Let m = n + N1 (so we can get a geometric series starting at 0)


1
P2N1 −(i 2π (m−N1 )k)
ck = m=0 e
N
N
2N1 −(i 2π
(11)
N mk )

1 iNk
P
= Ne m=0 e

Now, using the "partial summation formula"


M
1 − aM +1
(12)
X
an =
n=0
1−a

1 i 2π
P2N1  −(i 2π k) m
ck = N N1 k
Ne m=0 e
N

1 i 2π 1−e ( N
− i 2π (2N1 +1)) (13)
= N N1 k
Ne −(ik 2π )
1−e N

Manipulate to make this look like a sinc function (distribute):


( ) (N1 + 12 ) −e−(ik 2π
N ( 1 2 ))
„ «
− ik 2π ik 2π N +1
e 2N e N
1
ck = N ( ) ( )
„ «
− ik 2π 2π 1 − ik 2π 1
e 2N eik N 2 −e N 2

(14)
!
sin
(
2πk N1 + 1
2 )
N
1
= N sin( πk
N )

= digital sinc

http://cnx.org/content/m10784/2.15/
Connexions module: m10784 9

note: It's periodic! Figure 9, Figure 10, and Figure 11show our above function and coecients
for various values of N1 .

(a) (b)

Figure 9: N1 = 1 (a) Plot of f [n]. (b) Plot of c [k].

(a) (b)

Figure 10: N1 = 3 (a) Plot of f [n]. (b) Plot of c [k].

http://cnx.org/content/m10784/2.15/
Connexions module: m10784 10

(a) (b)

Figure 11: N1 = 7 (a) Plot of f [n]. (b) Plot of c [k].

5 DTFS conclusion
Using the steps shown above in the derivation and our previous understanding of Hilbert Spaces and 12

Orthogonal Expansions , the rest of the derivation is automatic. Given a discrete-time, periodic signal
13

(vector in Cn ) f [n], we can write:


N −1
1 X
(15)

f [n] = √ ck ei N kn
N k=0
N −1
1 X
f [n] e−(i N kn) (16)

ck = √
N n=0
Note: Most people collect both the √1
N
terms into the expression for ck .
Discrete Time Fourier Series: Here is the common form of the DTFS with the above note
taken into account:
N −1

X
f [n] = ck ei N kn
k=0

N −1
1
f [n] e−(i N kn)
X 2π
ck =
N n=0

This is what the fft command in MATLAB does.

12 "Inner Products" <http://cnx.org/content/m10755/latest/>


13 "Orthonormal Basis Expansions" <http://cnx.org/content/m10760/latest/>

http://cnx.org/content/m10784/2.15/
Connexions module: m10784 11

Solutions to Exercises in this Module


Solution to Exercise (p. 7)
Aliasing: bk = ei N kn


bk+N = ei N (k+N )n

= ei N kn ei2πn

(17)
= ei N n
= bk
→ DTFS coecients are also periodic with period N .

http://cnx.org/content/m10784/2.15/

Вам также может понравиться