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

Similar documents
Spring 2018 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

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

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

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

(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 Midterm #2

EE 422G - Signals and Systems Laboratory

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

Brief Introduction to Signals & Systems. Phani Chavali

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

EE 470 Signals and Systems

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

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

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

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

A Lower Transition Width FIR Filter & its Noise Removal Performance on an ECG Signal

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

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

ELEC-C5230 Digitaalisen signaalinkäsittelyn perusteet

ECE 4213/5213 Homework 10

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

Lab 8: Frequency Response and Filtering

Designing Filters Using the NI LabVIEW Digital Filter Design Toolkit

Project I: Phase Tracking and Baud Timing Correction Systems

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

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

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

Design of FIR Filters

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

INTEGRATED APPROACH TO ECG SIGNAL PROCESSING

4. Design of Discrete-Time Filters

ECE 429 / 529 Digital Signal Processing

Digital Filtering: Realization

Digital Filters FIR and IIR Systems

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

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

Biosignal filtering and artifact rejection. Biosignal processing I, S Autumn 2017

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

Experiment 2 Effects of Filtering

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

Electrical & Computer Engineering Technology

Biosignal filtering and artifact rejection. Biosignal processing, S Autumn 2012

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

Filtration Of Artifacts In ECG Signal Using Rectangular Window-Based Digital Filters

ELEC3104: Digital Signal Processing Session 1, 2013

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

Multirate DSP, part 1: Upsampling and downsampling

Understanding Digital Signal Processing

NOISE REDUCTION TECHNIQUES IN ECG USING DIFFERENT METHODS Prof. Kunal Patil 1, Prof. Rajendra Desale 2, Prof. Yogesh Ravandle 3

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

George Mason University ECE 201: Introduction to Signal Analysis Spring 2017

Florida International University

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

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

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

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

APPENDIX A to VOLUME A1 TIMS FILTER RESPONSES

Interpolated Lowpass FIR Filters

PROCESSING ECG SIGNAL WITH KAISER WINDOW- BASED FIR DIGITAL FILTERS

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

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

Filters. Phani Chavali

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

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

Multirate Digital Signal Processing

Signal Processing Toolbox

Improving ECG Signal using Nuttall Window-Based FIR Filter

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

ECE 203 LAB 2 PRACTICAL FILTER DESIGN & IMPLEMENTATION

UNIVERSITY OF CALGARY DEPARTMENT OF ELECTRICAL & COMPUTER ENGINEERING BIOMEDICAL SIGNAL ANALYSIS ENEL 563

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

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

HIGH FREQUENCY FILTERING OF 24-HOUR HEART RATE DATA

Design of infinite impulse response (IIR) bandpass filter structure using particle swarm optimization

Lecture 3, Multirate Signal Processing

Experiment 4- Finite Impulse Response Filters

Frequency-Response Masking FIR Filters

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

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

ASN Filter Designer Professional/Lite Getting Started Guide

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

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

Noise Reduction Technique for ECG Signals Using Adaptive Filters

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

EEM478-DSPHARDWARE. WEEK12:FIR & IIR Filter Design

Linear Time-Invariant Systems

Design of a Sharp Linear-Phase FIR Filter Using the α-scaled Sampling Kernel

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

Designing and Implementation of Digital Filter for Power line Interference Suppression

Signals and Systems Using MATLAB

Concordia University. Discrete-Time Signal Processing. Lab Manual (ELEC442) Dr. Wei-Ping Zhu

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

The Filter Wizard issue 13: Buenos Notches! The Filter Wizard versus the vuvuzela Kendall Castor-Perry

A Finite Impulse Response (FIR) Filtering Technique for Enhancement of Electroencephalographic (EEG) Signal

COMPARISON OF VARIOUS FILTERING TECHNIQUES USED FOR REMOVING HIGH FREQUENCY NOISE IN ECG SIGNAL

Optimal FIR filters Analysis using Matlab

Enhancing Electrocadiographic Signal Processing Using Sine- Windowed Filtering Technique

Transcription:

Spring 2014 EE 445S Real-Time Digital Signal Processing Laboratory Prof. Homework #2 Filter Analysis, Simulation, and Design Assigned on Saturday, February 8, 2014 Due on Monday, February 17, 2014, 11:00am sharp in class Homework submitted after 11:00am will be 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) and Oppenheim & Willsky s Signals and Systems book (2 nd ed) with respect to material in EE 445S: O&W Lathi Topic 1.6 1.7 System properties 1.3 1.4 1.4 Basic continuous-time signals 3.2 ## 2.4-4 Fundamental theorem for continuous-time linear systems ** 1.3 1.4 3.3 Basic discrete-time signals 3.2 ## 3.8-3 Fundamental theorem for discrete-time linear systems ** 9.7.2 2.6 Stability of continuous-time filters 10.7.2 3.10 Stability of discrete-time filters 10.1 10.3 5.1 Z transforms 10.5 5.2 Properties of the z-transform 10.7.3 10.7.4 5.3 Transfer functions 10.8 5.4 Realizations of transfer functions 4.3 4.4 7.3 Fourier transform properties 7.1 8.1 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 9:30 am Jia 10:00 am Jia 10:30 am 11:00 am 12:00 pm 12:30 pm 1:00 pm 2:00 pm 2:30 pm 3:00 pm Sinno 3:30 pm Sinno 4:00 pm Sinno Jia Jia 4:30 pm Jia 5:00 pm Jia 5:30 pm Sinno 6:00 pm Sinno 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 for problem 1.1 in your solution for this problem. If you do, please cite the solution set for homework #1 as needed. Please read the homework hints that are available on the homework Web page. 2.2. Finite Impulse Response Filter Design for Audio Signals. 30 points. Johnson, Sethares & Klein, exercise 7.21, on page 149. Complete all parts. Please use a lowpass filter in part (a). In addition, please complete the following additional part: (e) Take the filtered gong signal from (b) and perform downsampling by 2. Downsampling by 2 keeps every other sample and discards the rest. Here s Matlab code for downsampling 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 filtered gong signal? Plot the magnitude spectrum of the downsampled filtered gong signal and compare it against the magnitude spectrum of the filtered going signal. Please submit your Matlab code and the plots with your homework solution. 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 Spring Break, we'll make heavy use of upsampling in a communications transmitter and downsampling in a communications receiver. Please read the homework hints that are available on the homework Web page. 2.3. Finite Impulse Response (FIR) Filter Design for an ECG Device. 46 points. This problem asks you to design a discrete-time filter for an electrocardiogram signal. "An electrocardiogram (ECG) device monitors the cardiac status of a patient by recording the heart s electrical potential versus time. Such devices play a very important role to save life of patients who survive heart attack or suffer from serious heart diseases. The time to respond to a heart attack is very critical for these patients. An early detection of conditions that lead to the onset of cardiac arrest

allows doctors to provide proper treatment on time and prevents death or disability from cardiac arrest." [1] "There exist three types of noise that contaminate the ECG signal: the baseline wander noise (BW), electromyographic interference (EMG), and the power line interference. The BW is induced by electrodes changes due to perspiration, movement and respiration, and is typically below 0.5 Hz. The power line interference [is] either 50 Hz or 60 Hz and its harmonics are a significant source of noise." [1] EMG noise appears in the same frequencies as the ECG signal. Our goal in designing the filter is to attenuate (reduce) the baseline wander noise and powerline interference. It would take sophisticated processing to track and cancel the EMG noise. Here are the bandpass filter specifications for your design: For frequencies 0 Hz to 1 Hz, the stopband attenuation should be at least 40 db. For frequencies 6 Hz to 40 Hz, the passband ripple should be no greater than 1 db. For frequencies above 45 Hz, the stopband attenuation should be at least 40 db. These specifications would be compatible with the monitor mode in modern ECG monitors. Please use a sampling rate of 200 Hz. From a quick sampling of commercial ECG systems, I found sampling rates that vary from 100 Hz to 1000 Hz. The PTB Diagnostic ECG Database uses a sampling rate of 1000 Hz and the QT ECG Database uses a sampling rate of 250 Hz. (a) Design FIR filters with the minimum filter order to meet the specification by using the Parks- McClellan (Remez), FIR Least Squares (FIRLS), and Kaiser Window design methods. Turn in a plot of the magnitude and phase response for each filter. 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 For lowpass filter design, a common rule-of-thumb is that the distance from the passband frequency to the stopband frequency should be at least 10% of passband bandwidth. The same rule-of-thumb can be applied to bandpass filter design. In the above bandpass filter design specification, each transition band is 5 Hz which is slightly more than 10% of the passband bandwidth of 34 Hz. 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. Please read additional homework hints that are available on the homework Web page. References [1] Yong Lian and Jianghong Yu, "A Low Power Linear Phase Digital FIR Filter for Wearable ECG Device", Proc. IEEE International Conference on Engineering in Medicine and Biology Society, pp. 7357-7360, 2005. [2] "LabVIEW for ECG Signal Processing", http://zone.ni.com/devzone/cda/tut/p/id/6349.