Basics on Digital Signal Processing

Post on 19-Mar-2022

5 views 0 download

Transcript of Basics on Digital Signal Processing

Analog to Digital Conversion

Oversampling or Σ-Δ converters

Vassilis Anastassopoulos

Electronics Laboratory, Physics Department,

University of Patras

2/39

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

3/39

-0.2

-0.1

0

0.1

0.2

0.3

0 2 4 6 8 10sampling time, tk [ms]

Vo

lta

ge

[V

]

ts

-0.2

-0.1

0

0.1

0.2

0.3

0 2 4 6 8 10sampling time, tk [ms]

Vo

lta

ge

[V

]

ts

Analog & digital signals

Continuous function V

of continuous variable t

(time, space etc) : V(t).

Analog Discrete function Vk of

discrete sampling

variable tk, with k =

integer: Vk = V(tk).

Digital

-0.2

-0.1

0

0.1

0.2

0.3

0 2 4 6 8 10

time [ms]

Vo

lta

ge

[V

]

Uniform (periodic) sampling. Sampling frequency fS = 1/ tS

Sampled Signal

4/39

AD Conversion - Details

5/39

Sampling

6/39

Rotating Disk

How fast do we have to instantly stare at the disk if it rotates with frequency 0.5 Hz?

7/39

The sampling theorem

A signal s(t) with maximum frequency fMAX can be recovered if sampled at frequency fS > 2 fMAX .

Condition on fS?

fS > 300 Hz

t)cos(100πt)πsin(30010t)πcos(503s(t)

F1=25 Hz, F2 = 150 Hz, F3 = 50 Hz

F1 F2 F3

fMAX

Example

1

Theo*

* Multiple proposers: Whittaker(s), Nyquist, Shannon, Kotelnikov.

Nyquist frequency (rate) fN = 2 fMAX or fMAX or fS,MIN or fS,MIN/2 Naming gets

confusing !

8/39

Sampling and Spectrum

9/39

Sampling low-pass signals

-B 0 B f

Continuous spectrum (a) Band-limited signal:

frequencies in [-B, B] (fMAX = B). (a)

-B 0 B fS/2 f

Discrete spectrum

No aliasing (b) Time sampling frequency

repetition.

fS > 2 B no aliasing.

(b)

1

0 fS/2 f

Discrete spectrum

Aliasing & corruption (c) (c) fS 2 B aliasing !

Aliasing: signal ambiguity in frequency domain

10/39 /

Quantization and Coding

q

N Quantization Levels

Quantization Noise

11/39 /

SNR of ideal ADC 2

)qRMS(e

inputRMS10log20idealSNR (1)

Also called SQNR

(signal-to-quantisation-noise ratio)

Ideal ADC: only quantisation error eq (p(e) constant, no stuck bits…)

eq uncorrelated with signal

(noise spectrum???)

ADC performance constant in time.

Assumptions

22

FSRVT

0

dt2

ωtsin2

FSRV

T

1inputRMS

Input(t) = ½ VFSR sin( t).

12N2

FSRV

12

qq/2

q/2-

qdeqep2qe)qRMS(e

eeqq

Error value

pp((ee)) quantisation error probability density

1 q

q 2

q 2

(sampling frequency fS = 2 fMAX)

12/39

SNR of ideal ADC - 2

[dB]1.76N6.02SNRideal (2) Substituting in (1) :

One additional bit SNR increased by 6 dB

2

Actually (2) needs correction factor depending on ratio between sampling freq

& Nyquist freq. Processing gain due to oversampling.

- Real signals have noise.

- Forcing input to full scale unwise.

- Real ADCs have additional noise (aperture jitter, non-linearities etc).

Real SNR lower because:

13/39

Coding – Flash AD

14/39

Coding - Conventional

15/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.

16/39

Digital Filters - Categories

IIR y n a k x n k b y n kk

N

k

k

M

( ) ( ) ( ) ( )

0 1

H z

a z

b z

kk

k

N

kk

k

M( )

0

1

1

y(n-Μ)

x(n-Ν)

y(n-Μ+1)

x(n-Ν+1) x(n-2)

y(n-2) y(n-1)

x(n-1)

y(n)

x(n) Ts

Ts Ts Ts

b1

a1 a0

b2

a2 aN-1

bΜ-1 bΜ

aN

+

Ts Ts

17/39

FIR

Digital Filters - Categories

y n h k x n k a k x n kk

N

k

N

( ) ( ) ( ) ( ) ( )

0 0

H z a z h k zkk

k

Nk

k

N

( ) ( )

0 0

x(n-Ν+1) x(n-Ν+2) x(n-2) x(n-1)

y(n)

x(n) Ts

aΝ-1 ή

h(Ν-1)

aΝ-2 ή

h(Ν-2) a2 ή

h(2)

a1 ή

h(1)

a0 ή

h(0)

+

Ts Ts

•Stable

•Linear phase

18/39

Digital Filters - Examples

0 0.1 0.2 0.3 0.40

0.5

1

1.5

Frequency

Ma

gnitud

e II

R0 0.1 0.2 0.3 0.4

-3

-2

-1

0

1

Frequency

Pha

se

IIR

0 0.1 0.2 0.3 0.40

0.5

1

1.5

Frequency

Ma

gnitud

e F

IR

0 0.1 0.2 0.3 0.4-4

-2

0

2

4

FrequencyP

ha

se

FIR

H za a z a z

b z b z( )

0 11

22

11

221

H z h k z k

k

( ) ( )

0

11

a0=0.498, a1=0.927,

a2=0.498, b1=-0.674

b2=-0.363.

h(1)=h(10)=-0.04506

h(2)=h(9)=0.06916

h(3)=h(8)=-0.0553

h(4)=h(7)=-.06342

h(5)=h(4)=0.5789

19/39

FIR filters

y n h k x n k a k x n kk

N

k

N

( ) ( ) ( ) ( ) ( )

0 0

H z a z h k zkk

k

Nk

k

N

( ) ( )

0 0

x(n-Ν+1) x(n-Ν+2) x(n-2) x(n-1)

y(n)

x(n) Ts

aΝ-1 ή

h(Ν-1)

aΝ-2 ή

h(Ν-2) a2 ή

h(2)

a1 ή

h(1)

a0 ή

h(0)

+

Ts Ts

•Stable

•Linear phase

Design Methods

• Optimal filters

• Windows method

• Sampling frequency

20/39

Linear phase - Same time delay

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. -αω

5*180o

3*180o

21/39

Oversampling and Noise Shaping Converters

22/39

Quantization Noise Shaping

23/39

Differential Pulse Code Modulation - DPCM

24/39

Delta Modulation – One bit DPCM

The coder is an integrator as

the one in the feedback loop.

25/39

Delta Sequences

26/39

ΔΣ - Encoder

27/39

ΔΣ – Encoder Behavior - Signal Transfer Function

28/39

ΔΣ – Encoder Behavior

Quantization Noise Signal Transfer Function (X=0)

29/39

Quantization Noise Power Density in the Signal Band

30/39

A Second Order ΔΣ Modulator

31/39

Third Order Noise Shaper

32/39

Digital Decimation

33/39

Digital Decimation – ΣΔ to PCM Conversion

34/39

Digital Decimation – ΣΔ to PCM Conversion

35/39

Multi-Rate FIR filters

36/39

Decimation

Low rate sequences are finally stored on CDs

37/39

Interpolation

Interpolation is used to convert the Low rate

sequences stored on the CDs to analog signals

Oversampling is used

38/39

Oversampling in Audio Systems

39/39