ELEC-C5231 Lecture4 Fourier Part2
ELEC-C5231 Lecture4 Fourier Part2
Filip Elvander
March 6, 2025
0.
Today’s lecture
Filter design
(Ch. 10)
March 6, 2025
0.
Four types of signals
1 1
0.8 0.8
0.6 0.6
0.4 0.4
0.2 0.2
0 0
-0.2 -0.2
-0.4 -0.4
-0.6 -0.6
-0.8 -0.8
-1 -1
0 2 4 6 8 10 0 2 4 6 8 10
t t
Continuous and periodic. Continuous and aperiodic.
5 5
4 4
3 3
2 2
1 1
0 0
-1 -1
-2 -2
-3 -3
-4 -4
-5 -5
0 5 10 15 20 0 5 10 15 20
n n
Discrete and periodic. Discrete and aperiodic.
March 6, 2025
0.
Continuous-time periodic signals
Z Tp
1
Analysis equation: ck = xa (t)e− j2πkF0 t dt (Fourier coefficients)
Tp 0
∞
Synthesis equation: xa (t) = ∑ ck e j2πkF0 t (Fourier series)
k=−∞
Z Tp ∞
1
Parseval’s identity: |xa (t)|2 dt = ∑ |ck |2
Tp 0 k=−∞
1 0.025
| ck | 2
0.8
0.6 0.02
0.4
0.2 0.015
-0.2 0.01
-0.4
-0.6 0.005
-0.8
-1 0
0 2 4 6 8 10 -6 -4 -2 0 2 4 6
t F (Hz)
March 6, 2025
0.
Continuous-time aperiodic signals
Z ∞
Analysis equation: Xa (F) = xa (t)e− j2πFt dt (Fourier transform)
−∞
Z ∞
Synthesis equation: xa (t) = Xa (F)e j2πFt dF (inverse Fourier transform)
−∞
Z ∞ Z ∞
Parseval’s identity: |xa (t)|2 dt = |X(F)|2 dF
−∞ −∞
1 0.14
|X(F)|2
0.8
0.12
0.6
0.4 0.1
0.2
0.08
0
0.06
-0.2
-0.4 0.04
-0.6
0.02
-0.8
-1 0
0 2 4 6 8 10 -8 -6 -4 -2 0 2 4 6 8
t F
Cont.-time aperiodic signal. Energy spectrum.
March 6, 2025
0.
Four types of signals
1 1
0.8 0.8
0.6 0.6
0.4 0.4
0.2 0.2
0 0
-0.2 -0.2
-0.4 -0.4
-0.6 -0.6
-0.8 -0.8
-1 -1
0 2 4 6 8 10 0 2 4 6 8 10
t t
Continuous and periodic. Continuous and aperiodic.
5 5
4 4
3 3
2 2
1 1
0 0
-1 -1
-2 -2
-3 -3
-4 -4
-5 -5
0 5 10 15 20 0 5 10 15 20
n n
Discrete and periodic. Discrete and aperiodic.
March 6, 2025
0.
Discrete-time periodic signals
sequences 4
x(n) = {. . . , x(−1), x(0), x(1), . . .}. 3
0
• It is enough to be able to explain
-1
x(0), x(1), . . . , x(N − 1). Any description
that is matches these values and -2
-4
• What would be a good description?
-5
0 5 10 15 20
n
Discrete and periodic.
March 6, 2025
0.
Recap: periodic signals in continuous time
Recall that for periodic continuous-time signal xa (t) we could write
∞
xa (t) = ∑ ck e j2πkF0 t , F0 = 1/Tp .
k=−∞
March 6, 2025
0.
Harmonics in discrete time
If x(n + N) = x(n) for all n (with N ∈ N = {1, 2, . . .}), then f0 = 1/N is the
”fundamental frequency”.
• What happens if we create ”harmonics” xk (n) = e j2πk f0 n = e j2πkn/N ,
k = 0, ±1, . . .?
• Then, we could have something like x(n) = ∑∞ j2πkn/N .
k=−∞ ck e
First observation: most harmonics are actually useless. Note that for any
p∈Z
xk+pN (n) = e j2π(k+pN) f0 n = e j2π(k+pN)n/N = e j2πkn/N e j2π pNn/N
= e j2πkn/N e j2π pn = e j2πkn/N = xk (n).
March 6, 2025
0.
Collecting facts
March 6, 2025
0.
Representation of discrete-time periodic signals
We have shown that for any N-periodic discrete-time signal x(n)
N−1
∃c0 , c1 , . . . , cN−1 ∈ C : x(n) = ∑ ck e j2πkn/N .
k=0
But what are the coefficients ck ? As in the previous lecture, the orthogonality
of the basis makes it very easy. Take any ℓ ∈ {0, 1, . . . , N − 1}. Then,
N−1 N−1 N−1 N−1 N−1
∑ e− j2πℓn/N x(n) = ∑ e− j2πℓn/N ∑ ck e j2πkn/N = ∑ ck ∑ e j2π(k−ℓ)n/N
n=0 k=0 k=0 k=0 n=0
= Ncℓ .
March 6, 2025
0.
Discrete-time periodic signals
N−1
1
Analysis equation: ck =
N ∑ x(n)e− j2πkn/N
n=0
N−1
Synthesis equation: x(n) = ∑ ck e j2πkn/N
k=0
N−1 N−1
1
Parseval’s identity:
N ∑ |x(n)|2 = ∑ |ck |2 (as an exercise: verify this!)
n=0 k=0
4
2.5
3
2
2
1
| ck |2
0 1.5
-1
-2 1
-3
0.5
-4
-5 0
0 5 10 15 20
-6 -4 -2 0 2 4 6 8 10 12
n k
Disc.-time periodic signal. Power spectrum.
March 6, 2025
0.
Four types of signals
1 1
0.8 0.8
0.6 0.6
0.4 0.4
0.2 0.2
0 0
-0.2 -0.2
-0.4 -0.4
-0.6 -0.6
-0.8 -0.8
-1 -1
0 2 4 6 8 10 0 2 4 6 8 10
t t
Continuous and periodic. Continuous and aperiodic.
5 5
4 4
3 3
2 2
1 1
0 0
-1 -1
-2 -2
-3 -3
-4 -4
-5 -5
0 5 10 15 20 0 5 10 15 20
n n
Discrete and periodic. Discrete and aperiodic.
March 6, 2025
0.
Discrete-time aperiodic signals
N). 2
1
• Now, we have infinite dimension:
0
infinitely long sequences with
-1
arbitrary patterns.
-2
• We will need an infinite-dimensional
-3
basis.
-4
-5
0 5 10 15 20
n
Discrete and aperiodic.
March 6, 2025
0.
What did we do in continuous time?
In the last lecture, when the continuous-time signal xa (t) was aperiodic,
Z ∞
Analysis equation: Xa (F) = xa (t)e− j2πFt dt (Fourier transform)
−∞
Z ∞
Synthesis equation: xa (t) = Xa (F)e j2πFt dF (inverse Fourier transform)
−∞
March 6, 2025
0.
Synthesis?
∞
X(ω) = ∑ x(n)e− jωn , ω ∈ (−π, π].
n=−∞
This transform is only useful if we can synthesize x(n) from X(ω). Note that
sinusoids e jωn for n ∈ Z form an orthogonal set of functions on (−π, π]:
(
2π n = m
Z π Z π
− jωn − jωm jω(m−n)
e e dω = e dω =
−π −π 0 n ̸= m,
so lets try
!
∞
1 1
Z π Z π
jωm − jωn
X(ω)e dω = ∑ x(n)e e jωm dω
2π −π 2π −π n=−∞
∞ ∞
1 1
Z π Z π
”nice” series
= ∑ x(n) e− jωn e jωm dω = ∑ x(n) e jω(m−n) dω = x(n).
2π n=−∞ −π 2π n=−∞ −π
Technically, if ∑∞
n=−∞ |x(n)| < ∞, then x(n) is ”nice” enough for this to work.
March 6, 2025
0.
Signal and its Fourier transform
5 3.5
|X( )|2
4
3
3
2 2.5
1
2
0
1.5
-1
-2 1
-3
0.5
-4
-5 0
0 5 10 15 20 -3 -2 -1 0 1 2 3
n
Discrete and aperiodic signal. Energy spectrum.
March 6, 2025
0.
Discrete-time aperiodic signals
∞
Analysis equation: X(ω) = ∑ x(n)e− jωn (Discrete-time Fourier transform, DTFT)
n=−∞
1 π
Z
Synthesis equation: x(n) = X(ω)e jωm dω
2π −π
∞ Z π
Parseval’s identity: ∑ |x(n)|2 = |X(ω)|2 dω
n=−∞ −π
2
You can verify that ∑∞ ∞
−∞ |x(n)| does not converge, but ∑−∞ |x(n)| < ∞.
Rπ 2
⇒ We are guaranteed −π |XN (ω) − X(ω)| → 0 but not uniform convergence.
0.25 1.2
x(n) X( )
0.2 1
0.15
0.8
0.1
0.6
0.05
0.4
0
0.2
-0.05
0
-0.1
-20 -15 -10 -5 0 5 10 15 20
-3 -2 -1 0 1 2 3
n
March 6, 2025
0.
Gibbs phenomenon
Let’s construct the partial sums
N
1
XN (ω) = ∑ x(n)e− jωn , where x(n) = sinc(ωc n).
n=−N π
0.8 1.05
0.6 1
0.4 0.95
0.9
0.2
0.85
0
0.8
-0.2 0.6 0.65 0.7 0.75 0.8 0.85
-1.5 -1 -0.5 0 0.5 1 1.5
N = 100.
March 6, 2025
0.
Gibbs phenomenon
Let’s construct the partial sums
N
1
XN (ω) = ∑ x(n)e− jωn , where x(n) = sinc(ωc n).
n=−N π
0.8 1.05
0.6 1
0.4 0.95
0.9
0.2
0.85
0
0.8
-0.2 0.6 0.65 0.7 0.75 0.8 0.85
-1.5 -1 -0.5 0 0.5 1 1.5
N = 5000.
March 6, 2025
0.
Sampling
Sampling with sampling period T (i.e., sampling frequency Fs = 1/T ):
1 1
0.8 0.8
0.6 0.6
0.4 0.4
0.2 0.2
0 0
-0.2 -0.2
-0.4 -0.4
-0.6 -0.6
-0.8 -0.8
-1 -1
0 5 10 15 20 0 5 10 15 20
t n
March 6, 2025
0.
Frequency consequences of sampling?
Let xa (t) be a continuous-time aperiodic signal. Consider sampling xa (t)
with sample frequency Fs :
x(n) = xa (nT ), n ∈ Z where T = 1/Fs .
Recall that for the continuous-time signal
Z ∞
Xa (F) = xa (t)e− j2πFt dt
−∞
Z ∞
xa (t) = Xa (F)e j2πFt dF
−∞
and for the discrete-time signal
∞
X(ω) = ∑ x(n)e− jωn
n=−∞
Z 1/2
1
Z π
2π f =ω
x(n) = X(ω)e jωn dω = X( f )e j2π f n d f
2π −π −1/2
Z Fs /2
f =F/Fs 1
= X(F)e j2πnF/Fs dF.
Fs −Fs /2
What can we say about the spectrum X( f ) for the discrete-time signal?
March 6, 2025
0.
Frequency consequences of sampling?
By definition of the sampling, and using T = 1/Fs ,
Z ∞ Z ∞
synthesis
x(n) = xa (nT ) = Xa (F)e j2πFnT dF = Xa (F)e j2πnF/Fs dF
−∞ −∞
∞ Z (k+1/2)Fs
= ∑ Xa (F)e j2πnF/Fs dF (split integration interval)
k=−∞ −(k+1/2)Fs
∞ Z Fs /2
= ∑ Xa (F − kFs )e j2πn(F−kFs )/Fs dF (change of variables F ↔ F − kFs )
k=−∞ −Fs /2
Z Fs /2 ∞
= ∑ Xa (F − kFs )e j2πnF/Fs dF
−Fs /2 k=−∞
March 6, 2025
0.
Frequency consequences of sampling!
We have the equality
Z Fs /2 Z Fs /2 ∞
X(F)e j2πnF/Fs dF = Fs ∑ Xa (F − kFs )e j2πnF/Fs dF,
−Fs /2 −Fs /2 k=−∞
n all n ∈ Z.
which holds for o
• The set e j2πnF/Fs as functions of F form an orthogonal basis for (a
certain type of) functions on [Fs /2, Fs /2].
• ⇒ X(F) and Fs ∑∞ k=−∞ Xa (F − kFs ) have to be equal almost everywhere!
For our purposes, we can conclude that
∞
X(F) = Fs ∑ Xa (F − kFs ) for F ∈ [−Fs /2, Fs /2].
k=−∞
• If Xa (F) = 0 for |F| > Fs /2, then X(F) = Fs Xa (F). All good!
• However, if Xa (F) has power above Fs /2, then
X(F) = Fs Xa (F) + Fs Xa (F+Fs ) + Fs Xa (F−Fs ) + . . .
• This is the aliasing effect: power from high frequencies show up at low
frequencies.
March 6, 2025
0.
Aliasing
1.5
0.5
0
-5 0 5
F
March 6, 2025
0.
Aliasing
1.5
0.5
0
-5 0 5
F
March 6, 2025
0.
Aliasing
1.5
0.5
0
-5 0 5
F
March 6, 2025
0.
Aliasing
1.5
0.5
0
-5 0 5
F
March 6, 2025
0.
Aliasing
1.5
0.5
0
-5 0 5
F
March 6, 2025
0.
Aliasing - how to compute X(F)
2 2
1.5 1.5
1 1
0.5 0.5
0 0
-5 0 5 -1 -0.5 0 0.5 1
F F
March 6, 2025
0.
Aliasing - how to compute X(F)
1.5
0.5
0
-1 -0.5 0 0.5 1
F
March 6, 2025
0.
Aliasing - how to compute X(F)
0.5
0
-1 -0.5 0 0.5 1
F
March 6, 2025
0.
Aliasing - how to compute X(F)
0.5
0
-1 -0.5 0 0.5 1
F
March 6, 2025
0.
Aliasing - how to compute X(F)
March 6, 2025
0.
Aliasing for sound
-20 -20
xa xa
x x
-40 Fs/2
-40 Fs/2
-60 -60
-80 -80
dB
dB
-100 -100
-120 -120
-140 -140
-160 -160
0 5 10 15 20 0 500 1000 1500 2000
frequency (kHz) frequency (Hz)
March 6, 2025
0.
Reconstructing a signal from samples
Let’s assume that Xa (F) = 0 for |F| > Fs /2 and sample xa (t) with sampling
frequency Fs :
x(n) = xa (nT ) = xa (n/Fs ) , T = 1/Fs .
Then, for any Zt ∈ R, Z F2 /2
synthesis ∞
xa (t) = Xa (F)e j2πFt dF = Xa (F)e j2πFt dF
−∞ −Fs /2
Z F2 /2
Xa (F)=X(F)
= X(F)e j2πFt dF
−Fs /2
Z F2 /2
!
∞
analysis − j2πFn/Fs
= ∑ x(n)e e j2πFt dF
−Fs /2 n=−∞
∞ Z F2 /2 ∞ Z F2 /2
= ∑ x(n) e− j2πFn/Fs e j2πFt dF = ∑ x(n) e j2πF(t−nT ) dF
n=−∞ −Fs /2 n=−∞ −Fs /2
∞
t − nT sin(πt)
= ∑ xa (nT )sinc , sinc(t) =
n=−∞ T πt
⇒ xa (t) for any t ∈ R can be perfectly reconstructed from the samples xa (nT )!
This is how an (ideal) digital-to-analog converter (DAC) works.
March 6, 2025
0.
Nyquist-Shannon sampling theorem
Let Xa (F) be bandlimited, i.e., Xa (F) = 0 for |F| > B. Then, xa (t) can be
uniquely recovered from its samples xa (nT ) = xa (n/Fs ) if Fs > 2B. The
reconstruction is given by the sinc-interpolation
∞
t − nT sin(πt)
xa (t) = ∑ xa (nT )sinc , sinc(t) = .
n=−∞ T πt
1.5
0.5
-0.5
-1
-1.5
-4 -2 0 2 4 6
t
March 6, 2025
0.
Nyquist-Shannon sampling theorem
Let Xa (F) be bandlimited, i.e., Xa (F) = 0 for |F| > B. Then, xa (t) can be
uniquely recovered from its samples xa (nT ) = xa (n/Fs ) if Fs > 2B. The
reconstruction is given by the sinc-interpolation
∞
t − nT sin(πt)
xa (t) = ∑ xa (nT )sinc , sinc(t) = .
n=−∞ T πt
1.5
0.5
-0.5
-1
-1.5
-4 -2 0 2 4 6
t
March 6, 2025
0.
Nyquist-Shannon sampling theorem
Let Xa (F) be bandlimited, i.e., Xa (F) = 0 for |F| > B. Then, xa (t) can be
uniquely recovered from its samples xa (nT ) = xa (n/Fs ) if Fs > 2B. The
reconstruction is given by the sinc-interpolation
∞
t − nT sin(πt)
xa (t) = ∑ xa (nT )sinc , sinc(t) = .
n=−∞ T πt
March 6, 2025
0.
Nyquist-Shannon sampling theorem
Let Xa (F) be bandlimited, i.e., Xa (F) = 0 for |F| > B. Then, xa (t) can be
uniquely recovered from its samples xa (nT ) = xa (n/Fs ) if Fs > 2B. The
reconstruction is given by the sinc-interpolation
∞
t − nT sin(πt)
xa (t) = ∑ xa (nT )sinc , sinc(t) = .
n=−∞ T πt
1.5
0.5
-0.5
-1
-1.5
-4 -2 0 2 4 6
t
March 6, 2025
0.
Nyquist-Shannon sampling theorem
Let Xa (F) be bandlimited, i.e., Xa (F) = 0 for |F| > B. Then, xa (t) can be
uniquely recovered from its samples xa (nT ) = xa (n/Fs ) if Fs > 2B. The
reconstruction is given by the sinc-interpolation
∞
t − nT sin(πt)
xa (t) = ∑ xa (nT )sinc , sinc(t) = .
n=−∞ T πt
1.5
0.5
-0.5
-1
-1.5
-4 -2 0 2 4 6
t
March 6, 2025
0.
Summary of frequency domain
March 6, 2025