Removing 60 Hz from EKG signal William Rose, May 2009 Original EKG signal looked good on paient monitor but had very small amplitude (+- 4 bits) at the.

Slides:



Advertisements
Similar presentations
Design of Digital IIR Filter
Advertisements

Image Enhancement in the Frequency Domain (2)
FilteringComputational Geophysics and Data Analysis 1 Filtering Geophysical Data: Be careful!  Filtering: basic concepts  Seismogram examples, high-low-bandpass.
Active Filters: concepts All input signals are composed of sinusoidal components of various frequencies, amplitudes and phases. If we are interested in.
Nonrecursive Digital Filters
Lecture 23 Filters Hung-yi Lee.
EE513 Audio Signals and Systems Digital Signal Processing (Synthesis) Kevin D. Donohue Electrical and Computer Engineering University of Kentucky.
IIR FILTERS DESIGN BY POLE-ZERO PLACEMENT
Digital Filters. Filters Filters shape the frequency spectrum of a sound signal. Filters shape the frequency spectrum of a sound signal. –Filters generally.
Chap 4 Image Enhancement in the Frequency Domain.
Frequency Response and Filter Design By Poles and Zeros Positioning Dr. Mohamed Bingabr University of Central Oklahoma Slides For Lathi’s Textbook Provided.
Filtering Filtering is one of the most widely used complex signal processing operations The system implementing this operation is called a filter A filter.
Analog-to-digital Conversion and Digital-to-analog Conversion (with DSP) ES-3.
So far We have introduced the Z transform
Principals of Digital Signal Recording. How do we represent a continuously variable signal digitally? Sampling – Sampling rate – number of measurements.
Sampling and quantization Seminary 2. Problem 2.1 Typical errors in reconstruction: Leaking and aliasing We have a transmission system with f s =8 kHz.
Overview of Adaptive Multi-Rate Narrow Band (AMR-NB) Speech Codec
CHAPTER 4 Image Enhancement in Frequency Domain
Professor: Dr Kepuska Presented by Kyle Farnum. Audio Manipulation through utilizing three types of filters: Low-pass filters Band- pass filters High-
Advanced Operational Amplifier applications
EE313 Linear Systems and Signals Fall 2010 Initial conversion of content to PowerPoint by Dr. Wade C. Schwartzkopf Prof. Brian L. Evans Dept. of Electrical.
Lecture 29 Review: Frequency response Frequency response examples Frequency response plots & signal spectra Filters Related educational materials: –Chapter.
Introduction to Frequency Selective Circuits
Over-Sampling and Multi-Rate DSP Systems
EE513 Audio Signals and Systems Digital Signal Processing (Systems) Kevin D. Donohue Electrical and Computer Engineering University of Kentucky.
Ni.com Data Analysis: Time and Frequency Domain. ni.com Typical Data Acquisition System.
Vibrationdata 1 Unit 19 Digital Filtering (plus some seismology)
General Engineering Polytechnic University Laboratory 9: Electrical Filters.
AM modulation essentially consists of the TD multiplication of the modulating signal by a cosine carrier. In the FD, AM modulation effected a frequency.
MATLAB for Signal Processing The MathWorks Inc. Natick, MA USA Filter Design.
Filtering. What Is Filtering? n Filtering is spectral shaping. n A filter changes the spectrum of a signal by emphasizing or de-emphasizing certain frequency.
Digital Filters. Filters Filters shape the frequency spectrum of a sound signal. –Filters generally do not add frequency components to a signal that are.
Laboratory 9: Electronic Filters. Overview Objectives Background Materials Procedure Report / Presentation Closing.
Quiz 1 Review. Analog Synthesis Overview Sound is created by controlling electrical current within synthesizer, and amplifying result. Basic components:
Laboratory 10: Electronic Filters. Overview  Objectives  Background  Materials  Procedure  Report / Presentation  Closing.
Measurements & Electrical Analog Devices (Part 2).
1 Conditions for Distortionless Transmission Transmission is said to be distortion less if the input and output have identical wave shapes within a multiplicative.
Practical Image Processing1 Chap7 Image Transformation  Image and Transformed image Spatial  Transformed domain Transformation.
1 Prof. Nizamettin AYDIN Digital Signal Processing.
Feedback Filters n A feedback filter processes past output samples, as well as current input samples: n Feedback filters create peaks (poles or resonances)
Filtering x y.
UCLA IEEE NATCAR 2004 SUMMER CLASS Magnetic Sensors & Power Regulation.
Copyright ©2010, ©1999, ©1989 by Pearson Education, Inc. All rights reserved. Discrete-Time Signal Processing, Third Edition Alan V. Oppenheim Ronald W.
ELEC 202 Circuit Analysis II
Data QC and filtering Bryce HutchinsonSumit Verma Objective: Consider the frequency range of different seismic features Look for low frequency and high.
Musical Sculpture A Final Project Block Diagram Presentation by: Clare Davis, Chen Li, & Austyn Hill.
Digital Signal Processing Lecture 6 Frequency Selective Filters
Fletcher’s band-widening experiment (1940) Present a pure tone in the presence of a broadband noise. Present a pure tone in the presence of a broadband.
1 BIEN425 – Lecture 12 By the end of the lecture, you should be able to: –Design and implement IIR filters using zero-pole placement.
Date of download: 6/2/2016 Copyright © 2016 SPIE. All rights reserved. Dye ring laser control, spectroscopic, and locking feedback system showing overlapping,
Series & Parallel Resonance Passive Filter
Electronic Devices Ninth Edition Floyd Chapter 15.
Figure 8.1 (p. 615) Time-domain condition for distortionless transmission of a signal through a linear time-invariant system. Signals and Systems, 2/E.
Fletcher’s band-widening experiment (1940)
(plus some seismology)
EEE4176 Applications of Digital Signal Processing
Speech Signal Processing
Vocoders.
Adaptive Filters Common filter design methods assume that the characteristics of the signal remain constant in time. However, when the signal characteristics.
Electric Circuits Chapter 7 Network Frequency Characteristics
Filtering Geophysical Data: Be careful!
1 Vocoders. 2 The Channel Vocoder (analyzer) : The channel vocoder employs a bank of bandpass filters,  Each having a bandwidth between 100 HZ and 300.
LINEAR-PHASE FIR FILTERS DESIGN
Lecture 14 Digital Filtering of Analog Signals
Lab 5 Part II Instructions
Quantization in Implementing Systems
Lecture 2: Frequency & Time Domains presented by David Shires
(plus some seismology)
Uses of filters To remove unwanted components in a signal
Lecture 4 Image Enhancement in Frequency Domain
Presentation transcript:

Removing 60 Hz from EKG signal William Rose, May 2009 Original EKG signal looked good on paient monitor but had very small amplitude (+- 4 bits) at the A-to-D board, due to partial short in connecting cable (discovered later). Problem was not recognized at the time because EKG recorded by A-to-D board was not displayed. Now EKG recorded on computer is displayed in real time, so that in the future a similar problem will likely be noticed and corrected.

bandstopfilt.vi, aecg_10sec.txt EKG for 10 sec, unfiltered. Noise is large compared to the R waves, preventing triggering. EKG for 0.5 sec, unfiltered. Notice periodic signal and level quantization due to small amplitude.

Presence of a distinct frequency in the data suggests that a band stop (notch) filter may be useful. Band stop filters characterized by  Center frequency (Hz)  Bandwidth (Hz) (half width)  Number of poles Labview and Matlab filter functions want high and low frequencies instead of center frequency and half width.

bandstopfilt.vi Most code inside a while loop. Before entering loop: Get file name, read in data, get sampling rate. Inside the loop, program continually re-filters, re-plots, and checks to see if f co, f halfwidth, or number of poles have changed. When while loop is done, program writes data to a file if requested. Filtering Butterworth Coefficients.vi Cascade to Direct Coefficients.vi Zero Phase Filter.vi Instead of (Butterworth Filter.vi, Reverse 1D Array.vi) two times

bandstopfilt.vi Butterworth Coefficients.vi gives filter coefficients in cascade form (2 nd order sections for low- and high-pass filters; 4 th order sections for band pass and band stop filters). High order filters generally perform better if implemented in cascade form than if implemented in direct form, because they are less sensitive to quantization errors in the coefficients. However, Zero Phase Filter.vi needs direct form. Direct form looks like this: Y k = b 0 X k + b 1 X k-1 + b 2 X k-2 + b 3 X k-3 + b 4 X k-4 + … - a 1 Y k-1 –a 2 Y k-2 –a 3 Y k-3 –a 4 Y k-4 – … a’s are the reverse coefficients b’s are the forward coefficients

Block diagram of bandstopfilt.vi

Front panel of bandstopfilt.vi aecg_10sec.txt Top: black dots=original, red line=filtered Middle: Power spectrum of original signal. Note logarithmic Y-axis scale and power at 60, 120, 180… Hz. (The 60 Hz noise is not a pure sinusoid, so it has power at harmonics of 60.) Bottom: Power spectrum of filtered signal. Note notch at 60 Hz.

bandstopfilt.vi. Tests done with input = aecg_10sec.txt; f cutoff =60 Hz Change filter width while keeping number of poles fixed: (f halfwidth, # poles) = (1 Hz, 4); (5 Hz, 4); (10 Hz, 4). Change number of poles while keeping width fixed: (f halfwidth, # poles) = (10 Hz, 1); (10 Hz, 4); (10 Hz, 8). Results: “Signal to noise” (size of QRS /size of background noise) changes little, even though power spectrum notches change. Tests done with white noise input: uniformrandoms.txt; f co =60 Hz (f halfwidth, # poles) = (1Hz, 4); (5 Hz, 4); (10 Hz, 4); (10 Hz, 8). Results: Some combinations resulted in unstable filters, manifested as an output signal which was orders of magnitude too large: (f halfwidth, # poles) = (5 Hz, 7); (5 Hz, 8); (10 Hz, 8); (10 Hz, 9).

bandstopfilt+harmonics.vi. Add filters at the harmonics: multiples of center frequency. Test with a white noise signal: input=uniformrandoms.txt; f cutoff =60Hz. (f halfwidth, # poles) = (3 Hz, 1); (5 Hz, 4); (10 Hz, 8). Input = aecg_10sec.txt; f cutoff =60 Hz. (f halfwidth, # poles) = (3 Hz, 1); (5 Hz, 4); (10 Hz, 8). “Signal to noise” (size of QRS /size of background noise) is somewhat better with filtering at 60 Hz and its harmonics than with filtering at 60 Hz only.

Block diagram of bandstopfilt+harmonics.vi

sample_compare.jpg Comparison of raw signal with output from bandstopfilt.vi and bandstopfilt+harmonics.vi Top: aecg.txt unfiltered. Middle: bandstopfilt, f co =60 Hz, f hw =5 Hz, order=4 (each way). Bottom: bandstopfilt+harmonics, f co =60 Hz, f hw =5 Hz, order=4 (each way).

bandstopfilt+harmonics+lowpass.vi. Add an optional 4 th order Butterworth lowpass filter (forward plus backward to give zero phase) to the bandpass filters. Input = aecg_10sec.txt f co = 60 Hz, f hw = 20 Hz, order (each way) = 4. f lp = 200 Hz “Signal to noise” (size of QRS /size of background noise) is somewhat better with than without the lowpass filter at 200 Hz.

Front panel of bandstopfilt+harmonics +lowpass.vi

Block diagram of bandstopfilt+harmonics +lowpass.vi