Lecture 3 Mixed Signal Testing

Download Report

Transcript Lecture 3 Mixed Signal Testing

Lecture 4 Sampling
Overview of Sampling Theory
Sampling Continuous Signals



Sample Period is T, Frequency is 1/T
x[n] = xa(n) = x(t)|t=nT
Samples of x(t) from an infinite discrete sequence
Continuous-time Sampling

Delta function d(t)




Zero everywhere except t=0
Integral of d(t) over any interval including
t=0 is 1
(Not a function – but the limit of functions)
Sifting 
 f (t )d(t  t )dt  f (t )
0

0
Continuous-time Sampling

Defining the sequence by multiple sifts:
xa (t ) 

Equivalently:
xa (t ) 


 x(t )d(t  nT )
n  

 x(nT )d(t  nT )
n  
Note: xa(t) is not defined at t=nT and is zero
for other t
Reconstruction


Given a train of samples – how to rebuild a
continuous-time signal?
In general, Convolve some impluse function
with the samples:
x(t ) 

 x(nT )im p(t  nT )
n  

Imp(t) can be any function with unit
integral…
Example
Linear interpolation:
1  t  1 0  t  2
im p(t )  
else
 0
Integral (0,2) of imp(t) = 1
Imp(t) = 0 at t=0,2
Reconstucted function is piecewise-linear
interpolation of sample values
DAC Output


Stair-step output
1 0  t  1
imp(t )  
else
0
DAC needs filtering to reduce excess
high frequency information
Sinc(x) – ‘Perfect Reconstruction’

Is there an impulse function which
needs no filtering?
im p(t ) 

sin(
t
T
t
T
)
Why? – Remember that Sin(t)/t is
Fourier Transform of a unit impulse
Perfect Reconstruction II

Note – Sinc(t) is non-zero for all t

Implies that all samples (including negative
time) are needed
 (t  nT ) 
sin 


T

x(t )   x[n] 
(t  nT )
n  
T

Note that x(t) is defined for all t since
Sinc(0)=1
Operations on sequences



Addition: y[n]  x[n]  w[n]
Scaling: y[n]  A  x[n]
Modulation: y[n]  x[n]  w[n]




Windowing is a type of modulation
Time-Shift: y[n]  x[n  1]
 x[n / L], n  0,  L,  2L,
Up-sampling: x [n]   0,
else
Down-sampling: xd [n]  x[nM ]
u
Up-sampling
x[n]
x [n]
1
1
0.5
Amplitude
Amplitude
0.5
0
-0.5
-1
u up-sampled by 3
Output sequence
Input Sequence
0
-0.5
0
10
20
30
Time index n
40
50
-1
0
xu [n]  x[n / 3]
10
20
30
Time index n
40
50
Down-sampling (Decimation)
x[n]
x [n]
Input Sequence
1
1
0.5
Amplitude
Amplitude
0.5
0
-0.5
-1
d down-sampled by 3
Output sequence
0
-0.5
0
10
20
30
Time index n
40
50
-1
0
xd [n]  x[3n]
10
20
30
Time index n
40
50
Resampling (Integer Case)

Suppose we have x[n] sampled at T1
but want xR[n] sampled at T2=L T1

x(t )   x(nT1 )im pulse(t  nT1 )
n  
xR [ k ] 



 x(nT )im pulse(t  nT )
1
n  
1

 x(nT )im pulse(kT
n  

1
2
t  kT2
 nT1 )
 x(nLT )im pulse((k  nL)T )
n  
 xR [ k ] 
2
2

 x[n]im pulse[k  n]
n  
Sampling Theorem

Perfect Reconstruction of a continuoustime signal with Bandlimit f requires
samples no longer than 1/2f


Bandlimit is not Bandwidth – but limit of
maximum frequency
Any signal beyond f aliases the samples
Aliasing (Sinusoids)
Alaising


For Sinusoid signals (natural bandlimit):
For Cos(wn), w=2k+w0




Samples for all k are the same!
Unambiguous if 0<w<
Thus One-half cycle per sample
So if sampling at T, frequencies of
f=e+1/2T will map to frequency e