introduction to signal processing - disalw3.epfl.ch

1

Upload: others

Post on 17-Mar-2022

3 views

Category:

Documents


0 download

TRANSCRIPT

1

Signals, Instruments, and Systems – W4

Introduction to Signal Processing – System

Properties, Responses, Functions, More Transforms,

and Filters

2

Outline

• System properties• More transforms • Frequency responses and transfer functions• Motivating examples for filters• Filter terminology and basic examples• Examples of simple analog filters• Bode plots

3

Acknowledgment for Selected Slides

4

System Properties

5

System Properties

Continuous-Time System

x(t) y(t)

x[n] y[n]Discrete-Time System

• Knowing what system properties are fulfilled helps the analysis of the system and has practical implications

• Three key properties: causality, time-invariance, and linearity

6From Prof. A. S. Willsky, Signals and Systems course

Causality

7

Causality

From Prof. A. S. Willsky, Signals and Systems course

8

Time-Invariance

From Prof. A. S. Willsky, Signals and Systems course

9

Linearity

From Prof. A. S. Willsky, Signals and Systems course

10

Additional Definitions

• LTI: Linear Time-Invariant systems• SISO: Single-Input Single-Output system• MIMO: Multi-Input Multi-Output system

In this course, we will consider only SISO filters in an operational regime respecting the LTI properties

11

More Transforms

1255

Motivation for More Transforms

From Prof. A. S. Willsky, Signals and Systems course

Note: compare with W2, s.21

13

Laplace Transform

𝐹𝐹 𝑠𝑠 = ℒ 𝑓𝑓(𝑡𝑡) = �−∞

𝑒𝑒−𝑠𝑠𝑠𝑠𝑓𝑓 𝑡𝑡 𝑑𝑑𝑡𝑡

𝑠𝑠 = 𝜎𝜎 + 𝑖𝑖𝑖𝑖

Note: the standard Laplace transform is involving an integral between 0 and ∞; the bounds - ∞ to ∞ are used for the bilateral Laplace transform which is what we will use in this course (calling by simplicity Laplace transform)

14

Fourier - Laplace

dttfesF

tftfFF

tiis

is

)(|)(

|)}({)}({)(

∫∞

∞−

−=

=

==

==

ωω

ωω L

The Fourier Transform is therefore a special case of the Laplace Transform

Fourier: frequency response (in stationary conditions, especially in signal processing)Laplace: impulse response (also in transient conditions, especially in control)

Note: non-unitary, angular frequency, see W2, s. 23

15

Discrete-Time Fourier Transform

• Corresponds to the Fourier Transform for discrete-time signals (different from the Discrete Fourier Transform, a finite, bounded approximation of the Fourier Transform for digital devices)

• Transform discrete-time signals from time-domain to frequency domain (continuous spectrum)

∑∞

−∞=

−⋅=n

nienx ωω ][)X(Note: compare with DFT notation on W2, s. 38:

X[k] = �𝑛𝑛=0

𝑁𝑁−1

x[𝑛𝑛] ⋅ 𝑒𝑒−2𝜋𝜋𝜋𝜋𝑁𝑁 𝑘𝑘𝑛𝑛

𝑘𝑘 = 0,⋯ ,𝑁𝑁 − 1

16

Z-Transform• Corresponds to Laplace transform for time-discrete

signals• Transform signals from time-domain to frequency

domain• The Discrete-Time Fourier Transform is a special case

of the Z-Transform with 𝑧𝑧 = 𝑒𝑒𝒊𝒊ω (see s. 15)

𝑋𝑋(𝑧𝑧) = Z{𝑥𝑥[𝑛𝑛]} = �𝑛𝑛=−∞

𝑥𝑥[𝑛𝑛]𝑧𝑧−𝑛𝑛

𝑧𝑧 = 𝐴𝐴𝑒𝑒𝒊𝒊𝜙𝜙 or 𝑧𝑧 = 𝐴𝐴(cos𝜙𝜙 + 𝒊𝒊 sin𝜙𝜙)

17

Transform Overview

Digital signalTime domain

Digital signalFrequency domain

Analog signalFrequency domain

Analog signalTime domain

Fourier/Laplace

Inverse Fourier/Laplace

DTFT/Z

Inverse DTFT/Z

DA

C

AD

C Note: Both frequency domains are continuous (spectrum)

18

Frequency Responses and Transfer Functions

19

Frequency Response

ℎ(𝑡𝑡) (ℎ ∗ 𝑓𝑓)(𝑡𝑡)𝑓𝑓(𝑡𝑡)

Time domain

𝐻𝐻(𝑖𝑖) 𝐻𝐻 𝑖𝑖 𝐹𝐹(𝑖𝑖)𝐹𝐹(𝑖𝑖)

Frequency domain

Reminder: a convolution in the time domain is a multiplication in the frequency domain

h(t) : impulse responseH(ω) : frequency response (stationary regime) of the filter/system, i.e Fourier transform of h(t)

Note: impulse response = response to an impulse𝑓𝑓 𝑡𝑡 = 𝛿𝛿(t)ℎ ∗ 𝑓𝑓 𝑡𝑡 = ℎ 𝑡𝑡

see s. 45, W2

20

Frequency Response

ℎ(𝑡𝑡)𝑒𝑒𝜋𝜋𝜔𝜔0𝑠𝑠

𝐻𝐻(𝑖𝑖) 𝐻𝐻 𝑖𝑖 2𝜋𝜋𝛿𝛿 𝑖𝑖 − 𝑖𝑖0 =𝐻𝐻(𝑖𝑖0)2𝜋𝜋𝛿𝛿 𝑖𝑖 − 𝑖𝑖0

2𝜋𝜋𝛿𝛿 𝑖𝑖 − 𝑖𝑖0

A single frequency comes out of a LTI filter multiplied with the value of the filter at that frequency.

𝐻𝐻(𝑖𝑖0)𝑒𝑒𝜋𝜋𝜔𝜔0𝑠𝑠

Note: see alsos. 12, W3

21

Frequency Response

ℎ(𝑡𝑡)𝑥𝑥 𝑡𝑡 = �𝑘𝑘=−∞

𝑎𝑎𝑘𝑘𝑒𝑒𝜋𝜋𝑘𝑘𝜔𝜔0𝑠𝑠 𝑦𝑦 𝑡𝑡 = �𝑘𝑘=−∞

𝐻𝐻(𝑘𝑘𝑖𝑖0)𝑎𝑎𝑘𝑘𝑒𝑒𝜋𝜋𝑘𝑘𝜔𝜔0𝑠𝑠

𝑎𝑎𝑘𝑘 → 𝐻𝐻(𝑘𝑘𝑖𝑖0)𝑎𝑎𝑘𝑘

Gain

𝐻𝐻 𝑘𝑘𝑖𝑖0 = 𝐻𝐻(𝑘𝑘𝑖𝑖0) 𝑒𝑒𝜋𝜋∡𝐻𝐻(𝑘𝑘𝜔𝜔0)

Amplitude

Phase

By linearity a sum of frequencies go out of the LTI filteronly with different amplitude and phase.

Continuous time

22

Frequency Response

ℎ[𝑛𝑛]𝑥𝑥[𝑛𝑛] = �𝑘𝑘=−∞

𝑎𝑎𝑘𝑘𝑒𝑒𝜋𝜋𝑘𝑘𝜔𝜔0𝑛𝑛 𝑦𝑦[𝑛𝑛] = �𝑘𝑘=−∞

𝐻𝐻(𝑘𝑘𝑖𝑖0)𝑎𝑎𝑘𝑘𝑒𝑒𝜋𝜋𝑘𝑘𝜔𝜔0𝑛𝑛

𝑎𝑎𝑘𝑘 → 𝐻𝐻(𝑘𝑘𝑖𝑖0)𝑎𝑎𝑘𝑘

Gain

𝐻𝐻 𝑘𝑘𝑖𝑖0 = 𝐻𝐻(𝑘𝑘𝑖𝑖0) 𝑒𝑒𝜋𝜋∡𝐻𝐻(𝑘𝑘𝜔𝜔0)

Amplitude

Phase

By linearity a sum of frequencies go out of the LTI filteronly with different amplitude and phase.

Discrete time

23

Time-Continuous Transfer Function

ℎ(𝑡𝑡) (ℎ ∗ 𝑓𝑓)(𝑡𝑡)𝑓𝑓(𝑡𝑡)

𝐻𝐻(𝑠𝑠) 𝐻𝐻 𝑠𝑠 𝐹𝐹(𝑠𝑠)𝐹𝐹(𝑠𝑠)

Time domain

Complex frequency domain (s-plane)

h(t) : impulse response (CT)H(s) : transfer function (stationary and transient frequency response) of the filter/system, i.e Laplace transform of h(t)

Reminder: a convolution in the time domain is a multiplication in the frequency domain

24

Time-Discrete Transfer Function

ℎ[𝑛𝑛] ℎ ∗ 𝑓𝑓 [𝑛𝑛]𝑓𝑓[𝑛𝑛]

𝐻𝐻(𝑧𝑧) 𝐻𝐻 𝑧𝑧 𝐹𝐹(𝑧𝑧)𝐹𝐹(𝑧𝑧)

Time domain

Complex frequency domain (z-plane)

h[n] : impulse response (DT)H(z) : transfer function (stationary and transient frequency response) of the filter/system, i.e. Z-transform of h[n]

Reminder: a convolution in the time domain is a multiplication in the frequency domain

25

Filters as System Examples

Analog

Analog

Circuit

Analog filter

1 1( )n ny y f x x=

Function/algorithm

Digital filter

A/D

Digital

26

Transfer Functions of FiltersAnalogCircuit

1( )1

c

in

vH sv RCs

= =+

Laplace Transf.

Numerator

Denominator

Digital

1 1( )n ny y f x x=

Function/algorithm1

0 11

1

( )1

NN

MM

b b z b zH za z b z

− −

− −

+ + +=

+ + +

Z Transf.

Numerator

Denominator

27

Motivating Examples

for Filters

2828

spectrum of original signal

spectrum of reconstructedsignal

)(tx x

( )∑+∞

−∞=

−=n

nTttp δ)(

)(txr)(ωH

spectrum of sampled signalsampling angular frequency ωs > 2 ωm

filteringfilter cut-off angular frequency ωm < ωc < (ωs –ωm)

)(txp

)()()( ωωω HXX pr =

Filters for Signal Reconstruction From W3,

s. 26

29

Reconstruction Summary –Time Domain

The reconstructed signal xr(t) is obtained through a convolutionbetween the sampled signal xp(t) with period T and one of the following three interpolation functions h(t).

Com

puta

tiona

l cos

t

1. Zero-order hold (ZOH)

2. First-order hold (FOH)

3. Whittaker-Shannon

From Prof. A. S. Willsky, Signals and Systems course

From W3, s. 32

30

Reconstruction Summary –Frequency Domain

The spectrum of the reconstructed signal Xr(ω) is obtained through a multiplication between the spectrum of the sampled signal Xp(ω) with angular sampling frequency ωs and one of the following three low-pass filters.

From Prof. A. Oppenheim, Signals and Systems course

From W3, s. 33

31

Anti-Aliasing Filters

Reduced sampling frequency: 2 kHzAnti-alias filter: desired cut-off frequency 1 kHz

Actual high-order digital filter(see next week)

From W3, s. 42

32

Filtering Noisy Signals

low pass filter

high pass filter

Solar radiationday/night cycle

changing cloud cover

33

Terminology and Basic Filters

34

Low-Pass FilterIdealized response in the (angular) frequency domain: Notes:

• H(jω) = H(iω) = H(ω)• ωc: cut-off frequency• |H| = 1 and ∠H = 0 for

ideal filters in thepassband, no need forthe phase plot.

Realistic response in the (angular) frequency domain:

Notes: |H(jω)|: amplitude

35

High-Pass FilterIdealized response in the (angular) frequency domain:

Realistic response in the (angular) frequency domain:

36

Band-Pass FilterIdealized response in the (angular) frequency domain:

Realistic response in the (angular) frequency domain:

ωc1: lower cut-off frequencyωc2: upper cut-off frequency

Notes:a Band-Stop Filter reverses passing and stopping bands w.r.t.a band-pass filter

37

Examples of Simple Analog Filters

38

DecibelSource of sound Sound pressure Sound pressure level

pascal dB re 20 μPaJet engine at 30 m 630 Pa 150 dBRifle being fired at 1 m 200 Pa 140 dBThreshold of pain 100 Pa 130 dBHearing damage (due to short-term exposure) 20 Pa approx. 120 dB

Jet at 100 m 6 – 200 Pa 110 – 140 dBJack hammer at 1 m 2 Pa approx. 100 dBHearing damage (due to long-term exposure) 6×10−1 Pa approx. 85 dB

Major road at 10 m 2×10−1 – 6×10−1 Pa 80 – 90 dBPassenger car at 10 m 2×10−2 – 2×10−1 Pa 60 – 80 dBTV (set at home level) at 1 m 2×10−2 Pa approx. 60 dB

Normal talking at 1 m 2×10−3 – 2×10−2 Pa 40 – 60 dBVery calm room 2×10−4 – 6×10−4 Pa 20 – 30 dBLeaves rustling, calm breathing 6×10−5 Pa 10 dB

Auditory threshold at 1 kHz 2×10−5 Pa 0 dB

210

1

20 logdBVGV

=

1V 2V

𝑉𝑉2 > 𝑉𝑉1 → 𝐺𝐺𝑑𝑑𝑑𝑑 > 0 (𝑔𝑔𝑎𝑎𝑖𝑖𝑛𝑛)

𝑉𝑉2 < 𝑉𝑉1 → 𝐺𝐺𝑑𝑑𝑑𝑑 < 0 (𝑑𝑑𝑎𝑎𝑑𝑑𝑑𝑑𝑖𝑖𝑛𝑛𝑔𝑔)

39

Low Pass Filter - RC circuit

Note: -3dB = about 71% of the undamped amplitude

Break or cut-off frequency

40

High-Pass Filter – RC circuit

41

Bode Plots

42

Transfer Functions of Analog Filters

Circuit

1( )1

c

in

vH sv RCs

= =+

Laplace Transf.

Numerator

Denominator

43

From Transfer Functions to Bode Plots𝐻𝐻 𝑠𝑠 =

𝑁𝑁𝑁𝑁𝑑𝑑(𝑠𝑠)𝐷𝐷𝑒𝑒𝑛𝑛(𝑠𝑠)

= A�(𝑠𝑠 − 𝑥𝑥𝑛𝑛)𝑎𝑎𝑛𝑛(𝑠𝑠 − 𝑦𝑦𝑛𝑛)𝑏𝑏𝑛𝑛

Assume transfer function:

Frequency response: s = 𝑖𝑖𝑖𝑖

Bode magnitude:

Bode phase:

𝐻𝐻 𝑠𝑠 = 𝑖𝑖𝑖𝑖 = 𝐻𝐻 𝑖𝑖𝑖𝑖 = 𝐻𝐻 𝑖𝑖

∡𝐻𝐻 𝑠𝑠 = 𝑖𝑖𝑖𝑖 = ∡𝐻𝐻 𝑖𝑖𝑖𝑖 = ∡𝐻𝐻 𝑖𝑖

where xn, yn constants, an, bn > 0

Zero (numerator = 0): every value of s where 𝑖𝑖 = 𝑥𝑥𝑛𝑛Pole (denominator = 0): every value of s where 𝑖𝑖 = 𝑦𝑦𝑛𝑛

Bode Plot: The Example of a Low-Pass Filter

44

Bode Plot: The Example of a Low-Pass Filter

not to scale !

1000 Hz10 Hz

44

45

Bode Plots – Why handy?

𝑌𝑌 𝑖𝑖 = 𝐻𝐻 𝑖𝑖 𝑋𝑋(𝑖𝑖)𝑌𝑌 𝑖𝑖 = 𝐻𝐻 𝑖𝑖 𝑋𝑋 𝑖𝑖∡𝑌𝑌 𝑖𝑖 = ∡𝐻𝐻 𝑖𝑖 + ∡𝑋𝑋 𝑖𝑖

Frequency domain 𝐻𝐻(𝑖𝑖) 𝑌𝑌(𝑖𝑖)X(𝑖𝑖)

Amplitude

Phase

log 𝑌𝑌 𝑖𝑖 = log 𝐻𝐻 𝑖𝑖 + log 𝑋𝑋 𝑖𝑖

Note: this is valid also for cascaded blocks of LTI systems (e.g., cascaded filters)

46

Bode Plot – Why only positive and log scale for ω as well?

– If impulse response h(t) real, then 𝐻𝐻 𝑖𝑖 evenfunction of ω and ∡𝐻𝐻 𝑖𝑖 odd function of ω

– Therefore plots for negative ω can be straightforwardly obtained from those of positive ω, so disregarded

– Log scale for frequency allows for covering a wider range of possible input frequencies on the same plot

47

Bode Plot - Rules

• Zero (numerator = 0)– Amplitude: +20 dB/decade– Phase: +90º; +45º/decade, starting 1 decade

before zero• Pole (denominator = 0)

– Amplitude: -20 dB/decade– Phase: -90º; -45º/decade, starting 1 decade

before pole

48

Bode Plot (Magnitude)

Zero (numerator = 0) Amplitude: +20 dB/decadePole (denominator = 0) Amplitude: -20 dB/decade

49

Bode Plot (Phase)

Zero (numerator = 0): +90º; 45º/decade, starting 1 decade before zeroPole (denominator = 0): -90º; -45º/decade, starting 1 decade before pole

50

𝐻𝐻 𝑠𝑠 =1

1 + 𝑠𝑠𝑠𝑠𝑠𝑠

Example: Low-Pass Filter –Circuit and Analysis

)𝑑𝑑𝑣𝑣𝒐𝒐𝒐𝒐𝒐𝒐(𝑡𝑡𝑑𝑑𝑡𝑡

=1𝑠𝑠𝑠𝑠

[𝑣𝑣𝒊𝒊𝒊𝒊 𝑡𝑡 − 𝑣𝑣𝒐𝒐𝒐𝒐𝒐𝒐 𝑡𝑡 ]

𝑠𝑠𝑉𝑉𝑜𝑜𝑜𝑜𝑠𝑠(𝑠𝑠) = 1𝑅𝑅𝑅𝑅

[(𝑉𝑉𝜋𝜋𝑛𝑛(𝑠𝑠) − 𝑉𝑉𝑜𝑜𝑜𝑜𝑠𝑠(𝑠𝑠)]

𝑉𝑉𝑜𝑜𝑜𝑜𝑠𝑠(𝑠𝑠)(1 + 𝑠𝑠𝑠𝑠𝑠𝑠) = 𝑉𝑉𝜋𝜋𝑛𝑛(𝑠𝑠)

1 + 𝑠𝑠𝑠𝑠𝑠𝑠 =𝑉𝑉𝜋𝜋𝑛𝑛(𝑠𝑠)𝑉𝑉𝑜𝑜𝑜𝑜𝑠𝑠(𝑠𝑠)

=1

𝐻𝐻(𝑠𝑠)

Laplace tables & properties

ℒ ddt x t = sX(s) ℒ x t = X(s)

51

1 pole s = -1/RCi.e. 𝑖𝑖 = 𝜋𝜋

𝑅𝑅𝑅𝑅= 1

𝑅𝑅𝑅𝑅𝐻𝐻 𝑠𝑠 =1

1 + 𝑠𝑠𝑠𝑠𝑠𝑠

𝐻𝐻 𝑠𝑠 = 𝑖𝑖𝑖𝑖 = 𝐻𝐻 𝑖𝑖 =1

1 + 𝑖𝑖𝑖𝑖𝑠𝑠𝑠𝑠

𝐻𝐻 𝑖𝑖 =1

1 + 𝑖𝑖𝑖𝑖𝑠𝑠𝑠𝑠=

11 + 𝑖𝑖𝑖𝑖𝑠𝑠𝑠𝑠

=1

1 + 𝑖𝑖2𝑠𝑠2𝑠𝑠2Bode magnitude:

Bode phase: ∡𝐻𝐻 𝑖𝑖 = tan−1𝐼𝐼𝑑𝑑[𝐻𝐻(𝑖𝑖)]𝑠𝑠𝑒𝑒[𝐻𝐻 𝑖𝑖 ]

= − tan−1 𝑖𝑖𝑠𝑠𝑠𝑠

Example: Low-Pass Filter –Circuit and Analysis

52

Example: Low-Pass Filter –Bode Plot

53

Example: High-Pass Filter –Circuit

1 zero at ω = 01 pole at ω = 1/RC

54

Example: High-Pass Filter –Bode Plot

55

Conclusion

56

Take-Home Messages• Multiple transforms exist: continuous-time Fourier, discrete-

time Fourier, Laplace, Z-transform; Laplace and Z-transform are needed to cover the large class of unstable systems

• Continuous-time Fourier transform is a special case of the Laplace transform; discrete-time Fourier transform is a special case of Z-transform

• Filters allow a number of operations (e.g., noise removal, anti-aliasing, signal reconstructions, etc.)

• Their response can be represented in time (impulse response) and frequency domain (frequency response with Fourier transform, and transfer function with Laplace transform)

• They are often easier to design and analyze in the frequency domain

• Bode plots allows for analysis of filters’ frequency response

57

Books• J. H. McClellan, R. W. Schafer, M. A. Yoder

“DSP First: A Multimedia Approach”, Prentice Hall, 1999.

• A. Oppenheim and A. S. Willsky with S. Nawab, “Signals and Systems”, Prentice Hall, 1997.

Additional Literature – Week 4