Basics on Digital Signal Processing

advertisement
Analog to Digital Conversion
Oversampling or Σ-Δ converters
Vassilis Anastassopoulos
Electronics Laboratory, Physics Department,
University of Patras
Outline of the Lecture
Analog to Digital Conversion
- Oversampling or Σ-Δ converters
Sampling Theorem - Quantization of Signals
PCM (Successive Approximation, Flash ADs)
DPCM - DELTA - Σ-Δ Modulation
Principles - Characteristics
1st and 2nd order
Noise shaping - performance
Decimation and A/D converters
Filtering of Σ-Δ sequences
2/39
Analog & digital signals
Analog
Digital
Discrete function Vk of
discrete sampling
variable tk, with k =
integer: Vk = V(tk).
Sampled
Signal
0.3
0.3
0.2
0.2
Voltage [V]
Voltage [V]
Continuous function V
of continuous variable t
(time, space etc) : V(t).
0.1
0
-0.1
-0.2
0.1
0
ts ts
-0.1
-0.2
0
2
4
6
time [ms]
8
10
0
2
4
6
8
sampling time, tk [ms]
10
Uniform (periodic) sampling.
Sampling frequency fS = 1/ tS
3/39
AD Conversion - Details
4/39
Sampling
5/39
Rotating Disk
How fast do we have to instantly
stare at the disk if it rotates
with frequency 0.5 Hz?
6/39
1
The sampling theorem
A signal s(t) with maximum frequency fMAX can be
Theo* recovered if sampled at frequency f > 2 f
S
MAX .
* Multiple proposers: Whittaker(s), Nyquist, Shannon, Kotelnikov.
Naming gets
confusing !
Nyquist frequency (rate) fN = 2 fMAX or fMAX or fS,MIN or fS,MIN/2
Example
s(t)  3  cos(50π t)  10  sin(300π t)  cos(100π t)
F1
F2
F1=25 Hz, F2 = 150 Hz, F3 = 50 Hz
Condition on fS?
F3
fS > 300 Hz
fMAX
7/39
Sampling and Spectrum
8/39
1
Sampling low-pass signals
Continuous spectrum
(a)
(a) Band-limited signal:
frequencies in [-B, B] (fMAX = B).
-B
0
(b)
B
f
Discrete spectrum
No aliasing
(b) Time sampling
frequency
repetition.
fS > 2 B
-B
0
B fS/2
f
Discrete spectrum
Aliasing & corruption
(c)
0
fS/2
no aliasing.
(c) fS
f
2B
aliasing !
Aliasing: signal ambiguity
in frequency domain
9/39
Quantization and Coding
N Quantization Levels
q
Quantization Noise
10/39/
2
SNR of ideal ADC
Assumptions
 RMS input 
 (1)
SNRideal  20  log10 
 RMS(e q ) 
 Ideal ADC: only quantisation error eq


(p(e) constant, no stuck bits…)
Also called SQNR
(signal-to-quantisation-noise ratio)
 eq uncorrelated with signal
(noise spectrum???)
 ADC performance constant in time.
RMS input 
T
2
V
1  VFSR

 
 sinωt  dt  FSR
T  2
2 2

0
Input(t) = ½ VFSR sin( t).
p(e)
quantisation error probability density
q/2
RMS(e q ) 

 
eq2  p eq deq 
-q/2
VFSR
q

12 2N  12
(sampling frequency fS = 2 fMAX)
1
q
q
2
q
2
eq
Error value
11/39/
2
SNR of ideal ADC - 2
SNRideal  6.02  N  1.76 [dB]
Substituting in (1) :
One additional bit
(2)
SNR increased by 6 dB
Real SNR lower because:
- Real signals have noise.
- Forcing input to full scale unwise.
- Real ADCs have additional noise (aperture jitter, non-linearities etc).
Actually (2) needs correction factor depending on ratio between sampling freq
& Nyquist freq. Processing gain due to oversampling.
12/39
Coding – Flash AD
13/39
Coding - Conventional
14/39
Digital Filters
•They are characterized by their
Impulse Response h(n), their
Transfer Function H(z) and their
Frequency Response H(ω).
•They can have memory, high
accuracy and no drift with time and
temperature.
•They can possess linear phase.
•They can be implemented by digital
computers.
15/39
Digital Filters - Categories
IIR
N
M
k 0
k 1
y( n )   a( k ) x( n  k )   bk y( n  k )
N
H(z) 
 ak z k
x(n)
k 0
M
1   bk z  k
k 1
Ts
a0
x(n-1)
a1
Ts
x(n-2)
x(n-Ν+1)
a2
Ts
aN-1
aN
y(n)
+
bΜ
y(n-Μ)
bΜ-1
Ts
y(n-Μ+1)
b2
y(n-2)
x(n-Ν)
b1
Ts
y(n-1)
Ts
16/39
Digital Filters - Categories
N
N
k 0
k 0
y( n )   h( k ) x( n  k )   a( k ) x( n  k )
N
H ( z )   ak z
k
k 0
x(n)
a0 ή
h(0)
Ts
x(n-1)
a1 ή
h(1)
FIR
N
  h( k ) z  k
k 0
Ts
x(n-2)
a2 ή
h(2)
+
x(n-Ν+2)
aΝ-2 ή
h(Ν-2)
Ts
x(n-Ν+1)
aΝ-1 ή
h(Ν-1)
y(n)
•Stable
•Linear phase
17/39
Digital Filters - Examples
a0  a1 z 1  a2 z 2
H(z) 
1  b1 z 1  b2 z 2
0
0.5
k 0
h(1)=h(10)=-0.04506
h(2)=h(9)=0.06916
h(3)=h(8)=-0.0553
h(4)=h(7)=-.06342
-1
-2
0
0.1
0.2 0.3
Frequency
-3
0.4
1.5
k
Magnitude FIR
H ( z )   h( k ) z
Phase IIR
1
0
11
1
1
0.5
0
0
0.1
0.2 0.3
Frequency
0.4
0
0.1
0.2 0.3
Frequency
0.4
4
Phase FIR
a1=0.927,
b1=-0.674
Magnitude IIR
a0=0.498,
a2=0.498,
b2=-0.363.
1.5
0
0.1
0.2 0.3
Frequency
0.4
2
0
-2
-4
h(5)=h(4)=0.5789
18/39
FIR filters
N
N
k 0
k 0
N
y( n )   h( k ) x( n  k )   a( k ) x( n  k )
x(n)
a0 ή
h(0)
Ts
x(n-1)
a1 ή
h(1)
Ts
H ( z )   ak z
k 0
x(n-2)
a2 ή
h(2)
+
•Stable
•Linear phase
x(n-Ν+2)
aΝ-2 ή
h(Ν-2)
Ts
k
N
  h( k ) z  k
k 0
x(n-Ν+1)
aΝ-1 ή
h(Ν-1)
y(n)
Design Methods
• Optimal filters
• Windows method
• Sampling frequency
19/39
Linear phase - Same time delay
180o
3*180o
5*180o
If you shift in time one signal, then you have to shift the other signals the
same amount of time in order the final wave remains unchanged.
For faster signals the same time interval means larger phase difference.
Proportional to the frequency of the signals. -αω
20/39
Oversampling and Noise Shaping Converters
21/39
Quantization Noise Shaping
22/39
Differential Pulse Code Modulation - DPCM
23/39
Delta Modulation – One bit DPCM
The coder is an integrator as
the one in the feedback loop.
24/39
Delta Sequences
25/39
ΔΣ - Encoder
26/39
ΔΣ – Encoder Behavior - Signal Transfer Function
27/39
ΔΣ – Encoder Behavior
Quantization Noise Signal Transfer Function (X=0)
28/39
Quantization Noise Power Density in the Signal Band
29/39
A Second Order ΔΣ Modulator
30/39
Third Order Noise Shaper
31/39
Digital Decimation
32/39
Digital Decimation – ΣΔ to PCM Conversion
33/39
Digital Decimation – ΣΔ to PCM Conversion
34/39
Multi-Rate FIR filters
35/39
Decimation
Low rate sequences are finally stored on CDs
36/39
Interpolation
Interpolation is used to convert the Low rate
sequences stored on the CDs to analog signals
Oversampling is used
37/39
Oversampling in Audio Systems
38/39
39/39
Download