SAMPLING THEORY
Le Thanh Ha, Ph.D
Assoc. Prof. at University of Engineering and Technology,
Vietnam National University
ltha@vnu.edu.vn; lthavnu@gmail.com; 0983 692 592
Frequency Spectra
• example : g(t) = sin(2πf t) + (1/3)sin(2π(3f) t)
= +
Slides: Efros
Frequency Spectra
Frequency Spectra
= +
=
Frequency Spectra
= +
=
Frequency Spectra
= +
=
Frequency Spectra
= +
=
Frequency Spectra
= +
=
Frequency Spectra
1
= A sin(2 kt )
k =1 k
Review: 1D Fourier Transform
A function f(x) can be represented as a weighted combination of phase-
shifted sine waves
+ Inverse Fourier
i 2ux Transform
f ( x) = F (u ) e du
−
How to compute F(u)?
+
f ( x )e
−i 2ux
F (u ) = dx Fourier Transform
−
Review: 1D Fourier Transform
• Trigonometric identities
eix = cos( x) + i sin( x)
eix + e− ix
cos( x) =
2
eix − e − ix
sin( x) =
2i
• Home work: Calculate Fourier transform of cos(2sx)
Review: Box Function
f(x)
1 x1
f ( x) = 2
0 x1 x
2
|F(u)|
sin u
F (u ) = = sin c(u )
u u
If f(x) is bounded, F(u) is unbounded
Review: Dirac Delta and its Transform
f(x)
x = 0
( x) = +
0 x 0 f ( x) ( x)dx = f (0)
−
+
( x)dx = 1
−
x
0
f(x)
−i 2ua
F{ ( x − a)} = e
+∞
න 𝑓 𝑥 𝛿 𝑥 − 𝑎 𝑑𝑥 = 𝑓(𝑎)
−∞
a
Review: Cosine
1.5
1
0.5
-0.5 -1 1
-1
-1.5
cos(2x)
If f(x) is even, so is F(u)
Review: Convolution
• A mathematical operator which computes the “amount of
overlap” between two functions. Can be thought of as a
general moving average
• Continuous domain:
f ( x) g ( x) = f (a) g ( x − a )da
Conv. Example
• Suppose we want to compute the convolution of the following
two functions:
10/5/2022 Assoc. Prof. Dr. Le Thanh Ha 16
Conv. Example
Step 1: find g(-a) Step 2: find g(x-a)
10/5/2022 Assoc. Prof. Dr. Le Thanh Ha 17
Conv. Example
• Step 3: Shift the impulse response function over target
function and take integral at every position
– Case 1 (x<0): no overlap.
10/5/2022 Assoc. Prof. Dr. Le Thanh Ha 18
Conv. Example
• Case 1:
10/5/2022 Assoc. Prof. Dr. Le Thanh Ha 19
Conv. Example
• Case 2 (0 ≤ 𝑥 < 1):
10/5/2022 Assoc. Prof. Dr. Le Thanh Ha 20
Conv. Example
10/5/2022 Assoc. Prof. Dr. Le Thanh Ha 21
Conv. Example
• Case 4: 𝑥 > 2
10/5/2022 Assoc. Prof. Dr. Le Thanh Ha 22
Conv. Example
10/5/2022 Assoc. Prof. Dr. Le Thanh Ha 23
Conv. Example (Wiki)
10/5/2022 Assoc. Prof. Dr. Le Thanh Ha 24
Convolution with Dirac Delta function
Convolution with an “train” of
impulses
=
Review: Properties
Linearity: af ( x) + bg ( x) aF (u) + bG(u)
Time shift: f ( x − x0 ) e − i 2ux0 F (u )
df ( x)
Derivative: uF (u )
x
F (u )
Integration: f ( x)dx
u
Convolution: f ( x) g ( x) F (u)G(u)
Sampling Analysis
fs(x)
f(x)
Sampling
x x
… -2T -T 0 T 2T …
Sampling Analysis
fs(x)
f(x)
Sampling
x Reconstruction x
… -2T -T 0 T 2T …
Sampling Analysis
fs(x)
f(x)
Sampling
x Reconstruction x
… -2T -T 0 T 2T …
What sampling rate (T) is sufficient to reconstruct the
continuous version of the sampled signal?
Sampling Theory
• How many samples are required to represent a given signal
without loss of information?
• What signals can be reconstructed without loss for a given
sampling rate?
Sampling Analysis: Spatial Domain
+
f(x) ( x − kT )
k = −
x … -2T -T 0 T 2T … x
+
f ( x) ( x − kT )
k = −
?
fs(x)
x
… -2T -T 0 T 2T …
Sampling Analysis: Spatial Domain
+
f(x) ( x − kT )
k = −
x … -2T -T 0 T 2T … x
+
f ( x) ( x − kT )
k = −
? What happens in Frequency
fs(x) domain?
x
… -2T -T 0 T 2T …
Fourier Transform of Dirac Comb
Fourier Transform of Dirac Comb
T 1/T
+ +
( x − kT )
k
(u − )
k = − T
k = −
+
e
k = −
−i 2ukT
Moving the spikes closer together in the spatial domain
moves them farther apart in the frequency domain!
Sampling Analysis: Spatial Domain
+
f(x) ( x − kT )
k = −
x … -2T -T 0 T 2T … x
+
f ( x) ( x − kT )
k = −
? What happens in Frequency
fs(x) domain?
x
… -2T -T 0 T 2T …
Sampling Analysis: Freq. Domain
+
n
F(u) (u − )
n = − T
-fmax fmax u … -1/T 0 1/T … u
Sampling Analysis: Freq. Domain
+
n
F(u) (u − )
n = − T
-fmax fmax u … -1/T 0 1/T … u
How does the convolution result look like?
Sampling Analysis: Freq. Domain
F(u) (u)
-fmax fmax u … -1/T 0 1/T … u
Sampling Analysis: Freq. Domain
F(u) (u)
-fmax fmax u … -1/T 0 1/T … u
F (u) (u)
Sampling Analysis: Freq. Domain
F(u) (u)
-fmax fmax u … -1/T 0 1/T … u
F (u) (u) = G(u)
G(0)?
G(fmax)?
G(u)?
Sampling Analysis: Freq. Domain
F(u) (u)
-fmax fmax u … -1/T 0 1/T … u
F (u) (u) = G(u)
G(0) = F(0)
G(fmax) = F(fmax)
G(u) = F(u)
Sampling Analysis: Freq. Domain
F(u)
(u)
1
How about (u − )
T
-fmax fmax u … -1/T 0 1/T … u
F (u) (u)
Fs(u)
-1/T -fmax fmax 1/T u
Sampling Analysis: Freq. Domain
F(u)
(u)
1
How about (u − )
T
-fmax fmax u … -1/T 0 1/T … u
F (u) (u)
Fs(u)
-1/T -fmax fmax 1/T u
Sampling Analysis: Freq. Domain
+
n
F(u) (u − )
n = − T
-fmax fmax u … -1/T 0 1/T … u
+
n
F (u ) (u − T )
n = −
Fs(u)
-1/T -fmax fmax 1/T u
Sampling Theory
• How many samples are required to represent a given signal
without loss of information?
• What signals can be reconstructed without loss for a given
sampling rate?
Sampling Analysis: Freq. Domain
+
n
F(u) (u − )
n = − T
-fmax fmax u … -1/T 0 1/T … u
+
n
F (u ) (u − T )
n = −
How can we reconstruct the
original signal? Fs(u)
-1/T -fmax fmax 1/T u
Reconstruction in Freq. Domain
Fs(u) box(u)
-fmax fmax u -fmax fmax u
Fs (u ) box(u )
-fmax fmax u
Signal Reconstruction in Freq. Domain
Fs(u)
Fourier transform
x -fmax fmax u
… -2T -T 0 T 2T …
Fs (u ) box(u )
f(x)
Inverse Fourier F(u)
transform
x
-fmax fmax u
fs(x)
Signal Reconstruction in Spatial Domain
fs(x) sinc(x)
x
… -2T -T 0 T 2T …
f s ( x) sin( x)
x
Sampling Analysis
When does aliasing happen?
f(x) F(u)
x -fmax fmax u
fs(x) Fs(u)
x -fmax fmax u
… -T 0 T …
Sampling Analysis
When does aliasing happen?
1
2 f max
T
f(x) F(u)
x -fmax fmax u
fs(x) Fs(u)
x -fmax fmax u
… -T 0 T …
Sampling Analysis
When does aliasing happen?
1
2 f max
T
f(x) F(u)
x -fmax fmax u
fs(x) Fs(u)
x -fmax fmax u
… -T 0 T …
Sampling Analysis
When does aliasing happen?
1
2 f max
T
f(x) F(u)
x -fmax fmax u
fs(x) Fs(u)
x -fmax fmax u
… -T 0 T …
Sampling Analysis
fs(x)
f(x)
Sampling
x Reconstruction x
… -2T -T 0 T 2T …
What sampling rate (T) is sufficient to reconstruct the
continuous version of the sampled signal?
Sampling Analysis
fs(x)
f(x)
Sampling
x Reconstruction x
… -2T -T 0 T 2T …
What sampling rate (T) is sufficient to reconstruct the
continuous version of the sampled signal?
Sampling Rate ≥ 2 * max frequency in the signal
• this is known as the Nyquist Rate