37
Slides adapted from ME Angoletta, CERN -0.2 -0.1 0 0.1 0.2 0.3 0 2 4 6 8 10 sampling time, t k [ms] Voltage [V] t s Analog & digital signals Analog & digital signals Continuous function Continuous function V of continuous continuous variable t (time, space etc) : V(t). Analog Discrete function Discrete function V k of discrete discrete sampling variable t k , with k = integer: V k= V(t k ). Digital -0.2 -0.1 0 0.1 0.2 0.3 0 2 4 6 8 10 time [ms] Voltage [V] Uniform (periodic) sampling. Sampling frequency f S = 1/ t S

Analog & digital signal

Embed Size (px)

DESCRIPTION

Great presentation that addresses the issue of digital and analog signals.

Citation preview

Page 1: Analog & digital signal

Slides adapted from ME Angoletta, CERN

-0.2

-0.1

0

0.1

0.2

0.3

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

Volta

ge [V

]

ts

-0.2

-0.1

0

0.1

0.2

0.3

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

Volta

ge [V

]

ts

Analog & digital signalsAnalog & digital signals

Continuous functionContinuous function V of continuouscontinuous variable t (time, space etc) : V(t).

AnalogDiscrete functionDiscrete function Vk of discretediscrete 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 10time [ms]

Volta

ge [V

]

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

Page 2: Analog & digital signal

Slides adapted from ME Angoletta, CERN

Digital vs analog proc’ingDigital vs analog proc’ingDigital Signal Processing (DSPing)

• More flexible.

• Often easier system upgrade.

• Data easily stored.

• Better control over accuracy requirements.

• Reproducibility.

AdvantagesAdvantages

• A/D & signal processors speed: wide-band signals still difficult to treat (real-time systems).

• Finite word-length effect.

• Obsolescence (analog electronics has it, too!).

LimitationsLimitations

Page 3: Analog & digital signal

Slides adapted from ME Angoletta, CERN

Digital system exampleDigital system example

ms

V ANALO

G ANALO

G DOM

AIN

DOM

AIN

ms

V Filter

Antialiasing

k

A DIGITA

L DIGITA

L DOM

AIN

DOM

AIN

A/D

k

A

Digital Processing

ms

V ANALO

G ANALO

G DOM

AIN

DOM

AIN

D/A

ms

V FilterReconstruction

Sometimes steps missing- Filter + A/D

(ex: economics);

- D/A + filter(ex: digital output wanted).

General scheme

Page 4: Analog & digital signal

Slides adapted from ME Angoletta, CERN

Digital system implementationDigital system implementation

• Sampling rate.

• Pass / stop bands.

KEY DECISION POINTS:KEY DECISION POINTS:Analysis bandwidth, Dynamic range

• No. of bits. Parameters.

1

2

3Digital

Processing

A/D

AntialiasingFilter

ANALOG INPUTANALOG INPUT

DIGITAL OUTPUTDIGITAL OUTPUT

• Digital format.What to use for processing? See slide “DSPing aim & tools”

Page 5: Analog & digital signal

Slides adapted from ME Angoletta, CERN

SamplingSamplingHow fast must we sample a continuous signal to preserve its info content?

Ex: train wheels in a movie.

25 frames (=samples) per second.

Frequency misidentification due to low sampling frequency.

Train starts wheels ‘go’ clockwise.

Train accelerates wheels ‘go’ counter-clockwise.

1

Why?Why?

* Sampling: independent variable (ex: time) continuous → discrete.Quantisation: dependent variable (ex: voltage) continuous → discrete.Here we’ll talk about uniform sampling.

**

Page 6: Analog & digital signal

Slides adapted from ME Angoletta, CERN

Sampling - 2Sampling - 2

__ s(t) = sin(2πf0t)

-1.2

-1

-0.8

-0.6

-0.4

-0.2

0

0.2

0.4

0.6

0.8

1

1.2

t

s(t) @ fSf0 = 1 Hz, fS = 3 Hz

-1.2

-1

-0.8

-0.6

-0.4

-0.2

0

0.2

0.4

0.6

0.8

1

1.2

t

__ s1(t) = sin(8πf0t)

-1.2

-1

-0.8

-0.6

-0.4

-0.2

0

0.2

0.4

0.6

0.8

1

1.2

t

__ s2(t) = sin(14πf0t)-1.2

-1

-0.8

-0.6

-0.4

-0.2

0

0.2

0.4

0.6

0.8

1

1.2

t

sk (t) = sin( 2π (f0 + k fS) t ) , ⏐k ⏐∈

s(t) @ fS represents exactly all sine-waves sk(t) defined by:

1

Page 7: Analog & digital signal

Slides adapted from ME Angoletta, CERN

The sampling theoremThe sampling theoremA 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, Kotel’nikov.

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

Page 8: Analog & digital signal

Slides adapted from ME Angoletta, CERN

Frequency domain (hints)Frequency domain (hints)

•• Time & frequencyTime & frequency: two complementary signal descriptions. Signals seen as “projected’ onto time or frequency domains.

1

•• BandwidthBandwidth: indicates rate of change of a signal. High bandwidth signal changes fast.

EarEar + brain act as frequency analyser: audio spectrum split into many narrow bands low-power sounds detected out of loud background.

Example

Page 9: Analog & digital signal

Slides adapted from ME Angoletta, CERN

Sampling low-pass signalsSampling 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 spectrumNo 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 !

Aliasing: signal ambiguity Aliasing: signal ambiguity in frequency domainin frequency domain

Page 10: Analog & digital signal

Slides adapted from ME Angoletta, CERN

Antialiasing filterAntialiasing filter

-B 0 B f

Signal of interest

Out of band noise Out of band

noise

-B 0 B fS/2 f

(a),(b) Out-of-band noise can alias into band of interest. Filter it before!Filter it before!

(a)

(b)

-B 0 B f

Antialiasing filter Passband

frequency

(c)

Passband: depends on bandwidth of interest.

Attenuation AMIN : depends on• ADC resolution ( number of bits N).

AMIN, dB ~ 6.02 N + 1.76• Out-of-band noise magnitude.

Other parameters: ripple, stopbandfrequency...

(c) AntialiasingAntialiasing filterfilter

1

Page 11: Analog & digital signal

Slides adapted from ME Angoletta, CERN

ADC - Number of bits NADC - Number of bits NContinuous input signal digitized into 2N levels.

-4

-3

-2

-1

0

1

2

3

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

000

001

111

010

V

VFSR

Uniform, bipolar transfer function (N=3)Uniform, bipolar transfer function (N=3)

Quantization stepQuantization step q =V FSR

2N

Ex: VFSR = 1V , N = 12 q = 244.1 µV

LSBLSB

Voltage ( = q)

Scale factor (= 1 / 2N )

Percentage (= 100 / 2N )

-1

-0.5

0

0.5

1

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

- q / 2

q / 2

Quantisation errorQuantisation error

2

Page 12: Analog & digital signal

Slides adapted from ME Angoletta, CERN

ADC - Quantisation errorADC - Quantisation error2

• Quantisation Error eq in[-0.5 q, +0.5 q].

• eq limits ability to resolve small signal.

• Higher resolution means lower eq.

-0.2

-0.1

0

0.1

0.2

0.3

0 2 4 6 8 10

time [ms]

Volta

ge [V

]

Page 13: Analog & digital signal

Slides adapted from ME Angoletta, CERN

Frequency analysis: why?Frequency analysis: why?• Fast & efficient insight on signal’s building blocks.

• Simplifies original problem - ex.: solving Part. Diff. Eqns. (PDE).

• Powerful & complementary to time domain analysis techniques.

• The brain does it?

time, t frequency, fF

s(t) S(f) = F[s(t)]

analysisanalysis

synthesissynthesis

s(t), S(f) : Transform Pair

General Transform as General Transform as problemproblem--solving toolsolving tool

Page 14: Analog & digital signal

Slides adapted from ME Angoletta, CERN

Fourier analysis - tools Fourier analysis - tools Input Time Signal Frequency spectrum

∑−

=

−⋅=

1N

0nN

nkπ2jes[n]

N1

kc~

Discrete

DiscreteDFSDFSPeriodic (period T)

ContinuousDTFTAperiodic

DiscreteDFTDFT

nfπ2jen

s[n]S(f) −⋅∞+

−∞== ∑

0

0.5

1

1.5

2

2.5

0 2 4 6 8 10 12time, tk

0

0.5

1

1.5

2

2.5

0 1 2 3 4 5 6 7 8

time, tk

∑−

=

−⋅=

1N

0nN

nkπ2jes[n]

N1

kc~

**

**

Calculated via FFT**

dttfπj2

es(t)S(f)−∞+

∞−⋅= ∫

dtT

0

tωkjes(t)T1

kc ∫ −⋅⋅=Periodic (period T)

Discrete

ContinuousFTFTAperiodic

FSFSContinuous

0

0.5

1

1.5

2

2.5

0 1 2 3 4 5 6 7 8

time, t

0

0.5

1

1.5

2

2.5

0 2 4 6 8 10 12

time, t

Note: j =√-1, ω = 2π/T, s[n]=s(tn), N = No. of samples

Page 15: Analog & digital signal

Slides adapted from ME Angoletta, CERN

A little historyA little historyAstronomic predictions by Babylonians/Egyptians likely via trigonometric sums.

16691669: Newton stumbles upon light spectra (specter = ghost) but fails to recognise “frequency” concept (corpuscularcorpuscular theory of light, & no waves).

1818thth centurycentury: two outstanding problemstwo outstanding problems→ celestial bodies orbits: Lagrange, Euler & Clairaut approximate observation data

with linear combination of periodic functions; Clairaut,1754(!) first DFT formula.

→ vibrating strings: Euler describes vibrating string motion by sinusoids (wave equation).

18071807: Fourier presents his work on heat conduction Fourier presents his work on heat conduction ⇒⇒ Fourier analysis born.Fourier analysis born.→ Diffusion equation ⇔ series (infinite) of sines & cosines. Strong criticism by peers

blocks publication. Work published, 1822 (“Theorie Analytique de la chaleur”).

Page 16: Analog & digital signal

Slides adapted from ME Angoletta, CERN

A little history -2A little history -21919thth / 20/ 20thth centurycentury: two paths for Fourier analysis two paths for Fourier analysis -- Continuous & Discrete.Continuous & Discrete.

CONTINUOUSCONTINUOUS

→ Fourier extends the analysis to arbitrary function (Fourier Transform).

→ Dirichlet, Poisson, Riemann, Lebesgue address FS convergence.

→ Other FT variants born from varied needs (ex.: Short Time FT - speech analysis).

DISCRETE: Fast calculation methods (FFT)DISCRETE: Fast calculation methods (FFT)

→ 18051805 - Gauss, first usage of FFT (manuscript in Latin went unnoticed!!! Published 1866).

→ 19651965 - IBM’s Cooley & Tukey “rediscover” FFT algorithm (“An algorithm for the machine calculation of complex Fourier series”).

→ Other DFT variants for different applications (ex.: Warped DFT - filter design & signal compression).

→ FFT algorithm refined & modified for most computer platforms.

Page 17: Analog & digital signal

Slides adapted from ME Angoletta, CERN

Fourier Series (FS)Fourier Series (FS)

** see next slidesee next slide

A A periodicperiodic function s(t) satisfying function s(t) satisfying DirichletDirichlet’’ss conditions conditions ** can be expressed can be expressed as a Fourier series, with harmonically related sine/cosine termsas a Fourier series, with harmonically related sine/cosine terms..

[ ]∑∞+

=⋅−⋅+=

1kt)ω(ksinkbt)ω(kcoska0as(t)

a0, ak, bk : Fourier coefficients.

k: harmonic number,

T: period, ω = 2π/TFor all t but discontinuitiesFor all t but discontinuities

Note: {cos(kωt), sin(kωt) }kform orthogonal base of function space.

∫⋅=T

0s(t)dt

T1

0a

∫ ⋅⋅=T

0dtt)ωsin(ks(t)

T2

kb-

∫ ⋅⋅=T

0dtt)ωcos(ks(t)

T2

ka

(signal average over a period, i.e. DC term & zero-frequency component.)

analysis

analysis

synthesis

synthesis

Page 18: Analog & digital signal

Slides adapted from ME Angoletta, CERN

FS convergence FS convergence

s(t) piecewise-continuous;

s(t) piecewise-monotonic;

s(t) absolutely integrable , ∞<∫T

0dts(t)

(a)

(b)

(c)

Dirichlet conditions

In any period:

Example: square wave

T

(a)

(b)

T

s(t)

(c)

if s(t) discontinuous then |ak|<M/k for large k (M>0)

Rate of convergenceRate of convergence

Page 19: Analog & digital signal

Slides adapted from ME Angoletta, CERN

FS analysis - 1FS analysis - 1

* Even & Odd functions

Odd :

s(-x) = -s(x)

x

s(x)

s(x)

x

Even :

s(-x) = s(x)

FS of odd* function: square wave.

-1.5

-1

-0.5

0

0.5

1

1.5

0 2 4 6 8 10 t

squa

re s

igna

l, sw

(t)

2 π

0

π1)dt(dt

2π1

0a =⎪⎭

⎪⎬⎫

⎪⎩

⎪⎨⎧

−+⋅= ∫ ∫

0

πdtktcosdtktcos

π1

ka =⎪⎭

⎪⎬⎫

⎪⎩

⎪⎨⎧

−⋅= ∫ ∫

{ }=−⋅⋅

==⎪⎭

⎪⎬⎫

⎪⎩

⎪⎨⎧

−⋅= ∫ ∫ kπcos1πk

2...π

0

πdtktsindtktsin

π1

kb-

⎪⎪⎩

⎪⎪⎨

⎧⋅

=evenk,0

oddk,πk

4

1ω2πT =⇒=

(zero average)(zero average)

(odd function)(odd function)

...t5sinπ5

4t3sinπ3

4tsinπ4sw(t) +⋅⋅

⋅+⋅⋅

⋅+⋅=

Page 20: Analog & digital signal

Slides adapted from ME Angoletta, CERN

[ ]∑=

⋅=7

1ksin(kt)kb-(t)7sw

-1.5

-1

-0.5

0

0.5

1

1.5

0 2 4 6 8 10t

squa

re s

igna

l, sw

(t)

-1.5

-1

-0.5

0

0.5

1

1.5

0 2 4 6 8 10t

squa

re s

igna

l, sw

(t)

[ ]∑=

⋅=5

1ksin(kt)kb-(t)5sw [ ]∑

=⋅=

3

1ksin(kt)kb-(t)3sw

-1.5

-1

-0.5

0

0.5

1

1.5

0 2 4 6 8 10t

squa

re s

igna

l, sw

(t)

[ ]∑=

⋅=1

1ksin(kt)kb-(t)1sw

-1.5

-1

-0.5

0

0.5

1

1.5

0 2 4 6 8 10t

squa

re s

igna

l, sw

(t)

-1.5

-1

-0.5

0

0.5

1

1.5

0 2 4 6 8 10t

squa

re s

igna

l, sw

(t)

[ ]∑=

⋅=9

1ksin(kt)kb-(t)9sw

-1.5

-1

-0.5

0

0.5

1

1.5

0 2 4 6 8 10t

squa

re s

igna

l, sw

(t)

-1.5

-1

-0.5

0

0.5

1

1.5

0 2 4 6 8 10t

squa

re s

igna

l, sw

(t)

[ ]∑=

⋅=11

1ksin(kt)kb-(t)11sw

FS synthesisFS synthesisSquare wave reconstruction Square wave reconstruction

from spectral termsfrom spectral terms

Convergence may be slow (~1/k) - ideally need infinite terms.Practically, series truncated when remainder below computer tolerance(⇒ errorerror). BUTBUT … Gibbs’ Phenomenon.

Page 21: Analog & digital signal

Slides adapted from ME Angoletta, CERN

Gibbs phenomenonGibbs phenomenon

-1.5

-1

-0.5

0

0.5

1

1.5

0 2 4 6 8 10t

squa

re s

igna

l, sw

(t)

[ ]∑=

⋅=79

1kk79 sin(kt)b-(t)sw

Overshoot exist @ Overshoot exist @ each discontinuityeach discontinuity

• Max overshoot pk-to-pk = 8.95% of discontinuity magnitude.Just a minor annoyance.

• FS converges to (-1+1)/2 = 0 @ discontinuities, in this casein this case.

• First observed by Michelson, 1898. Explained by Gibbs.

Page 22: Analog & digital signal

Slides adapted from ME Angoletta, CERN

FS time shifting FS time shifting

-1.5

-1

-0.5

0

0.5

1

1.5

0 2 4 6 8 10 t

squa

re s

igna

l, sw

(t)

2 πFS of even function:FS of even function:ππ/2/2--advanced sadvanced squarequare--wavewave

π

f1 3f1 5f1 7f1 f

f1 3f1 5f1 7f1 f

rk

θk

4/π

4/3π

00a =

0=kb-

⎪⎪⎪

⎪⎪⎪

=⋅

=⋅

=

even.k,0

11...7,3,kodd,k,πk

4

9...5,1,kodd,k,πk

4

ka

(even function)

(zero average)

phase

phase

ampli

tude

ampli

tude

Note: amplitudes unchanged BUTBUTphases advance by k⋅π/2.

Page 23: Analog & digital signal

Slides adapted from ME Angoletta, CERN

Complex FSComplex FS

Complex form of FS (Laplace 1782). Harmonics ck separated by ∆f = 1/T on frequency plot.

a

bθ = arctan(b/a)r = a2 + b2

z = r ejθ

2eecos(t)

jtjt −+=

j2eesin(t)

jtjt

⋅−

=−

Euler’s notation:

e-jt = (ejt)* = cos(t) - j·sin(t) “phasor”

NoteNote: c-k = (ck)*

( ) ( )kbjka21

kbjka21

kc −⋅−−⋅=⋅+⋅=

0a0c =Link to FS real Link to FS real coeffscoeffs..

∑∞

−∞=⋅=

k

tωkjekcs(t)

∫ ⋅⋅=T

0dttωkj-es(t)

T1

kcanalysis

analysis

synthesis

synthesis

Page 24: Analog & digital signal

Slides adapted from ME Angoletta, CERN

FS propertiesFS propertiesTime FrequencyTime Frequency

**

Homogeneity a·s(t) a·S(k)

Additivity s(t) + u(t) S(k)+U(k)

Linearity a·s(t) + b·u(t) a·S(k)+b·U(k)

Time reversal s(-t) S(-k)

Multiplication * s(t)·u(t)

Convolution * S(k)·U(k)

Time shifting

Frequency shifting S(k - m)

∑∞

−∞=−

mm)U(m)S(k

td)tT

0u()ts(t

T1

∫ ⋅−⋅

S(k)e Ttk2πj

⋅⋅

s(t)Ttm2πj

e ⋅+

)ts(t −

Page 25: Analog & digital signal

Slides adapted from ME Angoletta, CERN

FS - “oddities”FS - “oddities”

k = - ∞, … -2,-1,0,1,2, …+ ∞, ωk = kω, φk = ωkt, phasor turns anti-clockwise.

Negative k ⇒ phasor turns clockwise (negative phase φk ), equivalent to negative time t,

⇒ time reversal.

Negative frequencies & time reversal

Fourier components {Fourier components {uukk} form orthonormal base of signal space:} form orthonormal base of signal space:

uk = (1/√T) exp(jkωt) (|k| = 0,1 2, …+∞) Def.: Internal product ⊗:

uk ⊗ um = δk,m (1 if k = m, 0 otherwise). (Remember (ejt)* = e-jt )

Then ck = (1/√T) s(t) ⊗ uk i.e. (1/√T) times projectionprojection of signal s(t) on component uk

Orthonormal base

∫ ⋅=⊗T

o

*mkmk dtuuuu

CarefulCareful: phases important when combining several signals!

Page 26: Analog & digital signal

Slides adapted from ME Angoletta, CERN

0 50 100 150 200

k f

Wk/W0

10-3

10-2

10-1

12

Wk = 2 W0 sync2(k δ)

W0 = (δ sMAX)2

⎪⎭

⎪⎬⎫

⎪⎩

⎪⎨⎧ ∞

=+⋅= ∑

1k 0WkW10WW

FS - power FS - power

•• FS convergence FS convergence ~1/k~1/k

⇒⇒ lower frequency terms

Wk = |ck|2 carry most power.

•• WWkk vs. vs. ωωkk: Power density spectrum: Power density spectrum.

Example

sync(u) = sin(π u)/(π u)

Pulse train, duty cycle Pulse train, duty cycle δδ = 2 = 2 τ τ / T/ T

T

2 τ

t

s(t)

bk = 0 a0 = δ sMAX

ak = 2δsMAX sync(k δ)

Average power WAverage power W : s(t)s(t)T

odt2s(t)

T1W ⊗≡= ∫

∑∑∞

=⎟⎠⎞⎜

⎝⎛ ++=

−∞==

1k

2kb2

ka212

0ak

2kcW

ParsevalParseval’’s Theorems Theorem

Page 27: Analog & digital signal

Slides adapted from ME Angoletta, CERN

FS of main waveformsFS of main waveforms

Page 28: Analog & digital signal

Slides adapted from ME Angoletta, CERN

Discrete Fourier Series (DFS)Discrete Fourier Series (DFS)

N consecutive samples of s[n] N consecutive samples of s[n] completely describe s in time completely describe s in time or frequency domains.or frequency domains.

DFS generate periodic ckwith same signal period

∑−

=⋅=

1N

0kN

nk2πjekcs[n] ~

Synthesis: finite sum ⇐ band-limited s[n]

Band-limited signal s[n], period = N.

mk,δ1N

0nN

-m)n(k2πje

N1

=−

=∑

Kronecker’s delta

Orthogonality in DFS:

synthesis

synthesis

∑−

=

−⋅=

1N

0nN

nk2πjes[n]

N1

kc~

Note:Note: ck+N = ck ⇔ same period N i.e. time periodicity propagates to frequencies!i.e. time periodicity propagates to frequencies!

DFS defined as:DFS defined as:

~~~~

analysis

analysis

Page 29: Analog & digital signal

Slides adapted from ME Angoletta, CERN

DFS analysis DFS analysis DFS of periodic discreteDFS of periodic discrete

11--Volt squareVolt square--wavewave

⎪⎪⎪⎪

⎪⎪⎪⎪

⎟⎠⎞

⎜⎝⎛

⎟⎠⎞

⎜⎝⎛

−−

±+=

=

otherwise,

Nkπsin

NkLπsin

NN

1)(Lkπje

2N,...N,0,k,NL

kc~

0.6

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

1

0 2 4 5 6 7 8 9 10 n

θk

-0.4π

0.2 0.24 0.24

0.6 0.6

0.24

1

0.24

-0.2π

0.4π

0.2π

-0.4π

-0.2π

0.4π

0.2π

0.6 ck ~

ampli

tude

ampli

tude

phase

phase

Discrete signals Discrete signals ⇒⇒ periodic frequency spectra.periodic frequency spectra.Compare to continuous rectangular function (slide # 10, “FS analysis - 1”)

-5 0 1 2 3 4 5 6 7 8 9 10 n 0 L N

s[n] 1

s[n]: period NN, duty factor L/NL/N

Page 30: Analog & digital signal

Slides adapted from ME Angoletta, CERN

DFS propertiesDFS propertiesTime FrequencyTime Frequency

Homogeneity a·s[n] a·S(k)

Additivity s[n] + u[n] S(k)+U(k)

Linearity a·s[n] + b·u[n] a·S(k)+b·U(k)

Multiplication * s[n] ·u[n]

Convolution * S(k)·U(k)

Time shifting s[n - m]

Frequency shifting S(k - h)

∑−

=⋅

1N

0hh)-S(h)U(k

N1

∑−

=−⋅

1N

0mm]u[ns[m]

S(k)e Tmk2πj

⋅⋅

s[n]Tth2πj

e ⋅+

Page 31: Analog & digital signal

Slides adapted from ME Angoletta, CERN

DFT – Window characteristicsDFT – Window characteristics• Finite discrete sequence ⇒⇒ spectrum convoluted with rectangular window spectrum.

• Leakage amount depends on chosen window & on how signal fits into the window.

Resolution: capability to distinguish different tones. Inversely proportional to main-lobe width. Wish: as high as possible.Wish: as high as possible.

(1)

(1)

Several windows used (Several windows used (applicationapplication--dependentdependent): Hamming, ): Hamming, HanningHanning, , Blackman, Kaiser ...Blackman, Kaiser ...

Rectangular window

Peak-sidelobe level: maximum response outside the main lobe. Determines if small signals are hidden by nearby stronger ones.Wish: as low as possible.Wish: as low as possible.

(2)

(2)

Sidelobe roll-off: sidelobe decay per decade. Trade-off with (2).

(3)

(3)

Page 32: Analog & digital signal

Slides adapted from ME Angoletta, CERN

Sampled sequence

In time it reduces end-points discontinuities.

Non windowed

Windowed

DFT of main windowsDFT of main windowsWindowing reduces leakage by minimising sidelobes magnitude.

Some window functions

Page 33: Analog & digital signal

Slides adapted from ME Angoletta, CERN

DFT - Window choiceDFT - Window choice

Window type -3 dB Main-lobe width

[bins]

-6 dB Main-lobe width

[bins]

Max sidelobelevel[dB]

Sidelobe roll-off[dB/decade]

Rectangular 0.89 1.21 -13.2 20

Hamming 1.3 1.81 - 41.9 20

Hanning 1.44 2 - 31.6 60

Blackman 1.68 2.35 -58 60

Common windows characteristics

NB: Strong DC component can shadow nearby small signals. Remove NB: Strong DC component can shadow nearby small signals. Remove it!it!

Far & strong interfering components ⇒⇒ high roll-off rate.Near & strong interfering components ⇒⇒ small max sidelobe level.Accuracy measure of single tone ⇒⇒ wide main-lobe

Observed signalObserved signal Window wish listWindow wish list

Page 34: Analog & digital signal

Slides adapted from ME Angoletta, CERN

DFT - Window loss remedial DFT - Window loss remedial Smooth dataSmooth data--tapering windows cause information loss near edges.tapering windows cause information loss near edges.

• Attenuated inputs get next window’s full gain & leakage reduced.

• Usually 50% or 75% overlap (depends on main lobe width).

Drawback: increased total processing time.

Solution:

sliding (overlapping) DFTs.

2 x N samples (input signal)

DFT #1

DFT #2

DFT #3

DFT AVERAGING

Page 35: Analog & digital signal

Slides adapted from ME Angoletta, CERN

DFT - parabolic interpolationDFT - parabolic interpolation

Parabolic interpolation often enough to find position of peak (i.e. frequency).

Other algorithms available depending on data.

198 199 200 201 202 2031.962

1.963

1.964

1.965

1.966

1.967

1.968

199 200 201 202 203 2040.974

0.975

0.976

0.977

Rectangular window Hanning window

Page 36: Analog & digital signal

Slides adapted from ME Angoletta, CERN

Systems spectral analysis (hints)Systems spectral analysis (hints)

System analysis: measure inputSystem analysis: measure input--output relationshipoutput relationship..

DIGITAL LTI SYSTEM

h[n]

x[n] y[n]

H(fH(f) : LTI transfer function) : LTI transfer function

∑∞

=⋅−=∗=

0mh[m]m]x[nh[n]x[n]y[n]x[n] h[n]

X(f) H(f) Y(f) = X(f) · H(f)

DIGITAL LTI

SYSTEM 0 n

δ[n] 1

0 n

h[n]

h[t] = impulse response

Linear Time InvariantLinear Time Invariant

y[n] predicted from { x[n], h[t] }

Transfer function can be estimated by Y(f) / X(f)

Page 37: Analog & digital signal

Slides adapted from ME Angoletta, CERN

Estimating H(f) (hints)Estimating H(f) (hints)

(f)XX(f)(f)G *xx ⋅= Power Spectral Density of x[t]

(FT of autocorrelation).

(f)XY(f)(f)G *yx ⋅= Cross Power Spectrum of x[t] & y[t]

(FT of cross-correlation).

It is a check on H(f) validity!

xx

yx*

*

GG

(f)XX(f)(f)XY(f)

X(f)Y(f)H(f) =

⋅== Transfer Function

(ex: beam !)