Fourier Series
and Fourier Transforms
EECS2 (6.082), MIT
Fall 2006
Lectures 2 and 3
Fourier Series
From your differential equations course, 18.03,
you know Fourier’s expression representing a
T -periodic time function x(t) as an infinite sum
of sines and cosines at the fundamental fre-
quency and its harmonics, plus a constant term
equal to the average value of the time function
over a period:
∞
X
x(t) = a0 + an cos(nω0t)+bn sin(nω0t) (1)
n=1
where
2π
ω0 =
T
Z
1 T /2
a0 = x(t) dt (2)
T −T /2
and for integer n>0
Z
2 T /2
an = x(t) cos(nω0t) dt (3)
T −T /2
Z
2 T /2
bn = x(t) sin(nω0t) dt (4)
T −T /2
1
Some comments on symmetries
1. The integrals could have been taken over
any interval of length T , but the symmetric
interval [− T2 , T2 ] is most convenient for us.
2. Note from the defining expressions that if
x(t) is an even function of t, i.e., if
x(−t) = x(t) ,
then bn = 0 for all n > 0, so only cosine
terms appear in the Fourier series.
Similarly, if x(t) is an odd function of t, i.e.,
if
x(−t) = −x(t) ,
then an = 0 for all n ≥ 0, so only sine terms
appear in the Fourier series.
2
Recall some useful trigonometric identities
cos(−p) = cos p
sin(−p) = − sin p
cos(p + q) = cos p cos q − sin p sin q
sin(p + q) = sin p cos q + cos p sin q
The latter two are most easily derived from
Euler’s identity:
ejθ = cos θ + j sin θ
√
where j = −1.
From the cosine-sum and sine-sum identities
above, various other identities can be derived,
e.g.,
2 cos p cos q = cos(p + q) + cos(p − q)
2 sin p sin q = cos(p − q) − cos(p + q)
2 sin p cos q = sin(p + q) + sin(p − q)
3
Example 1 (sanity check)
Suppose x(t) = K cos ω0t, with ω0 > 0. Then
Z
2 T /2
a1 = K cos2(ω0t) dt = K
T −T /2
while all other an and all bn are 0. So the
Fourier series for x(t) is simply K cos ω0t, as it
should be!
Similarly, the Fourier series for x(t) = K sin(ω0t)
is just this expression itself.
4
Example 2 (magnitude and phase)
Suppose x(t) = a cos(ω0t) + b sin(ω0t), with
ω0 > 0. This evidently is periodic with pe-
riod T = 2π/ω0, and its Fourier series will be
the same expression again. But there’s an al-
ternative representation that yields a bit more
insight:
Rewrite x(t) as
q µ
x(t) = a2 + b2 √ a cos(ω0t) +
a2 +b2
¶
√ b sin(ω0t)
a2 +b2
and let
µ ¶
b
θ = arctan
a
so
a b
q = cos θ , q = sin θ
a2 + b2 a2 + b2
...→
5
Example 2 (continued)
(Construct for yourself a right-angled triangle
that displays the preceding relations among a,
b, and θ.)
Our previous expression for x(t) then becomes
q µ ¶
x(t) = a2 + b2 cos θ cos(ω0t) + sin θ sin(ω0t)
= c cos(ω0t − θ)
where
q
c= a2 + b2
So adding a cosine and a sine of the same
frequency, but possibly different amplitudes,
yields (perhaps surprisingly) a pure sinusoid
again, with magnitude and phase as specified
above. We refer to the cosine and sine as hav-
ing added ”in quadrature”, because the two
are displaced from each other by 90 degrees
(π/2 radians).
6
Magnitude/phase form of Fourier series
The transformation carried out on the x(t) in
the previous example can be equally well ap-
plied to a typical term of the Fourier series in
(1), to obtain
an cos(nωµ0
t) + bn sin(nω0t)
q
= a2 2 an
n + bn p 2 2 cos(nω0t) +
an +bn
¶
p bn sin(nω0t)
a2
n +b 2
n
Letting
µ ¶
bn
θn = arctan
an
and
q
cn = a2 2
n + bn
for n ≥ 0 (with c0 = a0 and θ0 = 0), we get the
following alternate form of (1) for a T -periodic
function x(t):
∞
X
x(t) = cn cos(nω0t − θn) (5)
n=0
7
A two-sided Fourier series
It is convenient for many purposes to rewrite
the Fourier series in yet another form, allow-
ing both positive and negative multiples of the
fundamental frequency. To obtain such a two-
sided representation, note that
an an
an cos nω0t = cos nω0t + cos n(−ω0)t
2 2
bn bn
bn sin nω0t = sin nω0t − sin n(−ω0)t
2 2
Now for all integer n (negative, zero, and pos-
itive) define
Z
1 T /2
An = x(t) cos nω0t dt (6)
T −T /2
Z
1 T /2
Bn = − x(t) sin nω0t dt (7)
T −T /2
(The minus sign preceding the integral in the
definition of Bn serves to make our notation
consistent with the notation that is widely used
in engineering.) ...→
8
Two-sided Fourier series (continued)
From the preceding definitions, we conclude
that A0 = a0, and for n > 0
an
An = = A−n
2
bn
Bn = − = −B−n
2
With these definitions, the Fourier series for a
T -periodic function x(t) can be written in the
form
∞
X
x(t) = An cos nω0t − Bn sin nω0t (8)
n=−∞
Note that the summation now runs symmet-
rically over all integer n (negative, zero, and
positive), corresponding to terms at all integer
multiples of the fundamental frequency.
9
Magnitude/phase form of two-sided series
By defining
µ ¶
Bn
θn = arctan
An
and
q
Xn = A2
n + Bn
2
we can write
An = Xn cos θn , Bn = Xn sin θn
Using the now familiar procedure, we can use
the preceding relations to rewrite the two-sided
series in magnitude/phase form as
∞
X
x(t) = Xn cos(nω0t + θn)
n=−∞
10
A step further
Let’s go a small step beyond where you left off
in 18.03:
If x(t) = an cos(nω0t), then the average value
of x2(t) over a period — the ”mean square”
value of x(t) — is
Z Z
1 T /2 2 1 T /2 2
x (t) dt = an cos2(nω0t) dt
T −T /2 T −T /2
a2
= n
2
Extending this kind of calculation in a straight-
forward way, and invoking the standard trigono-
metric identities listed earlier, produces the var-
ious equivalent expressions shown on the next
slide for the mean square value of a general
periodic x(t).
...→
11
Parseval’s theorem
The mean square value of a T -periodic signal
x(t) is given in terms of its Fourier series co-
efficients by the following expressions:
Z
1 T /2 2
x (t) dt
T −T /2
X∞
1
= a2
0+ (a2 2
n + bn )
2 n=1
∞
X
1
= c2
0+ c2
2 n=1 n
∞
X
= (A2 2
n + Bn )
n=−∞
X∞
= Xn2
n=−∞
12
Some consequences of Parseval’s
1. The mean square value of x(t) is finite (for
all cases of interest to us), so the infinite sums
on the previous slide are all finite, which must
mean that the Fourier coefficients all decay to
0 as |n| ↑ ∞ — in particular, |Xn| ↓ 0.
2. It is often useful or necessary to approxi-
mate x(t) by a finite number of terms from its
Fourier series, for instance by
N
X
xN (t) = Xn cos(nω0t + θn)
n=−N
Note that the highest frequency in this approx-
imating signal is N ω0. The mean square error
in this case is
Z µ ¶2 X
1 T /2
x(t) − xN (t) dt = Xn2
T −T /2 |n|>N
13
Complex notation for compact expressions
Recall
∞
X
x(t) = An cos nω0t − Bn sin nω0t
n=−∞
where An and Bn are specified by the integrals
in (6), (7). Defining
c = A + jB = X ejθn
X n n n n
so
Z
1 T /2
c
Xn = x(t)e−jnω0t dt (9)
T −T /2
allows us to rewrite the expression for x(t) as
∞
X
x(t) = c ejnω0t
X (10)
n
n=−∞
(The reason the imaginary part of the sum
drops out is that An = A−n and Bn = −B−n.)
Equations (9) and (10) comprise the complex
form of the Fourier series representation for a
T -periodic signal.
14
Non-periodic signals: From Fourier series
to Fourier transforms
We are often interested in non-periodic signals,
for instance an x(t) of finite duration, or one
that decays to 0 as |t| ↑ ∞. The signals of
interest to us typically satisfy
Z ∞ Z ∞
|x(t)| dt < ∞ or |x(t)|2 dt < ∞
−∞ −∞
We can consider such signals to have an infinite
period, and can obtain a Fourier representation
by taking the limit
2π
T ↑∞, nω0 = n →ω,
T
ω0 → dω , c → X(ω)
TX c
n
with summations suitably replaced by integrals.
c
The resulting X(ω) is termed the Fourier trans-
form of x(t).
...→
15
The Fourier transform
The resulting expressions replace (10) and (9)
respectively by
Z
1 ∞ c
x(t) = X(ω)ejωt dω (11)
2π −∞
and
Z ∞
c
X(ω) = x(t)e−jωt dt (12)
−∞
The first of this pair of equations, (11), is
the Fourier synthesis equation, showing how
a general time function may be expressed as
a weighted combination of exponentials of all
c
frequencies ω; the Fourier transform X(ω) de-
termines the weighting.
The second of this pair of equations, (12), is
the Fourier analysis equation, showing how to
compute the Fourier transform from the signal.
16
Some additional observations
Remember that X(ω)c is in general a complex
number at each ω, even though x(t) is real —
c = A + jB .
reflecting the earlier definition Xn n n
We shall denote the real and imaginary parts
c
of X(ω) by A(ω) and B(ω) respectively, so
c
X(ω) = A(ω) + jB(ω)
We shall denote the magnitude and angle of
c
X(ω) by X(ω) and θX (ω) respectively, so
c
|X(ω)| = X(ω) c
6 X(ω) = θX (ω)
Thus
c
X(ω) = X(ω)ejθX (ω)
17