Sampling PDF
Sampling PDF
Examples
Quantization (ELEC442)
Advanced
topics
Fourier transform
Sampling and
and Z-transform System
reconstruction
Function analysis:
magnitude, phase, &
group delay
DFT/FFT
Filter structures &
design
2
The Sampling Theorem
Xc j
-N N
3
Introduction
Sampling is an operation that transforms a CT signal
xc(t) into a DT signal x[n]
x[n] gives the values of x(t) read at intervals of T
seconds x[n]=xc(nT)
Sampling:
With x[n] we can take advantage of the advanced
discrete time systems technologies to process them
4
Introduction
xn xc nT n n
-3 -2 -1 0 1 2 3 4
T: the sampling period in second
Fs = 1/T: the sampling frequency in Hz
The reciprocal of the sampling period
s=2Fs rad/sec: Sampling frequency in radian-per-second
This is the ideal case not the practical but close enough
In practice it is implement with an analog-to-digital converters
5
Introduction
7
Introduction
8
Fourier symbols
DT x[n] n N k
k 2k / N
CT x(t) t T k
k 2k / T
• DT-FS: Discrete in time; Periodic in time; Discrete in Frequency; Periodic in Frequency
• DT-FT: Discrete in time; Aperiodic in time; Continuous in Frequency; Periodic in Frequency
• CT-FS: Continuous in time; Periodic in time; Discrete in Frequency; Aperiodic in Frequency
• CT-FT: Continuous in time; Aperiodic in time; Continuous in Frequency; Aperiodic in Frequency
9
Fourier symbols
Sampling in time Discrete-time
Continuous-time Sampling period = Ts
analog signal analog sequence
x(t) C x [n] D
x [n] e
-j
x(t) e
-j t
st dt n = n = - n=0 D
x(t) e dt
k integer
j
ze
f
s j
2F frequency of DT signals Sampling in frequency
frequency of CT signals N = Length of x[n]
/ T ; T
10 Scaling of DT freq. by T
Outline
Introduction to sampling
Introduction to filters
Representation of a CT Signal by Its Samples: Sampling
The Effect of Under-sampling: Aliasing
o Reconstruction of a Signal from Its Samples: Interpolation
o Discrete-Time Processing of Continuous-Time Signals
o A/D and D/A Conversion
o Sampling of Discrete-Time Signals
o Quantization
o Summary
11
Filters:
Why frequency representation?
Sinusoidal signals have a distinct (unique) frequency f0
An arbitrary signal x(n) does not have a unique frequency
15
High Pass Filtering
(remove low freq, detect edges)
16
Ideal Filters: frequency domain
sinc functions
18
Ideal Filters
19
Real filters
20
Example: Noise filter
Noise is present in most signals
Noise is high frequency content
If the noise band is much wider than the signal band a large
improvement in signal fidelity is possible
21
Outline
Introduction
Introduction to filters
Sampling: Representation of a CT Signal by Its Samples
o Reconstruction of a Signal from Its Samples: Interpolation
o The Effect of Under-sampling: Aliasing
o Discrete-Time Processing of Continuous-Time Signals
o A/D and D/A Conversion
o Sampling of Discrete-Time Signals
o Quantization
o Summary
22
Sampling methods
sampling period
sampling function s (t ) (t nT )
n (7.2)
s 2 / T
24
sampling frequency or rate
Impulse-Train Sampling
s(t)
xs (t ) x[nT ] (t nT )
n
(7.3) x(t) × xs(t)
s(t )
x(t) T
1
0 t
0 t
xs(t)
T x(0) x(T)
0 t Fig. 7.2
25
s (t )
Illustration x(t ) x s (t )
x(t )
0 t
s (t )
1
… …
3T 2T T 0 T 2T 3T t
x(T ) x(0)
x s (t )
26 0 t
Impulse-Train Sampling
Mathematically convenient to represent in two stages
Multiply with s(t)= Impulse train modulator tnT
Conversion of impulse train to a sequence nT n
s(t)
Convert
impulse train to
xc(t) x discrete-time x[n]=xc(nT)
sequence
xc(t)
s(t) x[n]
t n
-3T-2T -T 0 T 2T 3T 4T
s (t ) (t nT )
n
x s (t ) xc (t ) s (t )
xc (t ) (t nT )
n
xc (nT ) (t nT )
n
x[n] xc (nT ), n
xc (t ) xc ( ) (t )d
28
Frequency analysis of Sampling
29
Frequency analysis of Sampling
2
S ( j )
T
( k s )
k
1
X s ( j )
T
X c ( j ( k s ))
k
s N N or s 2 N
30
Frequency analysis of Sampling
Xc j
-N N
Xs j s>2N
-
3s 2s s -N N s 2s 3s
Xs j s<2N
- s -N N s 2s 3s
31 3s 2s
The Sampling Theorem
How to recover xc(t) EXACTLY from its samples?
Low pass
filter
Xs j s>2N
-
3s 2s s -N N s 2s 3s
Xs j s<2
- N
3s 2s s -N N s 2s 3s
2
s 2Fs 2 N
32 T
The Sampling Theorem
2N The minimum sampling rate that must be exceeded : the Nyquist Rate
2
s 2fs 2N
T
T The Sampling Period
34
Practically estimate Fs from x(t)
36
Reconstruction Methods
Reconstruction is interpolation:
Connecting samples x[n] using interpolation kernels
Ideal: Band-limited (ideal) Interpolation
Practical interpolation:
• Zero-Order Hold:
• e.g. scanned images
• First-Order Hold:
• Linear interpolation: commonly used in plotting
37
Band-limited Interpolation
38
Band-limited Interpolation
s(t ) (t nT )
n
x (t )
s
x[n]
H r
( j )
xr (t ) xs (t ) h(t ) x(nT )h (t nT )
n
r
t/T integer
T0
40
Ideal Reconstruction Filter
Ideal LPF with cut of frequency of c=/T or Fc=2/T
sin t / T
hr t
t / T
41
Band-limited Interpolation
If there is no overlap between shifted spectra, a LPF can
recover x(t) from xs(t)
X ( j) Xs ( j)
1
1 s 2M
T
M 0 M s M 0 M s
X r ( j)
Hr( j)
1
T M c (s M )
M 0 M
c 0 c
42
Band-limited Interpolation
xs(t)
T x(0) x(T)
Given the samples x[n]
0 t
We can reconstruct x(t) by generating a periodic
impulse train with amplitudes that are
successive sample values
This impulse train is then processed through an
ideal lowpass filter with gain T and cutoff
frequency greater than and less than
N s N
43
Band-limited Interpolation
44
Band-limited Interpolation
xr (t ) xs (t ) h(t ) x(nT )h (t nT )
n
r
45
sint nT / T
xr t xn
n t nT / T
46
sinc (ideal) Reconstruction
sint nT / T
xr t xn
n t nT / T
sin t / T
hr t
t / T
sinc function is 1 at t=0
47
Reconstruction: overview
sin(t / T )
hr (t )
t / T
Cutoff frequncy : c s / 2 / T
48
Reconstruction: overview
CT signal
sin( (t nT ) / T )
xr (t ) x[n]
n (t nT ) / T
49
Outline
Introduction
Introduction to filters
Representation of a CT Signal by Its Samples: Sampling
o Reconstruction of a Signal from Its Samples: Interpolation
o The Effect of Under-sampling: Aliasing
o Discrete-Time Processing of Continuous-Time Signals
o A/D and D/A Conversion
o Sampling of Discrete-Time Signals
o Quantization
o Summary
50
The Effect of Undersampling: Aliasing
When s≤2N undersampling
Xc j
-N N
Xs j s>2N
3s - s -N N s 2s 3s
2s
Xs j s<2N
- s -N N s 2s 3s
3s 2s
51
The Effect of Undersampling: Aliasing
H j
s(t ) (t nT )
n
x
s
(t )
H j
s s
2 2
X r ( j) X ( j)
s s
2 2
52
The Effect of Undersampling: Aliasing
Aliasing is
the presence of unwanted components in the reconstructed signal
• These components were not present when the original signal was sampled
some of the frequencies in the original signal may be lost in the
reconstructed signal
53
The Effect of Undersampling: Aliasing
Sometimes the highest frequency components of a signal
are simply noise, or do not contain useful information
To prevent aliasing of these frequencies, filter out these
components before sampling the signal using ANTI-
Aliasing filter: a low-pass filter BEFORE SAMPLING that
filters out high frequency components and lets lower
frequency components through
54
The Effect of Undersampling: Aliasing
An example:
)
X( jj
X
X ps ( jj
X )
s 60
s 0
00 s s
x (t ) cos( t ) x(t )
r 0 2 ( s 0 )
55
The Effect of Undersampling: Aliasing
s
6 0
4
x (t ) cos( )t x(t )
r
s 0
Aliasing
X s ( j)
s 0 s 0 s
( s 0 ) 2
56
The Effect of Undersampling: Aliasing
s
0
6
2 s
0
6
57
The Effect of Undersampling: Aliasing
4 s
0
6
5 s
0
6
58
Demo: Aliasing
59
Outline
Introduction
Introduction to filters
Representation of a CT Signal by Its Samples: Sampling
o Reconstruction of a Signal from Its Samples: Interpolation
o The Effect of Under-sampling: Aliasing
o Examples
o Discrete-Time Processing of Continuous-Time Signals
o A/D and D/A Conversion
o Sampling of Discrete-Time Signals
o Quantization
o Summary
60
Example 1:
Sampling of sinusoidal Signals
Given : xc (t ) cos(4000t ) & T 1 / 6000
Find x[n] & X (e j )
1) xc (t ) cos(4000t ) 0 4000
T 1 / 6000 s 2 / T 12000 no aliasing
x[n] xc (nT ) cos(4000nT ) cos((2 / 3)n) cos(0 n)
2) xc (t ) X c ( j) ( 4000 ) ( 4000 )
Note : (at ) (t ) / | a |
1
X s ( j) X c ( j ( k s ))
T k
X (e j ) X s ( j) | / T X s ( j / T ) with normalized frequency T
61
Example 1: Sampling of sinusoidal Signals
(t nT)
n
63
Example 2:Sampling system
1
2
X s ( j )
T
X
k
c ( j ( k s )), s
T
j 1
2k
X (e jw ) X s (
T
)
T
k
X c ( j(
T
))
1
T (1 ), M 0
M
1
X (e jw ) (1 ), 0 M
T M
0, M
Periodic with
64
Example 2:Sampling system
1/T
-2 -wM -2 -2 +wM -wM 0 wM 2 -wM 2 2 +wM
65
Example 3: audio sampling
A signal at frequency 50Hz is sampled with Fs=80 Hz.
1- What frequency will be recovered ?
2- Repeat when it is sampled at 120Hz.
Part 1: investigation
Data collection: x(t ) e j 2F0t e j 2 50t
With F0 = 50Hz and sampling with Fs=80 Hz, the signal is undersampled (the
sampling theorem is not statisfied)
The Nyquist interval is [-40Hz, 40Hz]
The samples do not only represent the frequency F = 50Hz but all frequencies
F± k*Fs=50±m80 , k=0, 1, 2..., i.e. the frequencies
F0=50, 50±80, 50±160, 50±240...= 50,130 ,-30,210,-110,290,-190
Analysis: xr (t ) e j 2 ( 30)t
Only the frequency -30Hz lies within the Nyquist interval
Then the recovered signal will be -30Hz (30Hz and phase reversal)
This signal is the alias of the original signal at 50Hz
Notice that 30Hz is just the difference 80Hz – 50Hz
"Source: http://cnx.org/content/m28684/latest/ "
66
Example 3: audio sampling
Part 2:
Data collection:
Now, the sampling frequency is 120Hz, the sampling theorem is statisfied
Analysis:
Then the original frequency of 50Hz will be recovered xr (t ) e j 2 (50)t
But none of other frequencies
F0=50±k*120=50, 170, −70, 290, −190...
lie in the Nyquist interval [-60Hz, 60Hz], except the original frequency of 50Hz
as already known.
67
Example 4: audio sampling
A system uses the sampling frequency Fs=20 kHz
to process audio signal that is frequency-limited at 10 kHz, but the anti-
aliasing filter still allows frequencies up to 30 khz pass through even at small
amplitudes. What signal will we get back from the samples?
For sampling rate Fs=20 kHz, the Nyquist interval is [-10kHz, 10kHz]
the audio frequency 0 –10 kHz will be recovered as is
The audio frequency from 10 – 20 kHz will be aliased into the frequency
range -10 – 0 kHz
The audio frequency from 20 – 30 kHz will be aliased into the frequency
range 0 – 10 kHz
The resulting audio will be distorted due to the superposition of the 3
frequency bands caused by the too high Fc of the anti-aliasing filter compared
to Fs
68
Example 5: Prob 7.39 S&S
Problem 7.39
s
(a) Find g (t ) such that x(t ) =cos( )cos( t )+ g (t )
2
70
Example 5: Prob 7.39 S&S
2
By replacing s with , and t by nT in the equation (1), we get
T
2
g (nT ) = - sin( nT )sin( )= - sin(n )sin( ), the right hand side of the
2T
equation is equal to zero for n=0, 1, 2,...
71
Example 5: Prob 7.39 S&S
72
Example 5 Prob 7.39 S&S
From parts (a) and (b), we get
x p (t ) x ( nT ) (t nT )
n
s
(t nT ) cos( nT )cos( )+g ( NT )
n 2
s
(t nT )cos( nT )cos( ).
n 2
s
Consider Sinusoidal signal x(t ) = cos( t )
2
s
xr (t )=cos( t )cos( )
2
74
Example 6: Prob 7.1 S&S
Φ = - π/2, so that
s
x(t )=sin( t)
2
75
Example 6 : Prob 7.1 S&S
Fig. 7.17
76
Example 7
Consider the following sinusoidal signal with the
fundamental frequency F = 4kHz:
g(t) = 5cos(2πFt) = 5cos(8000πt).
The sinusoidal signal is sampled at a sampling rate
Fs = 6000 samples/second and reconstructed with an
ideas low-pass filter (LPF) with the following transfer
function:
H1(jW) = 1/6000 : |W| <= 6000π
0 : otherwise
i) a) Determine the reconstructed signal y(t). Give details
of derivations of Gs(jW).
b) Is the reconstruction perfect? If yes, justify and if no,
suggest how can it be achieved. Give details.
77 from “Continuous and Discrete Time Signals and Systems”; Mandal & Asif
78
79
80
81
82
Outline
Introduction
Introduction to filters
Representation of a CT Signal by Its Samples: Sampling
Reconstruction of a Signal from Its Samples: Interpolation
The Effect of Under-sampling: Aliasing
Examples
o Discrete-Time Processing of Continuous-Time Signals
o DT processing: Effective CT Frequency Response
o DT from CT: Impulse invariance
o CT processing: Effective DT Frequency Response
o A/D and D/A Conversion
o Sampling of Discrete-Time Signals
o Quantization
83 o Summary
DT Processing; CT Processing
H eff j
H e j ; T
0 otherwise
Hc j ; T
He j
0 otherwise
84
DT Processing of CT
Signals
T T
xd [n] xc (nT ) yd [n] yc (nT )
85
DT Processing of CT Signals
Fig. 7.21
87
C/D Conversion
Illustration in the Frequency Domain
88
C/D Conversion
Illustration in the Frequency Domain
xs t xc t st x t t nT
c x nt t nT
c
n n
CT
1
Xs j Xc j ks xc (nT ) e
jnT
T k n
2
Periodic with period s T
89
C/D Conversion
Illustration in the Frequency Domain
x [ n] e x (nT ) e
jn jn
DT
Xd (e )
j
d c
n n
= CT frequency
= DT frequency ( T )
90
D/C Conversion
yd[n] → yc(t)
Reverse of the process of C/D conversion
91
C/D & D/C conversion
Effective Frequency Response
H eff j
H e j ; T
92 0 otherwise
Effective Frequency Response
2k
Input CT to DT xn xc nT Xe j
1
Xc j
T k T
T
Assume a DT LTI system
CT input signal
Apply DT LPF
94
Example 4.3: Ideal low-pass filter
implemented as a DT system
Application of
reconstruction filter
Output CT signal
after reconstruction
95
Freq. response of
Differentiator
96
Freq. response of
integrator
97
Example 4.4: Digital Differentiator
Construction of Band-limited Digital Differentiator
j | | c
Desired: Hc( j)
| | c
2
Set s 2c T
s c M c
98
Example 4.4: Digital Differentiator
99
Example: Problem 7.29 S&S
100
Outline
Introduction
Introduction to filters
Representation of a CT Signal by Its Samples: Sampling
Reconstruction of a Signal from Its Samples: Interpolation
The Effect of Under-sampling: Aliasing
o Discrete-Time Processing of Continuous-Time Signals
o DT processing: Effective CT Frequency Response
o DT from CT: Impulse invariance
o CT processing: Effective DT Frequency Response
o A/D and D/A Conversion
o Sampling of Discrete-Time Signals
o Quantization
o Summary
101
Impulse Invariance
Impulse Invariance:
The sampling of the CT impulse response h(t) to produce
the DT impulse response h[n]
If h(t) is appropriately band-limited
j
H(e ), the frequency response of the DT system will be
defined as H( j) the CT system's frequency response with
linearly-scaled frequency i.e.,
If the CT filter has poles at s = sk, these poles are
translated to poles at ; T is sampling period
if the CT filter is causal and stable, then the DT filter will
be causal and stable as well
102
Impulse Invariance
Given a CT system Hc(j)
how to choose DT system response H(ej)
so that effective response of DT system Heff(j)=Hc(j)
Answer:
H e j H c j / T
103
Example: Impulse Invariance
1 c
Ideal low-pass DT filter by impulse invariance Hc j
0 else
sinc t
The impulse response of CT system is hc t
t
sincnT sincn
hn Thc nT T
nT n
105
CT processing of DT signals
106
Discrete-Time System for Arbitrary Delay
y[n] x[n real or integer
H e j e j ;
H ( z) z
• For integer delay values:
This DT system is meaningful: the samples y(n) are equal to the
delayed samples of x(n)
1 M
y[n]
M 1 k = 0
x [n - k]
M
1
j
H (e )
M 1 k = 0
e - jk
1 sin( ( M 1) / 2) - jM / 2
e
M 1 sin()
1
M 1 , M n 0
h[n]
0, otherwise
109
For even M, this moving
average will cause a non-
integer delay to the input
110
Summary
H eff j
H e j ; T
0 otherwise
Hc j ; T
He j
0 otherwise
111
Outline
Introduction
Introduction to filters
Representation of a CT Signal by Its Samples: Sampling
Reconstruction of a Signal from Its Samples: Interpolation
The Effect of Under-sampling: Aliasing
o Examples
o Discrete-Time Processing of Continuous-Time Signals
o A/D and D/A Conversion:
o Practical sampling & reconstruction
o Sampling of Discrete-Time Signals
o Quantization
o Summary
112
A/D and D/A Conversion
A non-ideal system samples x(t) at a given instant and holds that value
until the next instant, at which a sample should be taken
x(t ) Zero-order x0 (t )
hold
113
A/D and D/A Conversion
H e j
H eff j
1
2. use higher than required sampling rate s 2M N T
M N
3. implement sharp DT anti-aliasing filter c
M
4. downsample to desired sampling rate 's 2M N /M 2 N
116
Oversampled A/D Conversion:
simplifying AAF
x(at ) X j / a
118
2) A/D Conversion
Ideal C/D converters convert CT signals into infinite-precision DT signals
In practice we implement C/D converters as the cascade of
1, 0 t T
x0 t xnh0 t nT h0 t
n 0, else
2 sin(T / 2)
H 0 ( j) e jT / 2
119
A/D Conversion :
Ideal Sample and Hold
x0 t xnh t nT
n
0
Time-domain:
120
A/D Conversion:
Sampling with Zero-Order Hold
xs (t ) x (t) x (t ) * h (t )
0 s 0
121
Example: Prob 7.24 S&S
122
Outline
Introduction
Filters for sampling
Representation of a CT Signal by Its Samples: Sampling
The Effect of Under-sampling: Aliasing
o Sampling with Zero-Order Hold
o Reconstruction of a Signal from Its Samples: Interpolation
o Examples
o Discrete-Time Processing of Continuous-Time Signals
o Quantization
o Sampling of Discrete-Time Signals
o A/D and D/A Conversion
o A/D conversion
o D/A conversion
o Quantization
o Summary
123
3) D/A conversion:
Reconstruction Methods
Reconstruction: connecting samples x[n] using
interpolation kernels
a) Zero-Order Hold: D/A Conversion
e.g. scanned images
b) First-Order Hold: D/A Conversion
Linear interpolation: commonly used in plotting
xzoh t x foh t
124
Ideal, zero-order hold, and first-order hold reconstruction
125
D/A Conversion: Zero-Order Hold:
X r j X e jT H r j
X e jT : DTFT of sampled signal
X r j : FT of reconstructed signal
The ideal reconstruction filter
T /T
Hr j
0
/T
The time domain reconstructed signal is
sint nT / T
xr t xn
n t nT / T
In practice we cannot implement an ideal reconstruction filter
126
D/A Conversion: Reconstruction with Zero-
Order Hold
| H r ( j) |
T Ideal interpolating
Zero-order filter
hold
s s
s 0 s
2 2
127
D/A Conversion
2 sin(T / 2)
H 0 ( j) e
jT / 2
e jT / 2 H ( j)
H r ( j)
2 sin(T / 2)
129
4) Compensated Reconstruction Filter
~ Hr j
Hr j
H0 j
2 sinT / 2 jT / 2
The frequency response of zero-order hold is H0 j e
Therefore the compensated reconstruction filter should be
T / 2 jT / 2
~ e /T
Hr j sinT / 2
0 /T
130
D/A Conversion: Reconstruction with Zero-
Order Hold
Reconstruction filter
| H r ( j) | | H r ( j) |
s
2
s
2
s s
2 2
Magnitude and phase for the reconstruction filter for a zero-order hold
131
First-Order Hold: Linear interpolation
x s (t )
s(t ) (t nT )
n
( j)
x (t )
s
x[n]
H r
132
First-Order Hold: Linear interpolation
s(t )
x s (t )
x[n]
x s (t )
133
First-order versus
zero-order hold
First-order hold filter: the signal is
reconstructed as a piecewise linear
approximation to the original signal xc(t)
h(t) is a triangle
Zero-order hold filter converts a DT signal
to a CT signal by holding each sample
value for one sample interval
h(t) is a square
134
Comparison of frequency responses of ideal lowpass, zero-
order hold, and first-order hold reconstruction filters
x(t)
139
Down-Sampling of DT Signals
Impulse-Train Sampling
x[n] × xp[n]
p[n] [n kN]
k
N sampling period
x p [ n] x[ n] p[ n]
k
x[kN ] [n kN ]
140
Down-Sampling of DT Signals
Time domain illustration by a factor of 2
x[n]
p[n]
xp[n]
n
Fig. 7.31
141
Down-Sampling of DT Signals
X (e j )
1
Frequency domain analysis
2 M 0 M 2
1
X p (e j ) 2 P(e j )X (e j ( ) )d
2 2 P(e j )
N
2 s 2
P(e j )
N
( k s ) X p (e j )
k 1 s 2 M
N
N 1
1
j
X p (e )
N
X (e j ( k s )
) 2 M 0 M s
( s M )
2
k 0
Aliasing 1
N
s 2M
142
Fig. 7.32
0 s 2
Down-Sampling of DT Signals
Exact Recovery Using Ideal Lowpass Filter:
143
Fig 7.33
Down-Sampling of DT Signals
DT Decimation & Interpolation
DT Sampling
Decimation
144
Fig. 7.34
Down-Sampling of DT Signals
Frequency domain illustration of the relationship between DT
Sampling and decimation
j j / N
X (e ) j X (e ) X (e
b p )
X b (e j )
X P (e j )
146
Fig. 7.37
Up-Sampling of DT Signals
Spectra for upsampling by a factor of 2
Fig. 7.37
147
Example: Ex. 7.5 S&S
Down-sampling + up-sampling
2
4
9
2 9
9 2
148
Example: Ex. 7.5 S&S
Down-sampling + up-sampling
2 1
9 2 9
2 1
9 2 9
9
9
Fig. 7.38
149
Sampling of Discrete-Time Signals:
Changing Sampling Rate (Integer Factor)
x' n xc nT ' where T T' Changing the time axis
150
Sampling of Discrete-Time Signals
Decreasing the Sampling Rate by Integer Factor:
Down-Sampling/Decimation
2 2
There will be no aliasing if 's 2 N 's N
T ' MT MT
Note that we may obtain xd n by reconstructing the signal and re-sampling it with
151
T’=MT
Sampling of Discrete-Time Signals
Frequency domain analysis of Down Sampling
M
X e
frequency-scaled by M and
shifted by multiple of 2
152
i 0
Frequency domain analysis of Down sampling: No aliasing
frequency-scaled by M
Normalized freq :
T ' TM
153
Down-sampling
X d e ( X e
1 2
j j
j
X e 2 )
2
Down-sampling
1) expands each 2π-periodic repetition of X(e^jw) by
a factor of M along the ω axis
new period is then M2π
2) reduces the gain by a factor of M
If x[n] is not bandlimited to π/M, aliasing may
result from spectral overlap
154
Frequency domain analysis of Down sampling: No aliasing
shifted by multiple of 2
+ reduces the gain by M
155
If x[m] is not band limited to π/M aliasing Source: http://cnx.org
Downsampling without filtering (causes aliasing) and with filter
156
Sampling of Discrete-Time Signals
Increasing the Sampling Rate by Integer Factor:
Up-sampling/Interpolation
We obtain xi[n] that is identical to what we would get by reconstructing the signal
and re-sampling it with T’=T/L
159
Interpolating sampled DT signals
160
Upsampling: insertion of L−1 zeros
between every sample of the input signal
161
Interpolator in Time Domain
163
Sampling of Discrete-Time Signals:
Changing the Sampling Rate by Non-Integer Factor:
combine decimation and interpolation
• Since both interpolation and anti-aliasing filters are low-pass filters, the filter with the
smallest bandwidth is more restrictive and can therefore be used in place of both filters
164
Sampling of Discrete-Time Signals:
Changing the Sampling Rate by Non-Integer Factor
166
Outline
Introduction
Filters for sampling
Representation of a CT Signal by Its Samples: Sampling
The Effect of Under-sampling: Aliasing
o Reconstruction of a Signal from Its Samples: Interpolation
o Discrete-Time Processing of Continuous-Time Signals
o A/D and D/A Conversion
o Sampling of Discrete-Time Signals
o Quantization
o Summary
167
Quantization
x̂n Qxn
C/D converter can be modeled as
168
Quantization
x̂n Qxn
169
Uniform Quantizer
Source: http://eeweb.poly.edu/~yao/EE3414/quantization.pdf
171
Quantization: applications
173
Effect of Quantization Step-size:
quantization noise/error
174
Source: http://eeweb.poly.edu/~yao/EE3414/quantization.pdf
en x̂n xn
Quantization Error
Quantization error: difference between the original
and quantized value
If quantization step is , the quantization error will
satisfy / 2 en / 2 if the input does not clip
( Xm / 2) x[n] ( Xm / 2)
175
en x̂n xn
Quantization Error
In most cases we can assume that e[n]
is uniformly distributed random variable
Is uncorrelated with the signal x[n]
e[n] is Gaussian white noise
176
Derivation of e[n]:
Assume x[n] is
bipolar, i.e.,
varying in [-A A]
177
Measuring Quantizer
Performance
Performance measure:
how close the quantized signal (e.g., sound) to
the original signal to the human ears -
Perceptual Quality
No objective measure correlates very well with
the perceptual quality
Frequently used objective measure:
mean square error (MSE) between original and
quantized samples or signal to noise ratio
178
Problems with uniform
quantization
179
Quantizer & coder
180
Xm signal range
Quantizer & coder
Two’s Complement Numbers
182
Outline
Introduction
Filters for sampling
Representation of a CT Signal by Its Samples: Sampling
The Effect of Under-sampling: Aliasing
o Sampling with Zero-Order Hold
o Reconstruction of a Signal from Its Samples: Interpolation
o Examples
o Discrete-Time Processing of Continuous-Time Signals
o Sampling of Discrete-Time Signals
o A/D and D/A Conversion
o Summary
183
Summary
184
Summary
185
Summary
A-to-D converters convert CT signals into sequences with discrete
sample values
Operates with the use of sampling and quantization
D-to-A converters convert sequences with discrete sample values
into continuous-time signals
Analyzed as conversion to impulse train followed by reconstruction
filtering
Zero-order hold is a simple but low performance filter
Upsampling and downsampling allow for changes in the effective
sample rate of sequences
Allows matching of sample rates of A-to-D, D-to-A, and digital
processor
Analysis: downsampler/upsampler similar to A-to-D/D-to-A
When performing a frequency-domain analysis of systems with
up/downsamplers, it is strongly recommended to carry out the
analysis in the z-domain until the last step
Working directly in the ω domain can easily lead to errors
186
Summary: to know ..
How the sampling is derived using the FT ..
Lowpass filters for reconstruction ..
The sampled signal spectrum contains the original spectrum and its
replicas (aliases) at kws, k=+/- 1,2,….
We need a prefilter when sampling a signal
To avoid aliasing
The filter should be a lowpass filter with cutoff frequency at fs /2
Sample-and-hold and linear interpolation
Why the ideal interpolation filter is a lowpass filter with cutoff frequency
at fs/2
The ideal interpolation kernel is the sinc function.
Why to apply a pre-filter before sampling
….
187