DSP L02 Signal Sampling and Quantization
DSP L02 Signal Sampling and Quantization
SBES152
Biomedical Signal
Processing
Lecture 02
Signal Sampling and Quantization
Sampling Terminology
Sampling frequency =
Or rad/sec
Sampling Terminology
Sample-and-hold analog
voltage for ADC.
4
Sampling Motivation
• Many of the real-world signals are analog.
• Sampling issues
Sampling in time + quantization in
amplitude
How to sample in time (sampling period)
Uniform Sampling
Continuous-time
signal xc(t) t
“Windowing”
Δ
As Δ 0
A very thin window
(impulse)
“Sampling”
Discrete -time
signal x[n]
-3 -2 -1 0 1 2 3 4 n
Uniform Sampling
Sampling is, in general, not reversible
1
0.5
-0.5
-1
0 20 40 60 80 100
Uniform Sampling
• Sampling function
▫ Periodic sequence of impulses of
period Ts
• Sampled signal:
Uniform Sampling
•
7
Uniform Sampling
• Notice that Dk can be obtained by integration
over any period, say [-Ts/2, Ts/2]
Uniform Sampling
2. Frequenc
y Shifting
1 δ(ω)
ejωot δ(ω - ωo )
Perio
d
= Ts
The Fourier transform of a periodic train of equidistant delta
functions in the
Uniform Sampling
Samples should be collected at a rate high enough that
the original analog signal can be reconstructed or
recovered later.
T = 0.01 or fs = 100 Hz
fs > 2
fmax
fs < 2 fmax
t f (Hz)
“multiplication” x “convolution”
*
t
T f (Hz)
= fs = 1/T
mag =
-3 -2 -1 0 1 2 3 4 n f (Hz)
fs = 1/T
9
Uniform
Sampling
• Back to our question…
“The sampled signal in the frequency
domain”
Sampling
1
0
where,
• Using Ts = 0.4,
1
3
Ts = 0.4 sec
1
4
2 >
Nyquist sampling condition is satisfied for T = 0.5, 0.4, and 0.2. But
it is not satisfied for T = 1.
1
5
Solution (a):
The signal is unit pulse.
Clearly, this signal can be easily sampled by
choosing any value of Ts << 1. ⇒
1
But, notice that 𝑢(𝑡 )❑
𝑗Ω
Sinc function has no maximum frequency! Not band-
limited! Thus, any chosen value of Ts will cause
aliasing.
1
7
a=0;
for k=0:0.001:20
a=a+0.001*sinc(0.5*k)
^2; if a>0.495
k
retur
n
en
d end
2
0
2
1
(2)
Sinc-interpolation
Ideal Reconstruction Filter
sin ( 𝜋 𝑡 /𝑇 𝑠 )
h𝑟 (𝑡 )=
𝜋 𝑡 /𝑇 𝑠
29
Reconstructed Signal
∞
sin [ 𝜋 ( 𝑡 −𝑛𝑇𝑠 ) /𝑇𝑠 ]
𝑥𝑟 ( 𝑡 )= ∑ 𝑥 [ 𝑛𝑇 𝑠 ]
𝑛=− ∞ 𝜋 (𝑡 − 𝑛𝑇𝑠 ) /𝑇𝑠