SP Slides 3
SP Slides 3
Periodic Sampling
Continous-time signals are usually sampled periodically every T seconds:
1
Since T is the sampling period, its reciprocal Fs = T (samples/sec) is the sampling
frequency, or in radians per second: ⌦s = 2⇡T .
Sampling With a Periodic Impulse Train
1
X 1
X
xs (t) = xc (t) (t nT ) = xc (nT ) (t nT )
n= 1 n= 1
Frequency-Domain Perspective of Sampling
The impulse train that we used in the model of the sampling process,
1
X
s(t) = (t nT )
n= 1
Then xc (t) is uniquely determined by its samples x[n] = xc (nT ), n = 0, ±1, ±2, ...,
if
2⇡
⌦s = 2⌦N .
T
⌦N is the Nyquist frequency.
2⌦N is the Nyquist rate.
Relationship Between Continuous-Time and Discrete-Time
Frequency Variables with Periodic Sampling
Discrete-Time Sinusoidal Signals
F
f= or, ! = ⌦T
Fs
Example: Sampled Sinusoidal Signal
If we sample xc (t) = cos(4000⇡t) with a sampling period of T = 1/6000 we obtain:
2⇡
x[n] = xc (nT ) = cos (4000⇡T n) = cos 3 n
The sample rate is ⌦s = 2⇡/T = 12000⇡ rad/sec which is more than twice the
frequency of the original signal so there is no aliasing.
x1 [n] = cos 2⇡ 10
40 n = cos
⇡
2n
x2 [n] = cos 2⇡ 50
40 n = cos
5⇡
2 n
5⇡ 5⇡ ⇡
However, cos 2 n = cos cos 2 n 2⇡n = cos 2n so x2 [n] = x1 [n].
⌦c = ⌦s /2 = ⇡/T
Impulse response:
sin(⇡t/T )
hr (t) =
⇡t/T
= sinc(t/T )
sin(⇡x)
sinc(x) =
⇡x
Reconstruction of the Original Signal
hr (t) = sinc(t/T )
Output:
1
X
xr (t) = x[n] sinc ((t nT )/T )
n=1
Discrete-Time Processing of Continuous-Time Signals
Summary of Mathematical Representations
x[n] = xc (nT )
1
1 X ⇥ ⇤
X(ej! ) = Xc j !
T
2⇡k
T
T
k= 1
1
X
yr (t) = y[n] sinc [(t nT )/T ]
n= 1
(
j⌦T T Y (ej⌦T ), |⌦| < ⇡/T
Yr (j⌦) = Hr (j⌦)Y (e )=
0, otherwise
Overall Frequency Response
where (
H(ej⌦T ), |⌦| < ⇡/T
He↵ (j⌦) =
0, |⌦| ⇡/T
Example: Ideal Lowpass Filter
( (
j! 1, |!| < !c 1, |⌦T | < !c or |⌦| < !c /T
H(e ) = He↵ (j⌦) =
0, !c < |!| ⇡ 0, |⌦T | !c or |⌦| !c /T
Example: Ideal Lowpass Filter (Continued)
Impulse Invariance for Implementing Continuous-Time
System in Discrete-Time
Impulse Invariance (Given a Desired Continuous-Time System)
h[n] = T hc (nT )
Example: Lowpass Filter Using Impulse Invariance
Use the impulse invariance technique to find an ideal lowpass discrete-time filter
with cuto↵ frequency !c < ⇡, given this continuous-time ideal lowpass filter:
(
1, |⌦| < ⌦c
Hc (j⌦) = where ⌦c = !c /T < ⇡/T
0, |⌦| ⌦c
Finding z-transform:
AT
H(z) = 1 |z| > |es0 T |
1 e s0 T z
Gives frequency response, assuming Re(s0 ) < 0:
AT A
H(ej! ) = 6= Hc (j T! ) =
1 e s0 T e j! j T! s0
1 X ⇣ j(!/M ⌘
M 1
j! 2⇡i/M )
Xd (e ) = X e
M
i=0
Example: Downsampling, M = 2, With No Aliasing
X(ej! ) = 0, !N |!| ⇡
To avoid aliasing:
!M ⇡ or !N ⇡/M
( 1
x[n/L], n = 0, ±L, ±2L, .... X
xe [n] = or xe [n] = x[k] [n kL]
0, otherwise k= 1
Upsampling: A frequency Domain Perspective
After upsampling:
1
X
xe [n] = x[k] [n kL]
k= 1
sin(⇡n/L)
hi [n] = note: hi [0] = 1 and hi [n] = 0, n = 0, ±L, ±2L, ....
⇡n/L
With this ideal filter: xi [n] = x[n/L] = xc (nT /L) = xc (nTi ), n = 0, ±L, ±2L, ...
Simple and Practical Interpolation Filters
Linear Interpolation:
(
1 |n|L, |n| L
hlin [n] =
0, otherwise
FIR Filter for interpolation, where h̃i [n] = 0 for |n| KL:
n+KL
X 1
x̃i [n] = xe [k]h̃i [n k]
k=n KL+1
Changing Sample Rate by Rational Factor
Y (ej! ) = Xa (ej!L )
= X(ej!L )H(ej!L)
= H(ej!L )Xb (ej! )
Analog-to-digital conversion:
Analog-to-Digital Conversion System
x̂[n] = Q(x[n])
Coder will label each quantization level with binary code of (B + 1)-bits.
Quantizer for A/D Conversion (8 Levels with B + 1 bits, B = 2)
Quantizer step
size:
2Xm Xm
= B+1
= B
2 2
Example: Sampling, Quantization, Coding, D/A Conversion (3-bits)
Analysis of Quantization Errors
Quantization Error
Quantization error is di↵erence between quantized sample and true sample value:
If is the step-size and the input samples stay within the full range of
/2 e[n] < /2
otherwise, then |e[n]| > /2 and samples are clipped (quantizer is overloaded)
Model of Quantizer
Since autocorrelation is 2
ee [m] = e [m], the power spectral density is:
2 2B X 2
m
Pee (ej! ) = 2
e = |!| ⇡
12
Signal-to-Quantization-Noise Ratio (SNR)
I SNR increases about 6 dB for each bit added (doubling of quantization levels)
I To prevent last term from becoming large and negative, signal amplitude
should be matched to full-scale amplitude of A/D