Professional Documents
Culture Documents
C-T To D-T Conversion Sampling of C-T Signals
C-T To D-T Conversion Sampling of C-T Signals
C-T To D-T Conversion Sampling of C-T Signals
Mark Fowler
Note Set #21
C-T to D-T Conversion: Sampling of C-T signals Reading Assignment: Section 5.4 of Kamen and Heck We study this now for two reasons:
The analysis uses C-T Frequency-Domain System Analysis Methods Next we will study Fourier Transform ideas for D-T signals and this gives a good transition
1
Ch. 2 Convolution
C-T System Model Convolution Integral D-T Signal Model Convolution Sum
5.4 Sampling
The Connection Between: Continuous Time & Discrete Time
Warning: I dont really like how the book covers this! It is not that it is wrong it just fails to make the correct connection between the mathematics and physical reality!!!! Follow these notes and youll get it!!!
3
Sampling is Key Part of CD Scheme Sampled & Digitized music on a Compact Disc
What ensures that we can perfectly reconstruct the music signal from its samples???!!!!
Record Amp
Microphone
2 Signal Value 1 0 -1 -2 0 0.2 0.4 Time Tim e 0.6 0. 8 1
Code
Play
Signal Value
Laser Sensor 1
0 -1
Decode
Reconstruct
Amp
Speaker
= Original?
4
ADC
DSP Computer
D-T Signal D-T System D-T Signal
DAC
C-T Signal
5
ADC
x[n]
D-T Signal
DAC
x (t )
C-T Signal
x (t ) = x (t )
???
Practical Sampling-Reconstruction Set-Up Analog-to-Digital Converter Digital-to-Analog Converter (ADC) (DAC) x(t) x [n] = x (nT) Pulse
Hold Sample at t = nT
T = Sampling Interval Fs = 1/T = Sampling Rate
Gen Clock at t = nT
CT LPF
~(t ) x
x (t )
2 Signal Value 1 0 -1 -2 0 0.2 0.4 Tim e 2 Signal Value 1 0 -1 -2 0 0.2 0.4 Tim e 0.6 0. 8 1 0.6 0. 8 1
You learn the circuits in an electronics class Here we focus on the why, so we need math models We start in a little different place than the book but we end up with the same result (but a little easier to see how/why)
x[n ] = x (t ) t = nT = x ( nT )
Note: the book uses an impulse sampling model for the ADC but that has no connection to a physical ADC well see later that it does have a physical connection to the physical DAC!
8
x[n]
Pulse Gen
~(t ) x
h(t) H()
x (t )
x (t ) = ~(t ) h(t ) x ~ X ( ) = X ( ) H ( )
~(t ) x
x (t )
~(t ) = x
n =
x(nT ) p(t nT )
-T T
2T
3T
Impulse Sampling Model for DAC Now we have a good model that handles quite well what REALLY happens inside a DAC but we simplify it !!!! To Ease Analysis: Use p (t ) = (t ) Why???? 1. Because delta functions are EASY to analyze!!! 2. Because it leads to the best possible results (see later!) 3. We can easily account for real-life pulses later!!
p (t ) = (t )
~(t ) = x
n =
x(nT ) (t nT )
In this form this is called the Impulse Sampled signal. Now.. Using property of delta function we can also write
~(t ) = x (t ) x
n =
(t nT )
10
Sampling Analysis (p. 1) Analysis will be done using the Impulse Sampling Math Model x(t) ADC
Hold Sample at t = nT
h(t) H()
x (t )
~(t ) = x (t ) x
n =
(t nT )
x (t )
= x (t ) T (t )
T (t ) Impulse
-2T -T T 2T
Train
3T
t
~(t ) = x (t ) (t ) x T
-2T
-T T
2T
3T
11
Sampling Analysis (p. 2) Goal = Determine Under What Conditions We Get: Reconstructed CT Signal = Original CT Signal x (t ) = x (t )
~(t ) Approach: 1. Find the FT of the signal x
2. Use Freq. Response of Filter to get X ( ) = X ( ) H ( ) 3. Look to see what is needed to make X ( ) = X ( ) ~
12
Sampling Analysis (p. 3) Step #1: Hmmm well T(t) is periodic with period T so we COULD expand it as a Fourier series:
T (t ) =
k =
ck e jk 2Fs t
T / 2
T (t )e jk 2Fs t =
1 T
T /2
T / 2
(t )e jk 2Fs t
1 jk 2Fs t = e T
t =0
1 = T
k =
k =
jk 2Fs t
By frequency shift property of FT each term is a frequency shifted version of the original signal!!!
k =
x (t )e jk 2Fs t
k =
X ( f + kFs )
Original FT
1 ~ X ( f ) = [L + X ( f 2 Fs ) + X ( f Fs ) + X ( f ) + X ( f + Fs ) + X ( f + 2 Fs ) + L] T
Shifted Replicas
14
Sampling Analysis (p. 5) So the BIG Thing weve just found out is that: the impulse sampled signal (inside the DAC) has a FT that consists of the original signals FT and frequency-shifted version of it (where the frequency shifts are by integer multiples of the sampling rate Fs) This result allows us to see how to make sampling work By work we mean: how to ensure that even though we only have samples of the signal, we can still get perfect reconstruction of the original signal. at least in theory!! The figure on the next page shows how.
15
CT LPF
x (t )
B
A/T
1 ~ X( f ) = T
Fs B
k =
X ( f + kFs )
2Fs
2Fs
Fs
Fs B
To ensure that the replicas dont overlap the original. we need Fs B B or equivalently Fs 2 B When there is no overlap, the original spectrum is left unharmed and can be recovered using a CT LPF (as seen on the next page).
16
CT LPF
x (t )
X( f ) B f
A/T
1 ~ X( f ) = T
Fs
k =
X ( f + kFs )
2Fs f
2Fs
Fs
T
H( f ) f
X( f )
X ( f ) = X ( f ) K if Fs 2 B 17
Sampling Analysis (p. 8) What this analysis says: Sampling Theorem: A bandlimited signal with BW = B Hz is completely defined by its samples as long as they are taken at a rate Fs 2B. Impact: To extract the info from a bandlimited signal we only need to operate on its (properly taken) samples Then can use a computer to process signals!!! x(t)
Hold Sample at t = nT
x[n] = x(nT)
Computer
Extracted Information
This math result (published in the late 1940s!) is the foundation of: CDs, MP3s, digital cell phones, etc. 18
Some Sampling Terminology Fs is called the sampling rate. Its unit is samples/sec which is often equivalently expressed as Hz The minimum sampling rate of Fs = 2B samples/sec is called the Nyquist Rate. Sampling at the Nyquist rate is called: Sampling faster than the Nyquist rate is called . .
Note: Critical sampling is only possible if an IDEAL lowpass filter is used. so in practice we generally need to choose a sampling rate somewhat above the Nyquist rate (e.g., 2.2B ); the choice depends on the application.
19
Aliasing Analysis: What if samples are not taken fast enough??? ADC DAC x(t) x[n] = x(nT) Impulse
Hold Sample at t = nT X( f ) B B f Gen
~(t ) x
CT LPF
x (t )
~ X( f )
2Fs Fs aliasing
If Fs < 2 B... X( f ) X( f )
Fs H( f )
2Fs
X( f )
Called
f
To enable error-free reconstruction, a signal bandlimited to B Hz must be sampled faster than 2B samples/sec
20
Aliasing Analysis: What if the signal is NOT BANDLIMITED??? ADC DAC x(t) x[n] = x(nT) Impulse
Hold Sample at t = nT X( f ) f Gen
~(t ) x
CT LPF
x (t )
~ X( f )
Fs
Fs
Practical Sampling: Use of Anti-Aliasing Filter In practice it is important to avoid excessive aliasing. So we use a CT lowpass BEFORE the ADC!!! Fs = 44.1 kHz ADC
Amp
Microphone
Anti-Aliasing Sample & Code LPF Digitize CT CT Discrete-Time Signal Signal Signal X( f )
-20 kHz
~ X aa ( f )
20 kHz
f
22
Minimal Aliasing
22.05 kHz f
Summary of Sampling
Math Model for Impulse Sampling says
The FT of the impulse sampled signal has spectral replicas spaced Fs Hz apart This math result drives all of the insight into practical aspects
23