Ch4 Sampling of Continuous-Time Signals-2023
Ch4 Sampling of Continuous-Time Signals-2023
2023/9/23 DSP 2
Periodic Sampling
Sequence of samples x[n] is obtained from a continuous-time signal xc(t) :
x[n] = xc(nT), - infinity < n < infinity
T : sampling period
fs = 1/T : sampling frequency, samples/second
C/D
Continuous-to-discrete-time
Xc(t) converter X[n] = Xc(nT)
T
In a practical setting, the operation of sampling is often implemented by an analog-to-digital
(A/D) converter which can be approximated to the ideal C/D converter.
The sampling operation is generally not invertible.
The inherent ambiguity in sampling is of primary concern in signal processing.
2023/9/23 DSP 3
Sampling with a Periodic Impulse Train
s(t) C/D Converter
Conversion from
X
impulse train x[n] = xC(nT)
xC(t) xS(t) to discrete-time
sequence
xC(t) xC(t)
xS(t) 2 Sampling Rates xS(t)
-4T 0 2T -4T 0 2T
-4 0 2 -4 0 2
2023/9/23 DSP 4
Frequency-domain representation of sampling
The conversion of xc(t) to xs(t) through modulating signal s(t) which is a
periodic impulse train
s (t ) (t nT )
n
xs (t ) xc (t ) s (t ) xc (t ) (t nT )
n
2023/9/23 DSP 5
Frequency-domain representation of sampling
Time domain sampling xs (t ) xc (t ) s=>
(t ) Frequency domain Convolution
1 1 2
X s ( j )
2
X c ( j ) S ( j )
2
X c ( j )
T
( k )
k
s
1
X c ( j kj s )
T k
xc(t) can be recovered from xs(t) with an ideal lowpass filter with frequency response Hr(j ).
Xr(j ) = Hr(j )Xs(j ) where s > 2 N
If Hr(j ) is an ideal lowpass filter with gain T and cutoff frequency such that
N< c < ( s - N) then Xr(j ) = Xc(j )
2023/9/23 DSP 6
Nyquist Sampling Theorem
2023/9/23 DSP 7
Harry Nyquist Claude Elwood Shannon
(February 7, 1889 – April 4, (April 30, 1916 – February 24, 2001)
1976) was an important was an American mathematician,
contributor to communication electronic engineer, and
theory. cryptographer known as "the father
of information theory".
Effect in the frequency domain of sampling
in the time domain
XC(j)
1
Spectrum of the original
-N N
S(j)
Spectrum of the sampling function
2/T
-S 0 S
XS(j) S = 2N Aliasing Effect
S > 2N S < 2N
2023/9/23 DSP 9
2023/9/23 DSP 10
Example 4.1
If we sample the continuous-time signal
xc (t ) cos(4000 t )
with a sampling period T=1/6000
In this case, s 2 / T 12000
The conditions of the Nyquist sampling theorem are satisfied.
The Fourier transform of xc(t) is
2023/9/23 DSP 11
Figure 4.6 (a) Continuous-time and (b) discrete-time Fourier
transforms for sampled cosine signal with frequency
Ω0 = 4000π and sampling period T = 1/6000.
Relation between Continuous and Discrete-
Time Domains
2023/9/23 DSP 13
Relation between Continuous and Discrete-Time
Domains
2023/9/23 DSP 14
Relation between Continuous and
Discrete-Time Domains
2023/9/23 DSP 15
Aliasing
2023/9/23 DSP 16
Frequency-domain representation of sampling 3
so
1
j
Xs ( j) X (e )| T X (e jT
)
T
X ( j jk )
k
c s
or
1 2 k
X (e ) Xc ( j j
j
)
T k T T
2023/9/23 DSP 17
2023/9/23 DSP 18
Reconstruction of a Bandlimited Signal from its samples
Samples of a continuous-time bandlimited signal taken frequently enough are
sufficient to represent the signal exactly in the sense that the signal can be
recovered from the samples and from the knowledge of the sampling period.
If Hr(j W) has gain T and cutoff frequency pi/T then
sin ( t / T )
hr (t )
and t / T
sin[ (t nT ) / T ]
xr (t ) x[n]hr (t nT )
n
n
x[ n ]
(t nT ) / T
This means that the ideal lowpass filter interpolates between the impulses of xs(t)
to construct a continuous-time signal xr(t).
Xr ( j) x[n]H ( j)e
n
r
jTn
Hr ( j) X (e jT )
2023/9/23 DSP 19
Block diagram, frequency response, and impulse response of an
ideal bandlimited signal reconstruction system
Sampling period T
H r(j) h r(t)
1
T
t
-/T /T -3T -T 0 T 3T
2023/9/23 DSP 20
2023/9/23 DSP 21
Ideal bandlimited interpolation
2023/9/23 DSP 22
Discrete-time processing of continuous-time
signal
2023/9/23 DSP 23
Discrete-Time Processing of Continuous-Time Signals 2
C/D converter produces a discrete-time signal
x[ n] xc ( nT )
1
2 k
j
X (e )
T
k
Xc ( j
T
j
T
)
2023/9/23 DSP 24
2023/9/23 DSP 25
Example of Ideal Continuous-Time Lowpass Filtering Using a
Discrete-Time Lowpass Filter
2023/9/23 DSP 26
Discrete-Time Processing of
Continuous-Time Signals
Example 4.4 Discrete-Time Implementation of an Ideal
Continuous-Time Bandlimited Differentiator
d
eq. 4.43 yc (t ) xc (t )
dt
eq. 4.44 H c ( j ) j
Discrete-Time Processing of
Continuous-Time Signals
j, /T
eq.4.45 H eff ( j)
0, /T
j
eq. 4.46 j
H (e ) ,
T
0, n0
eq. 4.47 h n cos n
, n0
nT
Figure 4.13 (a) Frequency response of a continuous-time ideal bandlimited
differentiator Hc (jΩ) = jΩ, |Ω| < π/T.
(b) Frequency response of a discrete-time filter to implement a continuous-time
bandlimited differentiator.
Discrete-Time Processing of Continuous-Time Signals:
Impulse Invariance
The LTI behavior of the system depends on 2 factors:
discrete-time system must be linear and time-invariant
input signal must be bandlimited and the sampling rate must be high enough
so that any aliased components are removed by the discrete-time system
2023/9/23 DSP 30
Impulse Invariance
Figure 4.14 (a) Continuous-time LTI system. (b) Equivalent system for
bandlimited inputs.
31
Impulse Invariance
eq. 4.48 H (e j
) Hc ( j / T ),
32
Impulse Invariance
From sampling depicted in Eq. (4.16)
sin(c t )
hc (t )
t
sin(c nT ) sin( c n)
h n Thc (nT ) T
nT n
j
1, c
H (e )
0, c
34
Continuous-Time Processing of Discrete-Time Signals
2023/9/23 DSP 35
2023/9/23 DSP 36
Continuous-Time Processing of Discrete-Time Signals
For ideal D/C : Xc(jW) and Yc(jW) are zero for | | / T
We can express D/C as follows.
sin[ (t nT ) / T ]
x c ( t ) x[ n ]
n (t nT ) / T
sin[ (t nT ) / T ]
yc (t )
n
y[ n]
(t nT ) / T
where x[n] = xc(nT) and y[n] = yc(nT) , and frequency-domain :
Xc ( j) TX ( e jT ),........... / T
Yc ( j) Hc ( j) Xc ( j),.... / T
1
Y ( e j ) Yc ( j / T ),..........
T
Overall system behaves as a discrete-time system whose
H(e j ) Hc ( j / T ),......
and if frequency response of continuous-time system is
Hc ( j) H(e jT ),........ / T
2023/9/23 DSP 37
Continuous-Time Processing
of Discrete-Time Signals
Example 4.7 Noninteger Delay
eq. 4.61 H ( e j
) e j
,
eq. 4.64 yc (t ) xc (t T )
Continuous-Time Processing of
Discrete-Time Signals
2023/9/23 DSP 41
Example 4.8
1 sin ( M 1) / 2 j M / 2
eq. 4.66 j
H (e ) e ,
( M 1) sin( / 2)
2023/9/23 DSP 44
Sampling Rate Reduction by an Integer Factor
Sampling Rate Reduction by an Integer Factor
xd[n] = x[nM] = xc(nMT)
system called Sampling Rate Compressor or Compressor
operation called Downsampling
xd[n] is an exact representation of xc(t) if p/(MT) > WN
sampling rate can be reduced by a factor of M without aliasing if the original sampling rate
was at least M times the Nyquist rate or if the bandwidth of the sequence is first reduced
by a factor of M by discrete-time filtering
Fourier transform of discrete-time sampled sequence xd[n] is
1 2 r
j
Xd ( e )
MT r
Xc ( j
MT
j
MT
)
where r = i+kM, -infinity < k < infinity and 0 < and = i < and = M-1
1 M 1
j
X d (e ) X (e j ( / M 2i / M ) ) (4.77)
M i 0
Lowpass filter+Compressor = Decimator
2023/9/23 DSP 45
2023/9/23 DSP 46
2023/9/23 DSP 47
General system for sampling rate reduction
by integer factor M
2023/9/23 DSP 48
Sampling rate reduction by 2
2023/9/23 DSP 49
Downsampling with aliasing (a to c) and with prefiltering to
avoid aliasing (d to f)
2023/9/23 DSP 50
Increasing the Sampling Rate by an Integer Factor
Xi(ejw) can be obtained from Xe(ejw) by correcting the amplitude scale from 1/T to L/T
and by removing all the frequency-scaled images of Xc(jW) except at integer multiples
of 2pi
sin[ ( n kL) / L]
xi [n] x[k ]
k (n kL) / L
2023/9/23 DSP 51
General system for sampling rate increase by
integer factor L
2023/9/23 DSP 52
Increasing sampling rate (Interpolation) by 2
2023/9/23 DSP 53
Linear Interpolation
In practice, ideal lowpass cannot be implemented exactly.
In some case, very simple interpolation procedures are adequate.
Linear interpolation can be accomplished by the system below if the filter has
impulse response
2023/9/23 DSP 54
Linear Interpolation by Filtering
Impulse response for linear
interpolation:
hlin[n] = 1-|n|/L, n < and = L
0 , otherwise
2023/9/23 DSP 55
2023/9/23 DSP 56
Changing the Sampling Rate by a Noninteger Factor
If the filter has impulse response hlin[n] = 1-|n|/L, |n| ≦ L
= 0, otherwise
the interpolated output will be
xlin[n] x [k ]h
k
e lin [n k ] x[k ]h
k
lin [n kL]
2023/9/23 DSP 57
Interpolator Decimator
Lowpass filter
x[n] xe[n] Gain = L xo[n] xd[n]
L Cutoff = M
min(/L, /M)
2023/9/23 DSP 62
Multirate Signal Processing Techniques
2023/9/23 DSP 63
Interchange of Filtering and Downsampling/Upsampling
In the figures
Two equivalent systems
X b ( e j ) H (e j M ) X ( e j ) (4.98)
From Eq. (4.77), we have H(zM) M
x[n] xb[n] y[n]
M 1
1
Y (e j )
M i 0
X b (e j ( / M 2 i / M ) ) (4.99)
2023/9/23 DSP 64
Interchange of Filtering and Downsampling/Upsampling
Similarly, we have from Eq. (4.85)
Y ( e j ) X a ( e j L ) X ( e j L ) H ( e j L ) (4.102)
Since from Eq. (4.85)
X b ( e j ) X ( e j L ),
it follows that Eq. (4.102) is,
Y ( e j ) H ( e j L ) X b ( e j ),
which corresponds to Fig. 4.32(b)
H(z) L L H(zL)
x[n] xa[n] y[n] x[n] xb[n] y[n]
Two equivalent systems
2023/9/23 DSP 65
Polyphase Decompositions
The polyphase decomposition of a sequence is obtained by
representing it as a superposition of M subsequences.
Consider an impulse response h[n] that we decompose into M
subsequences hk[n]
h[n k ], n integer multiple of M,
hk [n]
0, otherwise
We can reconstruct the original impulse response h[n]
M 1
h[n] hk [n k ]
k 0
2023/9/23 DSP 66
2023/9/23 DSP 67
Polyphase Decompositions
The polyphase representation corresponds to
expressing H(z) as
M 1
H [ z] Ek ( z ) z ;
k 0
M k
Ek ( z )
M
k
h [
n
nM ]z nM
2023/9/23 DSP 68
Polyphase Implementation of Decimation Filters
H(z) M
x[n] y[n] w[n]=y[nM]
2023/9/23 DSP 69
Figure 4.39 Implementation of decimation filter using polyphase
decomposition.
Figure 4.40 Implementation of decimation filter after applying the
downsampling identity to the polyphase decomposition.
Polyphase Implementation of Decimation Filters
2023/9/23 DSP 72
Digital Processing of Analog Signals
2023/9/23 DSP 73
Prefiltering to Avoid Aliasing
Ideal C/D converter (approximation) analog-to-digital (A/D) converter
Ideal D/C converter (approximation) digital-to-analog (D/A) converter
1, | | c / T ,
H aa ( j)
0, | | c
H (e ), | | c ,
jT
H eff ( j)
0, | | c
jT
H eff ( j) H aa ( j) H (e )
2023/9/23 DSP 75
Using oversampled A/D conversion to simplify a continuous-time
antialiasing filter
Sharp
xC(t) Simple xa(t) x^[n] xd[n]
antialiasing
antialiasing C/D M
filter
filter
cutoff = /M
T = (1/M)(/N)
2023/9/23 DSP 76
Using oversampled A/D conversion to simplify a continuous-time
antialiasing filter
2023/9/23 DSP 77
Use of oversampling followed by decimation in C/D
conversion
2023/9/23 DSP 78
Analog-to-Digital (A/D) Conversion
T T
2023/9/23 DSP 79
Ideal Sample-and-Hold System
s( t ) ( t nT )
n
x Zero-order
xa(t) xS(t) hold hO(t) xO(t)
Sample-and-Hold System
xa(t) xO(t)
-3T -2T -T 0 T 2T 3T 4T 5T
2023/9/23 DSP 80
Sample and Hold
Normally, "sample and hold" is a ADC term, in which an analog signal is
"sampled" by charging a capacitor to voltage of the signal, and then "held", by
disconnecting the charge circuitry and giving the convertor stage some time to
digitize the (now constant) held sample.
2023/9/23 DSP 81
Sample and Hold
In terms of DACs. You can output a sampled waveform by writing each (digital)
sample to the DAC at a fixed interval. If the DAC has a fast settling time relative
to the frequency that you write to it, this method will produce a "staircase" form of
output.
In the case where the DAC settling time is fast, sometimes it can be filtered
digitally by computing (interpolating) one or more points between each sample
pair and outputting them at a rate faster than the "sample and hold" case. The
waveform will then appear to be comprised of a series of ramps rather than steps.
So it will appear "smoother" (more continuous).
2023/9/23 DSP 82
x0 (t ) x[n]h (t nT )
n
0
x[n] xa (nT )
1, 0 t T
h0 (t )
0, otherwise
x0 (t ) h0 (t ) x (nT ) (t nT )
n
a
2023/9/23 DSP 83
Physical system and its conceptual representation
T T
2023/9/23 DSP 84
Typical Quantizer for A/D Conversion
2023/9/23 DSP 85
Typical Quantizer for A/D Conversion
2023/9/23 DSP 87
Sampling, Quantization, Coding, and D/A Conversion with a
3-bit Quantizer
2023/9/23 DSP 88
Analysis of Quantization Errors
The difference between the quantized sample x^[n] and true sample value x[n] is
the quantization error:
e[n] = x^[n] – x[n].
If linear round-off (B+1)-bit quantizer is used, then
-D/2 < e[n] < = D/2
which holds whenever
(-Xm – D/2) < x[n] < = (Xm – D/2)
where D is step size of the quantizer:
D = Xm/2B
If x[n] is outside the range mentioned above, then the qunatization error is larger
in magnitude than D/2 and such samples are said to be clipped.
2023/9/23 DSP 89
Additive Noise Model for Quantizer
e[n]
2023/9/23 DSP 90
Analysis of Quantization Error 2
/2
1 2 22 B X m
e de
2 2
e
/ 2
12 12
2023/9/23 DSP 91
Example of Quantization Noise for a Sinusoidal Signal
2023/9/23 DSP 92
Conclusion of Quantization Error
In low number-bit case, the error signal is highly correlated with the unquantized
signal.
The quantization error for high number-bit quantization is assumed to vary
randomly and is uncorrelated with the unquantized signal.
SNR= 10log10(sx2/se2)
= 10log10(12*22Bsx2/Xm2) for rounding quantizer
= 6.02B + 10.8 –20log10(Xm/sx)
The SNR ratio increases approximately 6 dB for each bit added to the word
length of the quantized samples.
2023/9/23 DSP 93
2023/9/23 DSP 94
For analog signals such as speech or music, the distribution of
amplitudes tends to be concentrated about zero and falls off rapidly
with increasing amplitude.
The probability that the magnitude of a sample will exceed 3 or 4 times the RMS value is very
low.
For example, obtaining a signal-to-noise ratio of about 90~96 dB for use in high quality music
recording and playback requires 16-bit quantization.
But it should be remembered that such performance is obtained only if the input signal is
carefully matched to the full-scale range of the A/D converter.
The trade-off between peak signal amplitude and absolute size of the
quantization noise is fundamental to any quantization process.
2023/9/23 DSP 95
D/A Conversion
x^[n] xDA(t)
D/A
Converter
2023/9/23 DSP 96
D/A Conversion
2023/9/23 DSP 97
D/A Conversion
2023/9/23 DSP 98
D/A Conversion
2023/9/23 DSP 99
Frequency response of zero-order hold compared with
ideal interpolating filter and ideal compensated
reconstruction filter for use with a zero-order-hold output
T Ideal interpolating
Filter Hr(j)
Zero-order
Hold |HO(j)|
|Hr~(j)|
-/T 0 /T