Spring 2018 EE 445S Real-Time Digital Signal Processing Laboratory Prof. Evans. Homework #2. Filter Analysis, Simulation, and Design

Similar documents
Spring 2014 EE 445S Real-Time Digital Signal Processing Laboratory Prof. Evans. Homework #2. Filter Analysis, Simulation, and Design

Spring 2018 EE 445S Real-Time Digital Signal Processing Laboratory Prof. Evans. Homework #1 Sinusoids, Transforms and Transfer Functions

(i) Understanding of the characteristics of linear-phase finite impulse response (FIR) filters

(i) Understanding of the characteristics of linear-phase finite impulse response (FIR) filters

The University of Texas at Austin Dept. of Electrical and Computer Engineering Final Exam

DIGITAL FILTERS. !! Finite Impulse Response (FIR) !! Infinite Impulse Response (IIR) !! Background. !! Matlab functions AGC DSP AGC DSP

The University of Texas at Austin Dept. of Electrical and Computer Engineering Midterm #2

Designing Filters Using the NI LabVIEW Digital Filter Design Toolkit

Digital Filters IIR (& Their Corresponding Analog Filters) Week Date Lecture Title

The University of Texas at Austin Dept. of Electrical and Computer Engineering Midterm #1

ECE438 - Laboratory 7a: Digital Filter Design (Week 1) By Prof. Charles Bouman and Prof. Mireille Boutin Fall 2015

The University of Texas at Austin Dept. of Electrical and Computer Engineering Midterm #2. Prof. Brian L. Evans

EE 470 Signals and Systems

Lab S-5: DLTI GUI and Nulling Filters. Please read through the information below prior to attending your lab.

ELEC-C5230 Digitaalisen signaalinkäsittelyn perusteet

The University of Texas at Austin Dept. of Electrical and Computer Engineering Midterm #2. Prof. Brian L. Evans. Scooby-Doo

Experiment 2 Effects of Filtering

EE 422G - Signals and Systems Laboratory

Brief Introduction to Signals & Systems. Phani Chavali

Problem Point Value Your score Topic 1 28 Filter Analysis 2 24 Filter Implementation 3 24 Filter Design 4 24 Potpourri Total 100

DSP Laboratory (EELE 4110) Lab#10 Finite Impulse Response (FIR) Filters

Lab 8: Frequency Response and Filtering

ECE 4213/5213 Homework 10

Design of FIR Filters

APPENDIX A to VOLUME A1 TIMS FILTER RESPONSES

Massachusetts Institute of Technology Department of Electrical Engineering & Computer Science 6.341: Discrete-Time Signal Processing Fall 2005

Digital Filters FIR and IIR Systems

DSP First Lab 08: Frequency Response: Bandpass and Nulling Filters

2. Pre-requisites - CGS 2425 and MAC 2313; Corequisite - MAP 2302 and one of: EEL 3105, MAS 3114 or MAS 4105

Problem Point Value Your score Topic 1 28 Discrete-Time Filter Analysis 2 24 Improving Signal Quality 3 24 Filter Bank Design 4 24 Potpourri Total 100

Problem Point Value Your score Topic 1 28 Discrete-Time Filter Analysis 2 24 Upconversion 3 30 Filter Design 4 18 Potpourri Total 100

Part B. Simple Digital Filters. 1. Simple FIR Digital Filters

Multirate Digital Signal Processing

GEORGIA INSTITUTE OF TECHNOLOGY. SCHOOL of ELECTRICAL and COMPUTER ENGINEERING. ECE 2026 Summer 2018 Lab #8: Filter Design of FIR Filters

Spring 2014 EE 445S Real-Time Digital Signal Processing Laboratory Prof. Evans. Homework #3 Solutions

Florida International University

1 PeZ: Introduction. 1.1 Controls for PeZ using pezdemo. Lab 15b: FIR Filter Design and PeZ: The z, n, and O! Domains

Multirate DSP, part 1: Upsampling and downsampling

ECE 203 LAB 2 PRACTICAL FILTER DESIGN & IMPLEMENTATION

Project I: Phase Tracking and Baud Timing Correction Systems

Understanding Digital Signal Processing

ECE 429 / 529 Digital Signal Processing

AC : FIR FILTERS FOR TECHNOLOGISTS, SCIENTISTS, AND OTHER NON-PH.D.S

Filter Banks I. Prof. Dr. Gerald Schuller. Fraunhofer IDMT & Ilmenau University of Technology Ilmenau, Germany. Fraunhofer IDMT

Team proposals are due tomorrow at 6PM Homework 4 is due next thur. Proposal presentations are next mon in 1311EECS.

Electrical and Telecommunication Engineering Technology NEW YORK CITY COLLEGE OF TECHNOLOGY THE CITY UNIVERSITY OF NEW YORK

DIGITAL FILTERING AND THE DFT

EEM478-DSPHARDWARE. WEEK12:FIR & IIR Filter Design

IIR Filter Design Chapter Intended Learning Outcomes: (i) Ability to design analog Butterworth filters

ECE 5650/4650 Exam II November 20, 2018 Name:

Advanced Digital Signal Processing Part 5: Digital Filters

Octave Functions for Filters. Young Won Lim 2/19/18

ELEC3104: Digital Signal Processing Session 1, 2013

Signal Processing Toolbox

Filters. Phani Chavali

DIGITAL SIGNAL PROCESSING (Date of document: 6 th May 2014)

George Mason University Signals and Systems I Spring 2016

Signals and Systems Using MATLAB

Keywords FIR lowpass filter, transition bandwidth, sampling frequency, window length, filter order, and stopband attenuation.

Electrical & Computer Engineering Technology

Interpolated Lowpass FIR Filters

Final Exam. EE313 Signals and Systems. Fall 1999, Prof. Brian L. Evans, Unique No

Multirate Signal Processing Lecture 7, Sampling Gerald Schuller, TU Ilmenau

Contents. Introduction 1 1 Suggested Reading 2 2 Equipment and Software Tools 2 3 Experiment 2

4. Design of Discrete-Time Filters

Adaptive Filters Application of Linear Prediction

Audio Applications for Op-Amps, Part III By Bruce Carter Advanced Analog Products, Op Amp Applications Texas Instruments Incorporated

EE 351M Digital Signal Processing

Aparna Tiwari, Vandana Thakre, Karuna Markam Deptt. Of ECE,M.I.T.S. Gwalior, M.P, India

Lab P-4: AM and FM Sinusoidal Signals. We have spent a lot of time learning about the properties of sinusoidal waveforms of the form: ) X

Understanding the Behavior of Band-Pass Filter with Windows for Speech Signal

F I R Filter (Finite Impulse Response)

ADSP ADSP ADSP ADSP. Advanced Digital Signal Processing (18-792) Spring Fall Semester, Department of Electrical and Computer Engineering

DSP First Lab 03: AM and FM Sinusoidal Signals. We have spent a lot of time learning about the properties of sinusoidal waveforms of the form: k=1

ASN Filter Designer Professional/Lite Getting Started Guide

GEORGIA INSTITUTE OF TECHNOLOGY SCHOOL of ELECTRICAL and COMPUTER ENGINEERING. ECE 2025 Fall 1999 Lab #7: Frequency Response & Bandpass Filters

Design of IIR Digital Filters with Flat Passband and Equiripple Stopband Responses

ECE : Circuits and Systems II

An audio circuit collection, Part 3

!"!#"#$% Lecture 2: Media Creation. Some materials taken from Prof. Yao Wang s slides RECAP

Frequency Modulation and Demodulation

Narrow-Band Low-Pass Digital Differentiator Design. Ivan Selesnick Polytechnic University Brooklyn, New York

Project 2 - Speech Detection with FIR Filters

Optimal FIR filters Analysis using Matlab

Lecture 3, Multirate Signal Processing

Lab S-9: Interference Removal from Electro-Cardiogram (ECG) Signals

ESE531 Spring University of Pennsylvania Department of Electrical and System Engineering Digital Signal Processing

Lab 4: Static & Switched Audio Equalizer

Lab S-8: Spectrograms: Harmonic Lines & Chirp Aliasing

Outline. Introduction to Biosignal Processing. Overview of Signals. Measurement Systems. -Filtering -Acquisition Systems (Quantisation and Sampling)

STANFORD UNIVERSITY. DEPARTMENT of ELECTRICAL ENGINEERING. EE 102B Spring 2013 Lab #05: Generating DTMF Signals

SIGNAL PROCESSING FIRST SOLUTIONS

Application Note 7. Digital Audio FIR Crossover. Highlights Importing Transducer Response Data FIR Window Functions FIR Approximation Methods

SGN Audio and Speech Processing

Window Method. designates the window function. Commonly used window functions in FIR filters. are: 1. Rectangular Window:

PROBLEM SET 6. Note: This version is preliminary in that it does not yet have instructions for uploading the MATLAB problems.

Spring 2014 EE 445S Real-Time Digital Signal Processing Laboratory Prof. Evans. Homework #6 Solutions

INTRODUCTION TO DIGITAL SIGNAL PROCESSING AND FILTER DESIGN

CHAPTER 2 FIR ARCHITECTURE FOR THE FILTER BANK OF SPEECH PROCESSOR

Audio Enhancement Using Remez Exchange Algorithm with DWT

Transcription:

Spring 2018 EE 445S Real-Time Digital Signal Processing Laboratory Prof. Homework #2 Filter Analysis, Simulation, and Design Assigned on Friday, February 16, 2018 Due on Friday, February 23, 2018, by 11:00am sharp in class Homework submitted after 11:00am is subject to a penalty of 2 points per minute late. Reading: Johnson, Sethares and Klein, chapters 1, 2, 3 and 7, and Appendices A and F This assignment is intended to continue our review of key concepts from Linear Systems and Signals, and introduce the simulation and design of discrete-time linear time-invariant filters. Here are key sections from Lathi s Linear Systems and Signals book (2 nd ed), Oppenheim & Willsky s Signals and Systems book (2 nd ed) and McClellan, Schafer and Yoder s Signal Processing First (1 st ed) with respect to material in EE 445S: O&W Lathi SPFirst Topic 1.6 1.7 5-5 & 9-4 System properties 1.3 1.4 1.4 2-3, 2-5, 4-4, 9-1 Basic continuous-time signals 3.2 ## 2.4-4 10-1 Fundamental theorem of continuous-time linear systems** 1.3 1.4 3.3 4-2.1, 5-3.2 Basic discrete-time signals 3.2 ## 3.8-3 6-1 Fundamental theorem of discrete-time linear systems** 9.7.2 2.6 16-8.3 Stability of continuous-time filters 10.7.2 3.10 8-2.4, 8-4.2, 8-8 Stability of discrete-time filters 10.1 10.3 5.1 7-1 & 7-2 Z transforms 10.5 5.2 7-3 7-5 Properties of the z-transform 10.7.3/4 5.3 8-3, 8-4, 8-9 Transfer functions 10.8 5.4 5-4, 8-9 Realizations of transfer functions 4.3 4.4 7.3 11-4 11-8 Fourier transform properties 7.1 8.1 4-1, 4-2, 4-5 Sampling theorem ** Please see Appendix F and slide 5-13 in the course reader for the fundamental theorem. ## O&W covers a slightly different version of the fundamental theorem in which a complex exponential is the input to a linear time-invariant system. Lathi also has that version as well. Other signals and systems textbooks should contain equivalent material. You may use any computer program to help you solve these problems, check answers, etc. Please submit any MATLAB code that you have written for the homework solution. In the course reader, Appendix D gives a brief introduction to MATLAB. The MATLAB code in the Johnson, Sethares and Klein book also runs in LabVIEW Mathscript and GNU Octave. As stated on the course descriptor, Discussion of homework questions is encouraged. Please be sure to submit your own independent homework solution.

Office hours for the teaching assistants and Prof. ; bold indicates a 30-minute timeslot. Time Slot Monday Tuesday Wednesday Thursday Friday 10:00 am 11:00 am 12:00 pm (EER cafe) 1:00 pm (EER cafe) 2:00 pm 3:00 pm 3:30 pm Choo 4:00 pm Choo 4:30 pm Choo Choo 5:00 pm Choo Kanawati 5:30 pm Choo Kanawati 6:00 pm Kanawati 6:30 pm Kanawati 7:00 pm Kanawati 7:30 pm Kanawati NOTE: In your solutions, please put all work for problem 1 together, then all work for problem 2 together, etc. Please read homework hints at http://users.ece.utexas.edu/~bevans/courses/realtime/homework 2.1. Frequency Responses. 24 points. For each LTI system in problem 1.1 on homework assignment #1, a) plot the pole-zero diagram for the transfer function. 3 points. b) is the filter bounded-input bounded-output (BIBO) stable? why or why not? 3 points. c) give a formula for the frequency response. 9 points. d) plot the magnitude response. 6 points. e) if the system is BIBO stable, pick the best one of the following choices to describe the frequency selectivity of the filter: lowpass, highpass, bandpass, or bandstop. 3 points. You may use the solution set for problem 1.1 in your solution for this problem.

2.2. Finite Impulse Response Filter Design for Audio Signals. 30 points. This problem explores ways to process audio signals. Please download the audio wave file twosignals.wav from the homework Web site: http://users.ece.utexas.edu/~bevans/courses/realtime/homework/twosignals.wav This audio file is the sum of two audio signals a gong sound and a bird chirping. The gong sound and the bird chirping occupy different frequency bands. The gong sound is different from the gong file from the Johnson, Sethares and Klein book. (a) Plot the spectrum of the twosignals audio track using plotspec and spectrogram. Approximately what frequency band does the gong sound occupy? Approximately what frequency band does the bird chirp occupy? (b) Design an FIR filter using the Parks-McClellan algorithm (a.k.a. Remez Exchange algorithm and Equiripple design algorithm) to extract the gong signal from the twosignals audio track. Then, apply the filter to the twosignals audio track, play back the filter output to validate that the gong signal has been extracted, and plot the filter output using plotspec. (c) Design an FIR filter using the Parks-McClellan algorithm (a.k.a. Remez Exchange algorithm and Equiripple design algorithm) to extract the bird chirp from the twosignals audio track. Then, apply the filter to the twosignals audio track, play back the filter output to validate that the gong signal has been extracted, and plot the filter output using plotspec. (d) Take the extracted gong signal in part (b) and perform downsampling by 2. Downsampling by 2 keeps every other sample and discards the others. Here s Matlab code for downsampling a vector vec by 2: vecdownsampledby2 = vec(1:2:length(vec)); Play the downsampled filtered gong signal at the same playback rate as the filtered gong signal. How does it differ from the gong signal extracted in part (b)? Plot the magnitude spectrum of the downsampled filtered gong signal and compare it against the magnitude spectrum of the gong extracted in part (b). (e) Take the extracted gong signal in part (b) and perform upsampling by 2. Upsampling by 2 inserts zero after every sample. Here s Matlab code for upampling row vector vec by 2: vec = cumsum( ones(1,10) ); upsampledlength = 2*length(vec); vecupsampledby2 = zeros(1,upsampledlength); vecupsampledby2(1:2:upsampledlength) = vec; Play the upsampled filtered gong signal at the same playback rate as the filtered gong signal. How does it differ from the gong signal extracted in part (b)? Plot the magnitude spectrum of the upsampled filtered gong signal and compare it against the magnitude spectrum of the gong extracted in part (b). For the sanity of others, you might put in a pair of headphones when working this problem. The firpm command stands for finite impulse response design using the Parks-McClellan algorithm. The Parks-McClellan algorithm was proposed by James McClellan in his 1973 PhD dissertation, which he completed at Rice University under the research supervision of Thomas Parks. James

McClellan lived in Austin 1981-1987. Since 1987, James McClellan has been a faculty member at Georgia Tech. Thomas Parks retired from the faculty at Cornell University several years ago. Downsampling is the removal of samples in a regular fashion. The problem uses downsampling by 2. The first sample and every other sample thereafter is kept, and hence, the second sample and every other sample thereafter is removed. Downsampling by would halve the number of samples. Upsampling is the addition of samples in a regular fashion. After every sample in a signal, upsampling by 2 would add a sample of value zero. Upsampling by 2 would double the number of samples. After midterm #1, we'll make heavy use of upsampling in a communications transmitter and downsampling in a communications receiver. 2.3. Finite Impulse Response (FIR) Filter Design for Treatment of Tinnitus Loudness. 46 points. Tinnitus, a.k.a. ringing of the ears, is a symptom due to an underlying condition in the auditory system. People with tinnitus hear a tone, clicking, hiss, roaring or buzzing when no external sound is present [1][2]. The tinnitus sound can be at low, medium or high audible frequencies, and may occur in one ear or both ears. The tinnitus sound might be temporary or chronic. Those suffering from chronic tinnitus would hear the same sound in the same frequency range each time. This problem asks you to design a discrete-time filter to alleviate the loudness of tinnitus: "Maladaptive auditory cortex reorganization may contribute to the generation and maintenance of tinnitus. Because cortical organization can be modified by behavioral training, we attempted to reduce tinnitus loudness by exposing chronic tinnitus patients to self-chosen, enjoyable music, which was modified ( notched ) to contain no energy in the frequency range surrounding the individual tinnitus frequency. After 12 months of regular listening, the target patient group (n = 8) showed significantly reduced subjective tinnitus loudness and concomitantly exhibited reduced evoked activity in auditory cortex areas corresponding to the tinnitus frequency compared to patients who had received an analogous placebo notched music treatment (n = 8). These findings indicate that tinnitus loudness can be significantly diminished by an enjoyable, low-cost, custom-tailored notched music treatment, potentially via reversing maladaptive auditory cortex reorganization. [3] The proposed treatment for tinnitus [3] alters participants' favorite music to remove an octave of frequencies around the tinnitus frequency f c. An octave means a range of frequencies from f 1 to 2 f 1. Since f c would be in the middle of the octave, f 1 = (2/3) f c. After 12 months of listening to the filtered music, patients reported lessening of tinnitus loudness. A good rule of thumb in filter design is that the transition region is about 10% of the passband width. In this case, the passband width is (2/3) f c. Here are the bandstop filter specifications for your design: For frequencies 0 Hz to 0.6 f c, the passband ripple should be no greater than 1 db. For frequencies (2/3) f c to (4/3) f c, the stopband attenuation should be at least 80 db. For frequencies above 1.4 f c, the passband ripple should be no greater than 1 db Please use a tinnitus frequency f c of 3000 Hz and a sampling rate f s of 44100 Hz. (a) Design FIR filters with the minimum filter order to meet the specification by using the Equiripple, Least Squares, and Kaiser Window design methods. FIR equiripple design is also known by many other names: Parks-McClellan, Remez Exchange and Chebyshev Design. Please submit a plot of

the magnitude and phase response for each filter design. Validate that each filter design meets the filter specifications. Please see the hints below. 27 points. (b) Plot the impulse response of the FIR filter designed by the Parks-McClellan (Remez) algorithm. What symmetry is in the impulse response? 7 points. (c) Give the filter lengths required for filters designed for each filter design method. Which method gives the shortest filter length? 6 points. (d) Analyze the implementation complexity of each FIR filter design: 1) How many multiplication operations are needed? 3 points 2) How much memory (in words) would it take to store the FIR coefficients and the circular buffer for the current and past inputs? 3 points Feel free to use Matlab, LabVIEW, or any other computer software on this problem. In Matlab, I d recommend using the filter design and analysis tool, fdatool. This tool is particularly useful when exploring different filter structures for implementation. If you type help fdatool in Matlab, then you will see how to retrieve the transfer function for the current filter being designed. LabVIEW has several filter design demonstrations in the filter design toolkit, e.g. Advanced Remez FIR Design. Hints for Part (a) For FIR filters, the filter length is the filter order plus one. That is, the filter order is the number of zeros, and the filter length is the number of coefficients. In all three FIR filter design algorithms, you will likely have to search for the design with minimum filter order. By looking at the plots of the magnitude responses, validate that the filters designed meet the specifications. In particular, carefully inspect the magnitude response in the stopband. In making sure that each filter design meets specifications, be sure to check the graphical views of the passband and stopband, i.e. zoom in on the magnitude response near the passband frequency and near the stopband frequency. For example, the FIR Least Squares method commonly misses the stopband specification. If you are not absolutely sure from visually inspecting the magnitude response, then you can compute the magnitude response is at a particular frequency using the freqz function in Matlab. The arguments are the filter transfer function (type help fdatool to find out how to obtain the transfer function of the current design) and the frequency in Hz. Then, you can take the magnitude of the result. Finally, you'll need to convert the magnitude to db using 20 log 10 magnitude When the filter design does not meet specification, one can adjust the filter parameters entered in design tool gradually until the filter design meets specification. In particular, one can increase the stopband attenuation value for Parks-McClellan and Kaiser window design methods and decrease the stopband frequency for the FIR Least Squares method. References [1] R. A. Levine and Y. Oron, "Tinnitus", Handbook of Clinical Neurology, vol. 129, pp. 409 431, 2015. doi:10.1016/b978-0-444-62630-1.00023-8. [2] "Tinnitus". December 16, 2016. Retrieved February 17, 2017. [3] H. Okamoto, H. Stracke, W. Stoll and C. Pantev, "Listening to tailor-made notched music reduces tinnitus loudness and tinnitus-related auditory cortex activity", Proceedings US National Academy of Sciences, vol. 17, no. 3, pp. 1207-1210, 2010.