43
1 Sampling Theory & Data Acquisition © 2017 School of Information Technology and Electrical Engineering at The University of Queensland π-day ( http://elec3004.com Lecture Schedule: Week Date Lecture Title 1 28-Feb Introduction 2-Mar Systems Overview 2 7-Mar Systems as Maps & Signals as Vectors 9-Mar Systems: Linear Differential Systems 3 14-Mar Sampling Theory & Data Acquisition 16-Mar Antialiasing Filters 4 21-Mar Discrete System Analysis 23-Mar Convolution Review 5 28-Mar Frequency Response 30-Mar Filter Analysis 5 4-Apr Digital Filters (IIR) 6-Apr Digital Windows 6 11-Apr Digital Filter (FIR) 13-Apr FFT 18-Apr Holiday 20-Apr 25-Apr 7 27-Apr Active Filters & Estimation 8 2-May Introduction to Feedback Control 4-May Servoregulation/PID 10 9-May Introduction to (Digital) Control 11-May Digitial Control 11 16-May Digital Control Design 18-May Stability 12 23-May Digital Control Systems: Shaping the Dynamic Response 25-May Applications in Industry 13 30-May System Identification & Information Theory 1-Jun Summary and Course Review 14 March 2017 - ELEC 3004: Systems 2

Sampling Theory & Data Acquisition

  • Upload
    others

  • View
    9

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Sampling Theory & Data Acquisition

1

Sampling Theory & Data Acquisition

© 2017 School of Information Technology and Electrical Engineering at The University of Queensland

TexPoint fonts used in EMF.

Read the TexPoint manual before you delete this box.: AAAAA

π-day (

http://elec3004.com

Lecture Schedule: Week Date Lecture Title

1 28-Feb Introduction

2-Mar Systems Overview

2 7-Mar Systems as Maps & Signals as Vectors

9-Mar Systems: Linear Differential Systems

3 14-Mar Sampling Theory & Data Acquisition 16-Mar Antialiasing Filters

4 21-Mar Discrete System Analysis

23-Mar Convolution Review

5 28-Mar Frequency Response

30-Mar Filter Analysis

5 4-Apr Digital Filters (IIR)

6-Apr Digital Windows

6 11-Apr Digital Filter (FIR)

13-Apr FFT

18-Apr

Holiday 20-Apr

25-Apr

7 27-Apr Active Filters & Estimation

8 2-May Introduction to Feedback Control

4-May Servoregulation/PID

10 9-May Introduction to (Digital) Control

11-May Digitial Control

11 16-May Digital Control Design

18-May Stability

12 23-May Digital Control Systems: Shaping the Dynamic Response

25-May Applications in Industry

13 30-May System Identification & Information Theory

1-Jun Summary and Course Review

14 March 2017 - ELEC 3004: Systems 2

Page 2: Sampling Theory & Data Acquisition

2

Follow Along Reading:

B. P. Lathi

Signal processing

and linear systems

1998

TK5102.9.L38 1998

• Chapter 5:

Sampling

– § 5.1 The Sampling Theorem

– § 5.2 Numerical Computation of

Fourier Transform: The Discrete

Fourier Transform (DFT)

Also:

– § 4.6 Signal Energy

14 March 2017 - ELEC 3004: Systems 3

Linear Differential Systems (Recap)

14 March 2017 - ELEC 3004: Systems 4

Page 3: Sampling Theory & Data Acquisition

3

Equivalence Across Domains

Source: Dorf & Bishop, Modern Control Systems, 12th Ed., p. 73

14 March 2017 - ELEC 3004: Systems 5

Source: Dorf & Bishop, Modern Control Systems, 12th Ed., p. 74

14 March 2017 - ELEC 3004: Systems 6

Page 4: Sampling Theory & Data Acquisition

4

Example: Quarter-Car Model

14 March 2017 - ELEC 3004: Systems 7

Example: Quarter-Car Model (2)

14 March 2017 - ELEC 3004: Systems 8

Page 5: Sampling Theory & Data Acquisition

5

Materials, parts, labour, etc. (inputs) are combined to make a

number of products (outputs):

• 𝑥𝑗: price per unit of production input 𝑗

• 𝑎𝑖𝑗: input 𝑗 required to manufacture one unit of product 𝑖

• 𝑦𝑖: production cost per unit of product 𝑖

• For 𝑦 = 𝐴𝑥:

o 𝑖𝑡ℎ row of 𝐴 is bill of materials for unit of product 𝑖

• Production inputs needed: – 𝑞𝑖 is quantity of product 𝑖 to be produced

– 𝑟𝑗 is total quantity of production input 𝑗 needed

∴ 𝑟 = 𝐴𝑇𝑞

& Total production cost is:

𝑟𝑇𝑥 = 𝐴𝑇𝑞 𝑇𝑥 = 𝑞𝑇𝐴𝑥

Economics: Cost of Production

Source: Boyd, EE263, Slide 2-18

14 March 2017 - ELEC 3004: Systems 9

𝑦 = 𝐴𝑥

• 𝑦𝑖 is 𝑖𝑡ℎ measurement or sensor reading (which we have)

• 𝑥𝑗 is 𝑗𝑡ℎ parameter to be estimated or determined

• 𝑎𝑖𝑗 is sensitivity of 𝑖𝑡ℎ sensor to 𝑗𝑡ℎ parameter

• sample problems: o find 𝑥, given 𝑦

o find all x’s that result in y (i.e., all x’s consistent with measurements)

o if there is no x such that 𝑦 = 𝐴𝑥, find 𝑥 s.t. 𝑦 ≈ 𝐴𝑥 (i.e., if the sensor readings are inconsistent, find x which is almost consistent)

Estimation (or inversion)

Source: Boyd, EE263, Slide 2-26

14 March 2017 - ELEC 3004: Systems 10

Page 6: Sampling Theory & Data Acquisition

6

Signals & Systems

14 March 2017 - ELEC 3004: Systems 11

Signal: A carrier of (desired) information [1]

• Need NOT be electrical: • Thermometer

• Clock hands

• Automobile speedometer

• Need NOT always being given

– “Abnormal” sounds/operations

– Ex: “pitch” or “engine hum” during machining as an

indicator for feeds and speeds

14 March 2017 - ELEC 3004: Systems 12

Page 7: Sampling Theory & Data Acquisition

7

Signal: A carrier of (desired) information [2]

• Electrical signals

– Voltage

– Current

• Digital signals

– Convert analog electrical signals to an appropriate

digital electrical message

– Processing by a microcontroller or microprocessor

14 March 2017 - ELEC 3004: Systems 13

Transduction (sensor to an electrical signal) • Sensor reacts to environment (physics)

• Turn this into an electrical signal: – V: voltage source

– I: current source

• Measure this signal

– Resistance

– Capacitance

– Inductance

Happy π-day - ELEC 3004: Systems 14

Page 8: Sampling Theory & Data Acquisition

8

• Representation of a signal against a discrete set

• The set is fixed in by computing hardware

• Can be scaled or normalized … but is limited

• Time is also discretized

Digital Signal

14 March 2017 - ELEC 3004: Systems 15

Analog vs Digital

• Analog Signal: An analog or analogue signal is any

variable signal continuous in both time and

amplitude

• Digital Signal: A digital signal is a signal that is both

discrete and quantized

E.g. Music stored in a

CD: 44,100 Samples

per second and 16 bits

to represent amplitude

14 March 2017 - ELEC 3004: Systems 16

Page 9: Sampling Theory & Data Acquisition

9

• Continuous:

:

Digital Systems

14 March 2017 - ELEC 3004: Systems 17

Digital Systems ∵ Better SNR

• We trade-off “certainty in time” for “signal noise/uncertainty”

• Analog: ∞ time resolution

– Digital has fixed time steps

• This avoids the noise and uncertainty in component values that affect analogue signal processing.

Better Processing

• Digital microprocessors are in a range of objects, from obvious (e.g. phone) to disposable (e.g. Go cards). (what doesn’t have one?)

Compared to antilog computing (op-amp):

• Accuracy: digital signals are usually represented using 12 bits or more.

• Reliability: The ALU is stable over time.

• Flexibility: limited only programming ability!

• Cost: advances in technology make microcontrollers economical even for small, low cost applications. (Raspberry Pi 3: US$35)

14 March 2017 - ELEC 3004: Systems 18

Page 10: Sampling Theory & Data Acquisition

10

Signals & Systems

WHY?

14 March 2017 - ELEC 3004: Systems 19

14 March 2017 - ELEC 3004: Systems 20

Page 11: Sampling Theory & Data Acquisition

11

BUT there is Noise …

Note: this picture illustrates the concepts but it is not quantitatively precise

Source: Prof. M. Siegel, CMU 14 March 2017 - ELEC 3004: Systems 21

• Cross-coupled measurements

• Cross-talk (at a restaurant or even a lecture)

• A bright sunny day obstructing picture subject

• Strong radio station near weak one

• observation-to-observation variation – Measurement fluctuates (ex: student)

– Instrument fluctuates (ex: quiz !)

• Unanticipated effects / variation (Temperature)

• One man’s noise might be another man’s signal

Noise: “Unwanted” Signals Carrying Errant Information

14 March 2017 - ELEC 3004: Systems 23

Page 12: Sampling Theory & Data Acquisition

12

Noise: Fundamental Natural Sources • Voltage (EMF) – Capacitive & Inductive Pickup

• Johnson Noise – thermal / Brownian

• 1/f (Hooge Noise)

• Shot noise (interval-to-interval statistical count)

14 March 2017 - ELEC 3004: Systems 24

SNR : Signal to Noise Ratio

14 March 2017 - ELEC 3004: Systems 25

Page 13: Sampling Theory & Data Acquisition

13

BREAK

14 March 2017 - ELEC 3004: Systems 26

14 March 2017 - ELEC 3004: Systems 27

Page 14: Sampling Theory & Data Acquisition

14

Not this type of sampling …

14 March 2017 - ELEC 3004: Systems 28

This type of sampling…

Source: Wikipedia: http://en.wikipedia.org/wiki/File:Signal_Sampling.png

14 March 2017 - ELEC 3004: Systems 29

Page 15: Sampling Theory & Data Acquisition

15

• The Nyquist criterion states:

To prevent aliasing, a bandlimited signal of bandwidth wB

rad/s must be sampled at a rate greater than 2wB rad/s

ws > 2wB

Sampling Theorem

Note: this is a > sign not a

Also note: Most real world signals require band-limiting

with a lowpass (anti-aliasing) filter

14 March 2017 - ELEC 3004: Systems 30

Mathematics of Sampling and Reconstruction

DSP Ideal

LPF

x(t) xc(t) y(t)

Impulse train

T(t)= (t - nt)

… … t

Sampling frequency fs = 1/t

Gain

fc Freq

1

0

Cut-off frequency = fc

reconstruction sampling

14 March 2017 - ELEC 3004: Systems 31

Page 16: Sampling Theory & Data Acquisition

16

• x(t) multiplied by impulse train T(t)

Mathematical Model of Sampling

• xc(t) is a train of impulses of height x(t)|t=nt

n

Tc

tnttnx

ttttttx

ttxtx

)()(

)2()()()(

)()()(

14 March 2017 - ELEC 3004: Systems 32

-10 -8 -6 -4 -2 0 2 4 6 8 10 -2

-1

0

1

2

t

x(t

)

Continuous-time

-10 -8 -6 -4 -2 0 2 4 6 8 10 -2

-1

0

1

2

t

xc(t

)

Discrete-time

14 March 2017 - ELEC 3004: Systems 33

Page 17: Sampling Theory & Data Acquisition

17

• Image a signal…

Discrete Time Signal

-8 -6 -4 -2 0 2 4 6 8-1

-0.5

0

0.5

1

time (s)

Am

plit

ud

e

Signal

Digitized Signal

14 March 2017 - ELEC 3004: Systems 34

• Digitization helps beat the Noise!

Discrete Time Signals

-8 -6 -4 -2 0 2 4 6 8-1.5

-1

-0.5

0

0.5

1

1.5

time (s)

Am

plit

ud

e

Signal + 5% Gausian Noise

Digitized Noisy Signal

14 March 2017 - ELEC 3004: Systems 35

Page 18: Sampling Theory & Data Acquisition

18

• But only so much…

Discrete Time Signals

-8 -6 -4 -2 0 2 4 6 8-1.5

-1

-0.5

0

0.5

1

1.5

time (s)

Am

plit

ud

e

Signal + 20% Gausian Noise

Digitized Noisy Signal

14 March 2017 - ELEC 3004: Systems 36

• Shifting

• Reversal

• Time Scaling (Down Sampling)

(Up Sampling)

Signal Manipulations

14 March 2017 - ELEC 3004: Systems 37

Page 19: Sampling Theory & Data Acquisition

19

• Can make control tricky!

Discrete Time Signals

14 March 2017 - ELEC 3004: Systems 38

• Can make control tricky!

Discrete Time Signals

14 March 2017 - ELEC 3004: Systems 39

Page 20: Sampling Theory & Data Acquisition

20

Nyquist Sampling Theorem and Aliasing

14 March 2017 - ELEC 3004: Systems 40

• The Nyquist criterion states:

To prevent aliasing, a bandlimited signal of bandwidth wB

rad/s must be sampled at a rate greater than 2wB rad/s

–ws > 2wB

Sampling Theorem

Note: this is a > sign not a

Also note: Most real world signals require band-limiting

with a lowpass (anti-aliasing) filter

14 March 2017 - ELEC 3004: Systems 41

Page 21: Sampling Theory & Data Acquisition

21

• Frequency domain analysis of sampling is very useful to understand – sampling (X(w)* (w - 2n/t) )

– reconstruction (lowpass filter removes replicas)

– aliasing (if ws 2wB)

• Time domain analysis can also illustrate the concepts – sampling a sinewave of increasing frequency

– sampling images of a rotating wheel

Time Domain Analysis of Sampling

14 March 2017 - ELEC 3004: Systems 42

Original signal

Discrete-time samples

Reconstructed signal

A signal of the original frequency is reconstructed 14 March 2017 - ELEC 3004: Systems 43

Page 22: Sampling Theory & Data Acquisition

22

Original signal

Discrete-time samples

Reconstructed signal

A signal with a reduced frequency is recovered, i.e., the signal is

aliased to a lower frequency (we recover a replica) 14 March 2017 - ELEC 3004: Systems 44

Sampling < Nyquist Aliasing

0 5 10 15-1.5

-1

-0.5

0

0.5

1

1.5

time

sig

na

l

True signal

Aliased (under sampled) signal

14 March 2017 - ELEC 3004: Systems 45

Page 23: Sampling Theory & Data Acquisition

23

Nyquist is not enough …

0 1 2 3 4 5 6 7-1

-0.8

-0.6

-0.4

-0.2

0

0.2

0.4

0.6

0.8

11Hz Sin Wave: Sin(2t) 2 Hz Sampling

Time(s)

Norm

aliz

ed

mag

nitu

de

14 March 2017 - ELEC 3004: Systems 46

A little more than Nyquist is not enough …

0 1 2 3 4 5 6 7-1

-0.8

-0.6

-0.4

-0.2

0

0.2

0.4

0.6

0.8

11Hz Sin Wave: Sin(2t) 4 Hz Sampling

Time(s)

Norm

aliz

ed

mag

nitu

de

14 March 2017 - ELEC 3004: Systems 47

Page 24: Sampling Theory & Data Acquisition

24

• Consider the case where the DSP performs no filtering

operations – i.e., only passes xc(t) to the reconstruction filter

• To understand we need to look at the frequency domain

• Sampling: we know – multiplication in time convolution in frequency

– F{x(t)} = X(w)

– F{T(t)} = (w - 2n/t),

– i.e., an impulse train in the frequency domain

Frequency Domain Analysis of Sampling

14 March 2017 - ELEC 3004: Systems 48

• In the frequency domain we have

Frequency Domain Analysis of Sampling

n

n

c

t

nwX

t

t

nw

twXwX

21

22*)(

2

1)(

Let’s look at an example where X(w) is triangular function

with maximum frequency wm rad/s

being sampled by an impulse train, of frequency ws rad/s

Remember

convolution with

an impulse?

Same idea for an

impulse train

14 March 2017 - ELEC 3004: Systems 49

Page 25: Sampling Theory & Data Acquisition

25

• In this example it was possible to recover the original signal

from the discrete-time samples

• But is this always the case?

• Consider an example where the sampling frequency ws is

reduced – i.e., t is increased

Sampling Frequency

14 March 2017 - ELEC 3004: Systems 50

Fourier transform of original signal X(ω) (signal spectrum)

w

… …

Fourier transform of impulse train T(/2) (sampling signal)

0 ws = 2/t 4/t

Original spectrum

convolved with

spectrum of

impulse train …

Fourier transform of sampled signal

w

Original Replica 1 Replica 2

1/t

14 March 2017 - ELEC 3004: Systems 51

Page 26: Sampling Theory & Data Acquisition

26

Spectrum of sampled signal

Spectrum of reconstructed signal

w -wm wm

Reconstruction filter

removes the replica

spectrums & leaves

only the original

Reconstruction filter (ideal lowpass filter)

w -wc wc = wm

t

w

Original Replica 1 Replica 2

1/t

14 March 2017 - ELEC 3004: Systems 52

Sampled Spectrum ws > 2wm

w -wm wm ws

orignal replica 1 …

LPF

original freq recovered

Sampled Spectrum ws < 2wm

w -wm wmws

orignal …

replica 1

LPF

Original and replica spectrums overlap

Lower frequency

recovered (ws – wm)

14 March 2017 - ELEC 3004: Systems 53

Page 27: Sampling Theory & Data Acquisition

27

14 March 2017 - ELEC 3004: Systems 54

Reconstruction

14 March 2017 - ELEC 3004: Systems 55

Page 28: Sampling Theory & Data Acquisition

28

• Signal is bandlimited to bandwidth WB – Problem: real signals are not bandlimited

• Therefore, require (non-ideal) anti-aliasing filter

• Signal multiplied by ideal impulse train – problems: sample pulses have finite width

– and not in practice, but sample & hold circuit

• Samples discrete-time, continuous valued – Problem: require discrete values for DSP

• Therefore, require A/D converter (quantisation)

• Ideal lowpass reconstruction (‘sinc’ interpolation) – problems: ideal lowpass filter not available

• Therefore, use D/A converter and practical lowpass filter

Sampling and Reconstruction Theory and Practice

14 March 2017 - ELEC 3004: Systems 56

• Frequency domain: multiply by ideal LPF – ideal LPF: ‘rect’ function (gain t, cut off wc) – removes replica spectrums, leaves original

• Time domain: this is equivalent to – convolution with ‘sinc’ function – as F

-1{t rect(w/wc)} = t wc sinc(wct/)

– i.e., weighted sinc on every sample

• Normally, wc = ws/2

Time Domain Analysis of Reconstruction

n

ccr

tntwtwtnxtx

)(sinc)()(

14 March 2017 - ELEC 3004: Systems 57

Page 29: Sampling Theory & Data Acquisition

29

• Whittaker–Shannon interpolation formula

Reconstruction

14 March 2017 - ELEC 3004: Systems 58

Zero Order Hold (ZOH)

ZOH impulse response

ZOH amplitude response

ZOH phase response

14 March 2017 - ELEC 3004: Systems 59

Page 30: Sampling Theory & Data Acquisition

30

• Zero-Order Hold [ZOH]

Reconstruction

14 March 2017 - ELEC 3004: Systems 60

• Whittaker–Shannon interpolation formula

Reconstruction

14 March 2017 - ELEC 3004: Systems 61

Page 31: Sampling Theory & Data Acquisition

31

Ideal 𝑠𝑖𝑛𝑐 Interpolation of sample values [0 0 0.75 1 0.5 0 0]

-4 -3 -2 -1 0 1 2 3 4

-0.2

0

0.2

0.4

0.6

0.8

1

Sample

Valu

e

reconstructed signal xr(t)

14 March 2017 - ELEC 3004: Systems 62

‘staircase’ output from D/A converter (ZOH)

0 1 2 3 4 5 6 7 8 9 10 0

2

4

6

8

10

12

14

16

Time (sec)

Am

plit

ud

e (

V)

output samples

D/A output

14 March 2017 - ELEC 3004: Systems 63

Page 32: Sampling Theory & Data Acquisition

32

Smooth output from reconstruction filter

0 2 4 6 8 10 12 2

4

6

8

10

12

14

16

Time (sec)

Am

plit

ud

e (

V)

D/A output

Reconstruction filter output

14 March 2017 - ELEC 3004: Systems 64

Example: error due to signal quantisation

0 1 2 3 4 5 6 7 8 9 10 0

2

4

6

8

10

12

14

16

Sample number

Am

plit

ud

e (

V)

original signal x(t) quantised samples xq(t)

14 March 2017 - ELEC 3004: Systems 65

Page 33: Sampling Theory & Data Acquisition

33

• Impulse train sampling not realisable – sample pulses have finite width (say nanosecs)

• This produces two effects,

• Impulse train has sinc envelope in frequency domain – impulse train is square wave with small duty cycle

– Reduces amplitude of replica spectrums • smaller replicas to remove with reconstruction filter

• Averaging of signal during sample time – effective low pass filter of original signal

• can reduce aliasing, but can reduce fidelity

• negligible with most S/H

Finite Width Sampling

14 March 2017 - ELEC 3004: Systems 67

• Sample and Hold (S/H) 1. takes a sample every t seconds 2. holds that value constant until next sample

• Produces ‘staircase’ waveform, x(nt)

Practical Sampling

t

x(t)

hold for t

sample instant

x(nt)

14 March 2017 - ELEC 3004: Systems 68

Page 34: Sampling Theory & Data Acquisition

34

Two stage process:

1. Digital to analogue converter (D/A) – zero order hold filter – produces ‘staircase’ analogue output

2. Reconstruction filter – non-ideal filter: wc = ws /2 – further reduces replica spectrums – usually 4th – 6th order e.g., Butterworth

• for acceptable phase response

Practical Reconstruction

14 March 2017 - ELEC 3004: Systems 69

• Analogue output y(t) is – convolution of output samples y(nt) with hZOH(t)

D/A Converter

2/

)2/sin(

2exp)(

otherwise,0

0,1)(

)()()(

tw

twtjwtwH

ttth

tnthtnyty

ZOH

ZOH

ZOH

n

D/A is lowpass filter with sinc type frequency response

It does not completely remove the replica spectrums

Therefore, additional reconstruction filter required

14 March 2017 - ELEC 3004: Systems 70

Page 35: Sampling Theory & Data Acquisition

35

Data Acquisition (A/D Conversion)

14 March 2017 - ELEC 3004: Systems 71

Representation of Signal

• Time Discretization • Digitization

0 5 10 150

100

200

300

400

500

600

time (s)

Ex

pec

ted

sig

nal (m

V)

Coarse time discretization

True signal

Discrete time sampled points

0 5 10 150

100

200

300

400

500

600

time (s)

Ex

pec

ted

sig

nal

(mV

)

Coarse signal digitization

True signal

Digitization

14 March 2017 - ELEC 3004: Systems 72

Page 36: Sampling Theory & Data Acquisition

36

• Analogue to digital converter (A/D) – Calculates nearest binary number to x(nt)

• xq[n] = q(x(nt)), where q() is non-linear rounding fctn

– output modeled as xq[n] = x(nt) + e[n]

• Approximation process – therefore, loss of information (unrecoverable) – known as ‘quantisation noise’ (e[n]) – error reduced as number of bits in A/D increased

• i.e., x, quantisation step size reduces

Quantisation

2][

xne

14 March 2017 - ELEC 3004: Systems 73

Input-output for 4-bit quantiser (two’s compliment)

Analogue

Digital

7 0111

6 0110

5 0101

4 0100

3 0011

2 0010

1 0001

0 0000

-1 1111

-2 1110

-3 1101

-4 1100

-5 1011

-6 1010

-7 1000

x

quantisation

step size

12

2

m

Ax

where A = max amplitude

m = no. quantisation bits

14 March 2017 - ELEC 3004: Systems 74

Page 37: Sampling Theory & Data Acquisition

37

• To estimate SQNR we assume – e[n] is uncorrelated to signal and is a

– uniform random process

• assumptions not always correct! – not the only assumptions we could make…

• Also known a ‘Dynamic range’ (RD) – expressed in decibels (dB)

– ratio of power of largest signal to smallest (noise)

Signal to Quantisation Noise

noise

signal

DP

PR 10log10

14 March 2017 - ELEC 3004: Systems 75

Need to estimate:

1. Noise power – uniform random process: Pnoise = x2/12

2. Signal power – (at least) two possible assumptions 1. sinusoidal: Psignal = A2/2 2. zero mean Gaussian process: Psignal = 2

• Note: as A/3: Psignal A2/9

• where 2 = variance, A = signal amplitude

Dynamic Range

Regardless of assumptions: RD increases by 6dB

for every bit that is added to the quantiser

1 extra bit halves x

i.e., 20log10(1/2) = 6dB

14 March 2017 - ELEC 3004: Systems 76

Page 38: Sampling Theory & Data Acquisition

38

-6 -4 -2 0 2 4 6

-1

-0.5

0

0.5

1

t

sin(10 t) + 0.1 sin(100 t)

-6 -4 -2 0 2 4 6

-1

-0.5

0

0.5

1

t

sin(10 t) + 0.1 sin(100 t)

Derivatives magnify noise!

-6 -4 -2 0 2 4 6

-20

-15

-10

-5

0

5

10

15

20

t

10 cos(10 t) + 10 cos(100 t)-6 -4 -2 0 2 4 6

-10

-5

0

5

10

t

10 cos(10 t)

14 March 2017 - ELEC 3004: Systems 77

• Theoretical model of Sampling – bandlimited signal (wB)

– multiplication by ideal impulse train (ws > 2wB) • convolution of frequency spectrums (creates replicas)

– Ideal lowpass filter to remove replica spectrums • wc = ws /2

• Sinc interpolation

• Practical systems – Anti-aliasing filter (wc < ws /2)

– A/D (S/H and quantisation)

– D/A (ZOH)

– Reconstruction filter (wc = ws /2)

Summary

Don’t confuse

theory and

practice!

14 March 2017 - ELEC 3004: Systems 78

Page 39: Sampling Theory & Data Acquisition

39

• Aliasing and Anti-Aliasing

• Review: – Chapter 5 of Lathi

• A signal has many signals

[Unless it’s bandlimited]

Next Time…

14 March 2017 - ELEC 3004: Systems 79

• Aliasing - through sampling, two entirely different analog

sinusoids take on the same “discrete time” identity

For f[k]=cosΩk, Ω=ωT:

The period has to be less than Fh (highest frequency):

Thus:

ωf: aliased frequency:

Alliasing

14 March 2017 - ELEC 3004: Systems 80

Page 40: Sampling Theory & Data Acquisition

40

Aliasing: Another view of this

14 March 2017 - ELEC 3004: Systems 81

• Non-ideal filter – wc = ws /2

• Filter usually 4th – 6th order (e.g., Butterworth) – so frequencies > wc may still be present

– not higher order as phase response gets worse

• Luckily, most real signals – are lowpass in nature

• signal power reduces with increasing frequency

– e.g., speech naturally bandlimited (say < 8KHz)

– Natural signals have a (approx) 1/f spectrum

– so, in practice aliasing is not (usually) a problem

Practical Anti-aliasing Filter

14 March 2017 - ELEC 3004: Systems 82

Page 41: Sampling Theory & Data Acquisition

41

Amplitude spectrum of original signal

w -wm wm

Fourier transform of sampled signal

w

Original Replica 1 Replica 2

1/t

w

… …

Fourier transform of sampling signal (pulses have finite width)

0 ws = 2/t 4/t

sinc envelope

Zero at harmonic

1/duty cycle

14 March 2017 - ELEC 3004: Systems 83

Fourier transform of original signal X(ω) (signal spectrum) [AGAIN!]

w

… …

Fourier transform of impulse train T(/2) (sampling signal)

0 ws = 2/t 4/t

Original spectrum

convolved with

spectrum of

impulse train …

Fourier transform of sampled signal

w

Original Replica 1 Replica 2

1/t

14 March 2017 - ELEC 3004: Systems 84

Page 42: Sampling Theory & Data Acquisition

42

Original Spectrum

w -wm wm

Replica spectrums

overlap with original

(and each other)

This is Aliasing

w

… …

Fourier transform of impulse train (sampling signal)

0 2/t 4/t 6/t

Amplitude spectrum of sampled signal

w

Original Replica 1 Replica 2 … 14 March 2017 - ELEC 3004: Systems 85

Amplitude spectrum of sampled signal

Due to overlapping

replicas (aliasing)

the reconstruction

filter cannot recover

the original spectrum

Reconstruction filter (ideal lowpass filter)

w -wc wc = wm

Spectrum of reconstructed signal

w -wm wm

w

Original Replica 1 Replica 2 …

sampled signal

spectrum

The effect of aliasing is

that higher frequencies

of “alias to” (appear as)

lower frequencies 14 March 2017 - ELEC 3004: Systems 86

Page 43: Sampling Theory & Data Acquisition

43

Rotating wheel and peg

Top

View

Front

View

Need both top and front

view to determine rotation

Another way to see Aliasing Too!

14 March 2017 - ELEC 3004: Systems 87

Temporal Aliasing

90o clockwise rotation/frame

clockwise rotation perceived

270o clockwise rotation/frame

(90o) anticlockwise rotation

perceived i.e., aliasing

Require LPF to ‘blur’ motion

14 March 2017 - ELEC 3004: Systems 88