Problem Set 9 Solutions

Similar documents
LAB 6: FIR Filter Design Summer 2011

Basic Design Approaches

Filter Analysis and Design

Filter Design Problem

Lecture 14: Windowing

Digital Signal Processing: Signal Transforms

LINEAR-PHASE FIR FILTERS DESIGN

(Refer Slide Time: 01:28 03:51 min)

1 1.27z z 2. 1 z H 2

INFINITE-IMPULSE RESPONSE DIGITAL FILTERS Classical analog filters and their conversion to digital filters 4. THE BUTTERWORTH ANALOG FILTER

LABORATORY 3 FINITE IMPULSE RESPONSE FILTERS

1. FIR Filter Design

UNIT - 7: FIR Filter Design

2.161 Signal Processing: Continuous and Discrete

ECE 410 DIGITAL SIGNAL PROCESSING D. Munson University of Illinois Chapter 12

Digital Signal Processing

Exercises in Digital Signal Processing

Overview of Discrete-Time Fourier Transform Topics Handy Equations Handy Limits Orthogonality Defined orthogonal

Chapter 7: Filter Design 7.1 Practical Filter Terminology

V. IIR Digital Filters

ECE503: Digital Signal Processing Lecture 5

DSP-CIS. Chapter-4: FIR & IIR Filter Design. Marc Moonen

EECE 301 Signals & Systems Prof. Mark Fowler

PS403 - Digital Signal processing

TTT4120 Digital Signal Processing Suggested Solutions for Problem Set 2

Discrete Time Systems

UNIVERSITY OF OSLO. Please make sure that your copy of the problem set is complete before you attempt to answer anything.

DSP. Chapter-3 : Filter Design. Marc Moonen. Dept. E.E./ESAT-STADIUS, KU Leuven

DIGITAL SIGNAL PROCESSING UNIT III INFINITE IMPULSE RESPONSE DIGITAL FILTERS. 3.6 Design of Digital Filter using Digital to Digital

Lecture 7 Discrete Systems

Discrete Time Fourier Transform (DTFT) Digital Signal Processing, 2011 Robi Polikar, Rowan University

Assignment 4 Solutions Continuous-Time Fourier Transform

-Digital Signal Processing- FIR Filter Design. Lecture May-16

Signal Processing. Lecture 10: FIR Filter Design. Ahmet Taha Koru, Ph. D. Yildiz Technical University Fall

The Discrete-Time Fourier

(i) Understanding the characteristics and properties of DTFT

A system that is both linear and time-invariant is called linear time-invariant (LTI).

Cast of Characters. Some Symbols, Functions, and Variables Used in the Book

EE 521: Instrumentation and Measurements

Fast Fourier Transform Discrete-time windowing Discrete Fourier Transform Relationship to DTFT Relationship to DTFS Zero padding

7.17. Determine the z-transform and ROC for the following time signals: Sketch the ROC, poles, and zeros in the z-plane. X(z) = x[n]z n.

Fast Fourier Transform Discrete-time windowing Discrete Fourier Transform Relationship to DTFT Relationship to DTFS Zero padding

DSP Laboratory (EELE 4110) Lab#5 DTFS & DTFT

Optimal Design of Real and Complex Minimum Phase Digital FIR Filters

Efficient algorithms for the design of finite impulse response digital filters

Stability Condition in Terms of the Pole Locations

Digital Signal Processing Lecture 9 - Design of Digital Filters - FIR

HW13 Solutions. Pr (a) The DTFT of c[n] is. C(e jω ) = 0.5 m e jωm e jω + 1

EE 311 February 22, 2019 Lecture 13

UNIVERSITY OF OSLO. Faculty of mathematics and natural sciences. Forslag til fasit, versjon-01: Problem 1 Signals and systems.

On the Frequency-Domain Properties of Savitzky-Golay Filters

FIR BAND-PASS DIGITAL DIFFERENTIATORS WITH FLAT PASSBAND AND EQUIRIPPLE STOPBAND CHARACTERISTICS. T. Yoshida, Y. Sugiura, N.

EECS 123 Digital Signal Processing University of California, Berkeley: Fall 2007 Gastpar November 7, Exam 2

Computer-Aided Design of Digital Filters. Digital Filters. Digital Filters. Digital Filters. Design of Equiripple Linear-Phase FIR Filters

CHAPTER 2 RANDOM PROCESSES IN DISCRETE TIME

Multirate Digital Signal Processing

EEO 401 Digital Signal Processing Prof. Mark Fowler

Like bilateral Laplace transforms, ROC must be used to determine a unique inverse z-transform.

INF3440/INF4440. Design of digital filters

2.161 Signal Processing: Continuous and Discrete

Digital Signal Processing

ELEG 305: Digital Signal Processing

Multimedia Signals and Systems - Audio and Video. Signal, Image, Video Processing Review-Introduction, MP3 and MPEG2

Contents. Digital Signal Processing, Part II: Power Spectrum Estimation

ECE 8440 Unit 17. Parks- McClellan Algorithm

Laboratory 4: Optimal Filter Design. Miki Lustig

Lecture 16: Filter Design: Impulse Invariance and Bilinear Transform

Electronic Circuits EE359A

2.161 Signal Processing: Continuous and Discrete Fall 2008

Signals and Systems. Lecture 11 Wednesday 22 nd November 2017 DR TANIA STATHAKI

Laboratory handout 1 Mathematical preliminaries

Lecture 27 Frequency Response 2

Signal Processing First Lab 11: PeZ - The z, n, and ˆω Domains

Homework 8 Solutions

EE482: Digital Signal Processing Applications

Digital Signal Processing 2/ Advanced Digital Signal Processing, Audio/Video Signal Processing Lecture 10, Frequency Warping, Example

CMPT 889: Lecture 5 Filters

Lab 3: Poles, Zeros, and Time/Frequency Domain Response

Digital Filters. Linearity and Time Invariance. Linear Time-Invariant (LTI) Filters: CMPT 889: Lecture 5 Filters

Chapter 7: IIR Filter Design Techniques

( ) John A. Quinn Lecture. ESE 531: Digital Signal Processing. Lecture Outline. Frequency Response of LTI System. Example: Zero on Real Axis

MASSACHUSETTS INSTITUTE OF TECHNOLOGY Department of Electrical Engineering and Computer Science Discrete-Time Signal Processing Fall 2005

w n = c k v n k (1.226) w n = c k v n k + d k w n k (1.227) Clearly non-recursive filters are a special case of recursive filters where M=0.

Second-order filters. EE 230 second-order filters 1

Case Study: Parallel Coupled- Line Combline Filter

Lecture 3 - Design of Digital Filters

EE 313 Linear Signals & Systems (Fall 2018) Solution Set for Homework #7 on Infinite Impulse Response (IIR) Filters CORRECTED

ELEG 5173L Digital Signal Processing Ch. 5 Digital Filters

Lecture 9 Infinite Impulse Response Filters

Butterworth Filter Properties

Introduction to DSP Time Domain Representation of Signals and Systems

Design of IIR filters

Design IIR Butterworth Filters Using 12 Lines of Code

Digital Signal Processing IIR Filter Design via Bilinear Transform

(i) Represent continuous-time periodic signals using Fourier series

Filter structures ELEC-E5410

ELEN E4810: Digital Signal Processing Topic 11: Continuous Signals. 1. Sampling and Reconstruction 2. Quantization

VALLIAMMAI ENGINEERING COLLEGE. SRM Nagar, Kattankulathur DEPARTMENT OF INFORMATION TECHNOLOGY. Academic Year

Basics on 2-D 2 D Random Signal

Transcription:

Problem Set 9 Solutions EE23: Digital Signal Processing. From Figure below, we see that the DTFT of the windowed sequence approaches the actual DTFT as the window size increases. Gibb s phenomenon is absent for large enough L, since the sequence a n decays exponentially. The MATLAB code is also included below. Grading: A lot of answers write that Gibbs phenomenon is present. This is incorrect. Subtract /2 point for this mistake. Most of these answers had guesses about what is Gibbs phenomenon. I will suggest that read Gibbs phenomenon from the Wikipedia link to understand it better. 2 2 H 32 (ω) H 64 (ω) 2 2 2 2 ω 2 2 ω 2 2 H 28 (ω) 2 H 256 (ω) 2 2 2 ω 2 2 ω Figure : Analysis Circuit hw9p3.m: a =.977; You can show this formally by showing that H(e jω ) H N (e jω ) = P n>n an e jωn as N, for all ω. Note that the for all ω clause is very important.

N = 24; print_to_file = yes ; L = 32; n_32 = :32; x_32 = a.^(n_32-); [H_32,W] = dtft(x_32,n); L = 64; n_64 = :64; x_64 = a.^(n_64-); [H_64,W] = dtft(x_64,n); L = 28; n_28 = :28; x_28 = a.^(n_28-); [H_28,W] = dtft(x_28,n); L = 256; n_256 = :256; x_256 = a.^(n_256-); [H_256,W] = dtft(x_256,n); X =./(-a*exp(i*w)); figure() subplot(22) semilogy(w,abs(h_32), b,w,abs(x), r-- ); axis([-pi pi ^-3 ]); xlabel( \omega ---\rightarrow ); ylabel( H_{32}(\omega) ---\rightarrow ); subplot(222) semilogy(w,abs(h_64), b,w,abs(x), r-- ); axis([-pi pi ^-3 ]); xlabel( \omega ---\rightarrow ); ylabel( H_{64}(\omega) ---\rightarrow ); subplot(223) semilogy(w,abs(h_28), b,w,abs(x), r-- ); axis([-pi pi ^-3 ]); xlabel( \omega ---\rightarrow ); ylabel( H_{28}(\omega) ---\rightarrow ); 2

subplot(224) semilogy(w,abs(h_256), b,w,abs(x), r-- ); axis([-pi pi ^-3 ]); xlabel( \omega ---\rightarrow ); ylabel( H_{256}(\omega) ---\rightarrow ); if (print_to_file == yes ) print -depsc prob_4_.eps; end dtft.m: function [X,W]=dtft(x,N) %dtft X=fftshift(fft(x,N)); W=[-N/2:N/2-]*2*pi/N; return 2. 3

Correction: H lpf (e jω ) = 2, ω π/4. Do not deduct any point if you got the π/4 cut-off correct, but deduct half-point if you got the cut-off incorrect. This error ripples in Solution to part (c). 4

3. (b).4 #4b.: Magnitude response of the length 36 FIR BPF.8 #4b.2: Close up of magnitude response of the length 36 FIR BPF.2.6.4.2.8.6.998.4.996.2.994.5.5 2 2.5 3 Discrete angular frequency, lambda (rad/s) #4b.3: Log magnitude response of the length 36 FIR BPF.992..2.3.4.5.6.7.8.9 2 2. Discrete angular frequency, lambda (rad/s) #4b.4: Phase response of the length 36 FIR BPF 4 3 2 Log magnitude 2 3 4 Phase response (rad) 2 5 3 6.5.5 2 2.5 3 Discrete angular frequency, lambda (rad/s) 4.5.5 2 2.5 3 Discrete angular frequency, lambda (rad/s) i. Maximum passband ripple amplitude (in db relative to.) is 2 log(.4/) =.35 db. Worst-case stopband attentuation is 2 log(4 3 ) = -48. db. Defining the transition bandwidth as the region of the response which fails to satisfy these two criteria, it is roughly 2.65 2.7 =.58 rad/s for the last edge. The transition bandwidth at the first edge is essentially the same (.8.5 =.58). Taking the position of the band edge to be the average of the edges of the passband and stopband gives ω c = (2.65 + 2.7)/2 = 2.36 rad/s, ω c2 = (.8 +.5)/2 =.79 rad/s, which are both less than half a percent from the design values. ii. The total number of zeros is N = 35, because the transfer function is simply a polynomial of degree N in z which has at most that many roots. To count zeros on the unit circle, refer to the log magnitude plot. Each of the downward spikes is a point where the response goes to zero, corresponding to a zero that we are passing through on the unit circle (recall that the DTFT is simply the z-transform evaluated around the unit circle. Each of these should be counted twice, except at ω = or π, because the zeros occur in conjugate pairs (because the transfer function polynomial has real coefficients) and we are only seeing the zeros in positive frequency. Thus, there are zeros on the unit circle. The Matlab command zplane(a,) can be 5

used to verify these answers. It produces the plot given below. #4b.extra: z plane pole/zero plot for the length 36 FIR BPF.5.5 Imaginary part.5.5.5.5.5.5 2 Real part iii. There is a pole of multiplicity 35 at the origin. iv. The slope of the phase is M = (N )/2 = 35/2 due to the known results for generalized linear phase filters. The jumps of 2π are not really jumps at all since the phase is increasing or decreasing linearly there; they appear as jumps because we insist on referring the phase to a range of principal angles from π to π. The jumps of π occur only in the stopband and correspond to the frequencies where the real part of the DTFT, R(e jω ), crosses zero and changes sign. This comes from Euler s identity, = e jπ. 4. (a) From a close examination of the frequency response, ω p 2.2 and ω s.58. The ripple amplitudes are δ p. and δ s.57. Since Q s Q p = δ p δ s, the ratio Q s /Q p.75, and any pair of weights Q s and Q p having that ratio may have been used. (b) The filter is of odd length. Which type of generalized linear phase does it have? By the constraints on realizable filter types, we see that the filter must have even symmetry (Type I GLP) because otherwise we could not have H d (e j ) >. Also, H d (e j ) > implies that the phase at ω = must be zero with a slope equal to M = (N )/2 = 5. The only remaining trick is to figure out where R(ω) changes sign, because the phase plot will need jumps of π at those points. For this, refer to the frequency response plot and note that wherever the magnitude goes to zero, there must have been a zero-crossing (and hence sign change) of R(ω). 6

Missing phase plot 3 2 Phase response (rad) 2 3.5.5 2 2.5 3 ω (rad/s) 5. The following code would solve the problem. The main idea is to start with a small n (filter order), and increase the filter order till the target δ. is achieved. f = [.6.32.67.83 ]; m = [ ]; w = [ ]; n = 3; delta =. while (delta >.) [a, delta] = firpm(n,f,m,w); n = n + ; end n = n -; % correcting for extra increase in n plot((::n-), real(a(:n)), o-- ); grid on; xlabel( k ); ylabel( h[k] ); title( Impulse response of length-27 BP filter ); The final answer is N = 27. The impulse response of h 27 [n] is plotted below: 7

.4 Impulse response of length 27 BP filter.3.2. h[k]..2.3 5 5 2 25 3 k 6. See next page. 8

(a) Low-pass filter using Windowing i. The mid-point of transition band is used as LPF cutoff, ω c =.45π. The impulse response, magnitude response and zero locations of the three windowing filters is shown in Figure. ii. For the same minimax error, the transition band is largest for the Blackman window and smallest for the Rectangular window. The smoother windows tradeoff the transition band for smoothness and absence of Gibbs phenomenon. iii. The minimax is calculated using the expression max( (abs(h) H d ) ). I ve used 24 points in the freqz() command to calculate the errors. Give yourself full credit if your answer is 25% within my answer. Report any numerical error to Animesh. FILTER MSE Delta_P Delta_s Rectangular.95.59.97 Hamming.7.2459.2439 Blackman.222.2982.2985 (b) Low-pass filter using Parks McClellan Optimal Filter i. The filter s impulse response, frequency response, and zero locations is shown in Figure 2. ii. There are 5 ripples in the passband and 6 ripples in the stopband. This amounts to a total of ripples including extrema at ω p, ω s, and at ω = π. iii. Total of small ripple at ω = and it is in the passband. iv. The minimax error the Parks-McClellan Filter is:.56. From the diagram (and question design itself), note that the transition bandwidth for the Parks-McClellan filter is.4π -.5π. Clearly, the transition bandwidth is at par with the performance of the rectangular filter and outperforms Hamming and Blackman Filters. Moreover, Parks-McClellan filter s maximum delta value in the passband and stopband is.55. This filter outperforms the rectangular filter whose max delta value is.97.

FIGURE Rectangular.4.2 h[n] 2 Magnitude (db) -5 H(ω) - - Imaginary Part.5 -.5 - Zero Locations of FIR filters 2 - Hamming Blackman.4.2.4.2 2 2 n Magnitude (db) Magnitude (db) -5 - - -5 - - ω (xπ rad/sample) Imaginary Part Imaginary Part 2 - - 2 x 4 2 2 - -2-4 -2 Real Part x 4

FIGURE 2 Parks-McClellan Optimal 2-tap FIR Filter Zeros of the FIR Filter.4 Filter coefficients.3.2. Imaginary Part.5 -.5 2 -. 5 5 2 n ----> - - -.5.5.5 Real Part Magnitude of the Frequency Response Phase of the Frequency Response.8-5 H(ω).6.4.2 Phase( H(ω) ) - -5 2 3 ω (radians) -2 2 3 4 ω (radians)