module 4 class

Aidan Hogg - 7 November 2019 ELEC96010 (EE3-07): Digital Department of Electrical and Electronic Engineering peer instruction

Method:

1: Conceptual question posed - students think quietly on their own and report initial answers on Mentimeter (3 mins) 2: Students discuss their answers in small groups (2 mins) 3: Explanation/discussion of correct answer (3 mins) go to www.menti.com and use the code 74 99 86

Consider the following windows: 0.37 0.87 1.19 0 0 0 -13.0 dB

-40.0 dB (dB) (dB) (dB) | 50 | 50 | 50 -58.0 dB

W − W − W − | | |

100 100 100 − 0 1 2 3 − 0 1 2 3 − 0 1 2 3 ω ω ω

Rectangular Hamming Blackman-Harris If we were to design a filter using the windowing method, which window should be selected if you only care about the transition bandwidth being short?

A: Rectangular B: Hamming C: Blackman-Harris answer

Consider the following windows: 0.37 0.87 1.19 0 0 0 -13.0 dB

-40.0 dB (dB) (dB) (dB) | 50 | 50 | 50 -58.0 dB

W − W − W − | | |

100 100 100 − 0 1 2 3 − 0 1 2 3 − 0 1 2 3 ω ω ω

Rectangular Hamming Blackman-Harris If we were to design a filter using the windowing method, which window should be selected if you only care about the transition bandwidth being short?

A: Rectangular B: Hamming C: Blackman-Harris explanation

Window Relationships Relationship when you multiply an impulse response ℎ[푛] by a window 푤[푛] that is of length 푁

1 퐻 (푒푗휔) = 퐻(푒푗휔) ⊛ 푊 (푒푗휔) 푁 2휋

1.0 24 M =24 1.0

12 H H 0.5 W 0.5

0 0.0 0.0 2 0 2 2 0 2 2 0 2 − ω − ω − ω

Transition bandwidth, Δ휔 = width of the main lobe

4휋 Rectangular window: Δ휔 = 푁 go to www.menti.com and use the code 74 99 86

Recall that a digital system in general is described by a difference equation where a recursive difference equation uses past outputs while a non recursive difference equation does not.

Consider the following statements:

1: FIR filters can only be implemented non recursively in practice 2: IIR filters can only be implemented recursively in practice

Which of these statements are true?

A: 1 B: 2 C: Both 1 and 2 answer

Recall that a digital system in general is described by a difference equation where a recursive difference equation uses past outputs while a non recursive difference equation does not.

Consider the following statements:

1: FIR filters can only be implemented non recursively in practice 2: IIR filters can only be implemented recursively in practice

Which of these statements are true?

A: 1 B: 2 C: Both 1 and 2 explanation

Consider this FIR filter described by a non recursive difference equation:

푦[푛] = 푥[푛] + 푥[푛 − 1] + ⋯ + 푥[푛 − 50] (a) 푦[푛 − 1] = 푥[푛 − 1] + 푥[푛 − 2] + ⋯ + 푥[푛 − 51] (b) 푦[푛] − 푦[푛 − 1] = 푥[푛] − 푥[푛 − 51] (a) - (b) 푦[푛] = 푦[푛 − 1] + 푥[푛] − 푥[푛 − 51] Recursive

(a) FIR filters are normally implemented non recursively but can be implemented recursively. (b) IIR filters can only be implemented recursively in practice because an infinite number of coefficients would be required to ∞ realize them non recursively (recall: 푦[푛] = ∑푘=−∞ 푥[푘]ℎ[푛 − 푘]). go to www.menti.com and use the code 74 99 86

The group delay 휏퐻 is measured in what units?

A: Seconds B: Radians C: Radians per second answer

The group delay 휏퐻 is measured in what units?

A: Seconds B: Radians C: Radians per second explanation

푗푤 푑∠퐻(푒푗휔) The group delay is defined 휏퐻(푒 ) = − 푑휔

One trick to get at the phase is: ln 퐻(푒푗휔) = ln |퐻(푒푗휔)| + 푗∠퐻(푒푗휔)

−푑(ℑ( ln 퐻(푒푗휔))) −1 푑퐻(푒푗휔) −푧 푑퐻(푧) 휏 = = ℑ( ) = ℜ( )∣ 퐻 푑휔 퐻(푒푗휔) 푑휔 퐻(푧) 푑푧 푧=푒푗휔

∞ 퐻(푒푗휔) = ∑ ℎ[푛]푒−푗푛휔 = ℱ(ℎ[푛]), where ℱ denotes the DTFT. 푛=0 푑퐻(푒푗휔) ∞ = ∑ −푗푛ℎ[푛]푒−푗푛휔 = −푗ℱ(푛ℎ[푛]) 푑휔 푛=0 −1 푑퐻(푒푗휔) ℱ(푛ℎ[푛]) ℱ(푛ℎ[푛]) 휏 = ℑ( ) = ℜ( ) = ℑ(푗 ) 퐻 퐻(푒푗휔) 푑휔 ℱ(ℎ[푛]) ℱ(ℎ[푛]) go to www.menti.com and use the code 74 99 86

Consider the pole-zero plot of these three systems:

1 1 1 ) ) ) z z z ( ( 0 ( 0 0 = = =

1 1 1 − − − 1 0 1 1 0 1 1 0 1 − (z) − (z) − (z) < < < A B C

Which system has most of its energy in ℎ[푛] concentrated towards 푛 = 0? answer

Consider the pole-zero plot of these three systems:

1 1 1 ) ) ) z z z ( ( ( 0 0 0 = = =

1 1 1 − − − 1 0 1 1 0 1 1 0 1 − − − (z) (z) (z) < < < A B C

Which system has most of its energy in ℎ[푛] concentrated towards 푛 = 0? explanation

Impulse responses:

1 1 1 ) ) ) z z z ( 0 ( 0 ( 0 = = =

1 1 1 − − − 1 0 1 1 0 1 1 0 1 − (z) − (z) − (z) < < <

A (Minimum Phase) B (Maximum Phase) C explanation

Minimum Phase Average group delay over 휔 equals the (#poles - #zeros) within the 1 unit circle where zeros on the unit circle count for 2

3 0 4 2

| 5 H H 2 H τ

6 − | 1 10 0 − 0 0 1 2 3 0 1 2 3 0 1 2 3 ω ω ω

A filter with all its zeros inside the unit circle is a minimum phase filter:

1. The lowest possible group delay for a given magnitude response 2. The energy in ℎ[푛] is concentrated towards 푛 = 0 go to www.menti.com and use the code 74 99 86

A Finite Impulse Response (FIR) filter is one where 푌 (푧) = 퐵(푧)푋(푧).

Consider four filters with the following coefficients:

1: 푏1[푛] = {1, 0, 1, 0, 0, 1, 0, 1}

2: 푏2[푛] = {1, 1, 1, 0, 0, −1, −1, −1}

3: 푏3[푛] = {1, 1, 0, 1, 1, 1, 1, 0, 1}

4: 푏4[푛] = {0, 1, 0, 1, 0, 0, −1, 0, −1}

Which of these filters will have linear phase?

A: 푏1[푛]

B: Both 푏1[푛] and 푏2[푛]

C: Both 푏3[푛] and 푏4[푛] answer

A Finite Impulse Response (FIR) filter is one where 푌 (푧) = 퐵(푧)푋(푧).

Consider four filters with the following coefficients:

1: 푏1[푛] = {1, 0, 1, 0, 0, 1, 0, 1}

2: 푏2[푛] = {1, 1, 1, 0, 0, −1, −1, −1}

3: 푏3[푛] = {1, 1, 0, 1, 1, 1, 1, 0, 1}

4: 푏4[푛] = {0, 1, 0, 1, 0, 0, −1, 0, −1}

Which of these filters will have linear phase?

A: 푏1[푛]

B: Both 푏1[푛] and 푏2[푛]

C: Both 푏2[푛] and 푏3[푛] explanation

Linear Phase Filters

푗휔 The phase of a linear phase filter is: ∠퐻(푒 ) = 휃0 − 훼 푑∠퐻(푒푗휔) Thus the group delay is constant: 휏퐻 = − 푑휔 = 훼

A filter has linear phase, if and only if, its impulse response ℎ[푛] is symmetric or antisymmetric: ℎ[푛] = ℎ[푁 − 1 − 푛] ∀푛 or else ℎ[푛] = −ℎ[푁 − 1 − 푛] ∀푛 푁 can be odd (⇒∋ mid point) or even (⇒= mid point)

Important: This is not the same symmetry that is needed to make the signal real in the frequency domain, which is when ℎ[푛] = ℎ[−푛]. go to www.menti.com and use the code 74 99 86

It is possible to transform a continuous time filter into a discrete time filter using IIR filter transformations.

Which transformation would be most 1.00

appropriate to transform this continuous 0.75

time bandpass filter into a discrete time | H 0.50 | Analog Filter filter? 0.25

0.00 0 10 20 Frequency (krad/s) A: Bilinear mapping B: Impulse invariance C: Both bilinear mapping and impulse invariance would be appropriate answer

It is possible to transform a continuous time filter into a discrete time filter using IIR filter transformations.

Which transformation would be most 1.00

appropriate to transform this continuous 0.75

time bandpass filter into a discrete time | H 0.50 | Analog Filter filter? 0.25

0.00 0 10 20 Frequency (krad/s) A: Bilinear mapping B: Impulse invariance C: Both bilinear mapping and impulse invariance would be appropriate explanation

Bilinear Mapping The is a widely used one-to-one invertible mapping. It involves a change variable: 훼 + 푠 푧 − 1 푧 = ⇔ 푠 = 훼 (a) ℜ axis (푠) ↔ ℜ axis (푧) 훼 − 푠 푧 + 1 (b) ℑ axis (푠) ↔ Unit circle (푧) (c) Left half plane (푠) ↔ inside of unit circle (푧) (d) Unit circle (푠) ↔ ℑ axis (z)

3.0 2 s-plane 2 z-plane α = 1 α = 1 2.5 1 1 2.0 0 0

ω 1.5

1 1 1.0 − −

2 2 0.5 − − 2 0 2 2 0 2 0.0 − − 0.0 2.5 5.0 7.5 10.0 Ω/α explanation

Impulse Invariance

Bilinear transform works well for a low-pass filter but the non-linear compression of the frequency distorts any other response. The impulse invariance transformation is an alternative method that obtains the discrete-time filter by sampling the impulse response of the continuous-time filter.

ℒ−1 sample 풵 퐻(푠) −−→ℎ(푡) −−−−→ℎ[푛] = 푇 × ℎ(푛푇 ) −→퐻(푧) explanation

Bilinear Mapping 1: Frequency response is identical in both magnitude and phase 2: The frequency axis has a non-linear distortion

Impulse Invariance 1: Preserves frequency axis and impulse response 2: The frequency response is aliased

The question relates to a standard telephone (300 to 3400 Hz bandpass) filter

1.00 1.00 1.00

0.75 0.75 0.75 | | |

H 0.50 H 0.50 H 0.50 | Analog Filter | Bilinear (fs = 8 kHz) | Impulse Invariance Matched at 3.4 kHz (fs = 8 kHz) 0.25 0.25 0.25

0.00 0.00 0.00 0 10 20 0 1 2 3 0 1 2 3 Frequency (krad/s) ω (rad/sample) ω (rad/sample)