Upload
abhinav-virat-bhagat
View
223
Download
0
Embed Size (px)
Citation preview
8/8/2019 L11-ctquant-2up
1/9
2008-11-25Dan Ellis 1
ELEN E4810: Digital Signal Processing
Topic 11:
Continuous Signals1. Sampling and Reconstruction2. Quantization
2008-11-25Dan Ellis 2
1. Sampling & Reconstruction! DSP must interact with an analog world:
DSP
Anti-aliasfilter
Sampleand hold
A to D
Reconstructionfilter
D to A
Sensor Actuator WORLD
x(t ) x[n] y[n] y(t )ADC DAC
8/8/2019 L11-ctquant-2up
2/9
2008-11-25Dan Ellis 3
Sampling: Frequency Domain! Sampling: CT signal ! DT signal by
recording values at sampling instants :
! What is the relationship of the spectra ?! i.e. relate
and
g n[ ] = ga nT ( )Discrete ContinuousSampling period T
! samp.freq. samp = 2 /T rad/sec
G a j !( ) = ga t ( )e" j ! t dt "#
#$ G (e j
%
) = g n[ ]e"
j %
n"#
#
&
CTFT
DTFT
in rad/ second
in rad/ sample
2008-11-25Dan Ellis 4
Sampling! DT signals have same content
as CT signals gated by an impulse train :
! g p(t ) = ga(t ) p(t ) is a CT signal with thesame information as DT sequence g[n]
t
t
t
p(t )
ga(t ) g p(t )
sampled signal:still continuous- but discrete
valuesT 3T
= ! t " nT ( )n = "##
$CT delta fn
!
8/8/2019 L11-ctquant-2up
3/9
2008-11-25Dan Ellis 5
Spectra of sampled signals! Given CT !
Spectrum
! Compare to DTFT! i.e.
by linearity
/T = samp /2
g p (t ) =
n=
ga (nT ) (t nT )
G p ( j ) = F{ g p (t )} = n
ga (nT )F{ (t nT )}
G p ( j ) = n
ga (nT )e j nT
G (e j ) = n
g[n ]e j n
G (e j ) = G p
( j )|T
=
2008-11-25Dan Ellis 6
Spectra of sampled signals! Also, note that
is periodic , thus has Fourier Series :
! But
so
p t ( ) = ! t " nT ( )# n$
p t ( ) =1
T e
j 2 ! T ( )kt
k = "#
#
$
Q ck =1
T p t ( )e ! j 2 " kt / T dt ! T / 2
T / 2# =
1
T
F e j !
0 t x t ( ){ }= X j ! " ! 0( )( ) shift infrequency G p j !( ) =
1
T G a j ! " k ! samp( )( )# k $- scaled sum of shifted replicas of Ga( j )by multiples of sampling frequency samp
8/8/2019 L11-ctquant-2up
4/9
2008-11-25Dan Ellis 7
CT and DT Spectra
G e j ! ( )= G p j "( )" T = ! = 1T G a j ! T # k 2 $ T ( )( )%k & G e jT
!
( )= 1T G a j ! " k ! samp( )( )# k $DTFT CTFT
ga t ( )! G a j "( )
p t ( )! P j "( )
g p t ( )! G p j "( )
g n[ ]! G e j " ( )
"
=
#
! So:
M $ M
ga(t ) is bandlimited @ %
samp$ samp
M
2 samp$ 2 samp
M/T shifted/scaled copies
2 4 $ 2 $ 4 at
have
=
samp=
2
T
=
T = 2
2008-11-25Dan Ellis 8
Aliasing! Sampled analog signal has spectrum:
!
ga(t ) is bandlimited to
M rad/sec! When sampling frequency samp is large...! no overlap between aliases! can recover ga(t ) from g p(t )
by low-pass filtering
M $ samp samp$ M
samp
$ M $ samp + M
G p( j )Ga( j ) alias of baseband
signal
8/8/2019 L11-ctquant-2up
5/9
2008-11-25Dan Ellis 9
The Nyquist Limit! If bandlimit M is too large, or sampling
rate samp is too small, aliases will overlap :
! Spectral effect cannot be filtered out! cannot recover ga(t )
! Avoid by:
! i.e. bandlimit ga(t ) at "
M $ samp samp $ M
samp$
M
G p( j )
! samp " ! M # ! M $ ! samp # 2 ! M Sampling theorum
Nyquist frequency
! samp2
2008-11-25Dan Ellis 10
Anti-Alias Filter ! To understand speech, need ~ 3.4 kHz! 8 kHz sampling rate (i.e. up to 4 kHz)! Limit of hearing ~20 kHz! 44.1 kHz sampling rate for CDs! Must remove energy above Nyquist with
LPF before sampling: Anti-alias filter
M
ADC
Anti-aliasfilter
Sample& hold
A to D
space for filter rolloff
8/8/2019 L11-ctquant-2up
6/9
2008-11-25Dan Ellis 11
Sampling Bandpass Signals! Signal is not always in baseband
around = 0 ... may be some higher :
! If aliases from sampling dont overlap,no aliasing distortion, can still recover
! Basic limit: samp /2 ! bandwidth
$ H L $ L H
M
Bandwidth = H $ L
samp $ samp2
samp
M /T
samp / 2
2008-11-25Dan Ellis 12
! make a continuousimpulse train g p(t )
! lowpass filter toextract baseband! ga(t )
Reconstruction! To turn g[n]
back to ga(t ):
! Ideal reconstruction filter is brickwall ! i.e. sinc - not realizable (especially analog!)! use something with finite transition band...
^ t g p(t )
ng[n]
t ga(t )
G(e j )
G p( j )
Ga( j )
samp
/2
^
^ ^
^^
^
8/8/2019 L11-ctquant-2up
7/9
2008-11-25Dan Ellis 13
2. Quantization! Course so far has been about
discrete-time i.e. quantization of time! Computer representation of signals also
quantizes level (e.g. 16 bit integer word)! Level quantization introduces an error
between ideal & actual signal ! noise! Resolution (# bits) affects data size
! quantization critical for compression! smallest data coarsest quantization
2008-11-25Dan Ellis 14
Quantization! Quantization is performed in A-to-D:
!
Quantization has simple transfer curve:Quantized signal
x = Q x { }Quantization error
e = x ! x
8/8/2019 L11-ctquant-2up
8/9
2008-11-25Dan Ellis 15
Quantization noise! Can usually model quantization as
additive white noise: i.e. uncorrelated with self or signal x
+ x[n] x[n]^
e[n]
-
bits cut off by quantization;
hard amplitude limit
2008-11-25Dan Ellis 16
Quantization SNR! Common measure of noise is
Signal-to-Noise ratio (SNR) in dB:
!
When | x| >> 1 LSB, quantization noisehas ~ uniform distribution:
SNR = 10 !log 10" x
2
" e2 dB
signal power
noise power
(quantizer step = )
! " e
2=
# 2
12
8/8/2019 L11-ctquant-2up
9/9
2008-11-25Dan Ellis 17
Quantization SNR! Now, & x2 is limited by dynamic range of
converter (to avoid clipping)! e.g. b+1 bit resolution (including sign)
output levels vary -2 b .. (2 b-1) ! ! ! ! where full-scale range
i.e. ~ 6 dBSNR per bit
dependson signal
=
R FS 2
...R FS
2 R FS = 2b + 1
SNR = 10log 10 x2
RFS
2
2 2 b 4 12
= 6b + 16.8 20 log 10
R FS
x( )
2008-11-25Dan Ellis 18
Coefficient Quantization! Quantization affects not just signal
but filter constants too! .. depending on implementation! .. may have different resolution
! Some coefficientsare very sensitiveto small changes
! e.g. poles near unit circle
high-Q polebecomesunstable