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

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

Biosignal filtering and artifact rejection, Part II. Biosignal processing, S Autumn 2017

Digital Filtering: Realization

CG401 Advanced Signal Processing. Dr Stuart Lawson Room A330 Tel: January 2003

HIGH FREQUENCY FILTERING OF 24-HOUR HEART RATE DATA

4. Design of Discrete-Time Filters

Noise Reduction Technique for ECG Signals Using Adaptive Filters

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

Lecture 4 Biosignal Processing. Digital Signal Processing and Analysis in Biomedical Systems

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


Frequency-Response Masking FIR Filters

Experiment 2 Effects of Filtering

Part One. Efficient Digital Filters COPYRIGHTED MATERIAL

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

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

Noureddine Mansour Department of Chemical Engineering, College of Engineering, University of Bahrain, POBox 32038, Bahrain

Signal segmentation and waveform characterization. Biosignal processing, S Autumn 2012

Biomedical Instrumentation B2. Dealing with noise

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

Application of Interference Canceller in Bioelectricity Signal Disposing

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

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

Copyright S. K. Mitra

Infinite Impulse Response (IIR) Filter. Ikhwannul Kholis, ST., MT. Universitas 17 Agustus 1945 Jakarta

ELEC-C5230 Digitaalisen signaalinkäsittelyn perusteet

Experiment 4- Finite Impulse Response Filters

PHYS225 Lecture 15. Electronic Circuits

Final Exam Solutions June 14, 2006

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

Digital Processing of

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

HARDWARE IMPLEMENTATION OF LOCK-IN AMPLIFIER FOR NOISY SIGNALS

A SIMPLE APPROACH TO DESIGN LINEAR PHASE IIR FILTERS

MULTIRATE DIGITAL SIGNAL PROCESSING

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

ECE 203 LAB 2 PRACTICAL FILTER DESIGN & IMPLEMENTATION

F I R Filter (Finite Impulse Response)

Digital Processing of Continuous-Time Signals

Changing the sampling rate

INTEGRATED APPROACH TO ECG SIGNAL PROCESSING

Digital Signal Processing. VO Embedded Systems Engineering Armin Wasicek WS 2009/10

NOISE ESTIMATION IN A SINGLE CHANNEL

(i) Understanding the basic concepts of signal modeling, correlation, maximum likelihood estimation, least squares and iterative numerical methods

6.555 Lab1: The Electrocardiogram

Design of FIR Filters

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

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

Optimal FIR filters Analysis using Matlab

Fundamentals of Time- and Frequency-Domain Analysis of Signal-Averaged Electrocardiograms R. Martin Arthur, PhD

Understanding Digital Signal Processing

BME/ECE 463. Computers in Medicine. Answers to Selected Textbook Problems

Keysight Technologies Pulsed Antenna Measurements Using PNA Network Analyzers

Analog Lowpass Filter Specifications

DIGITAL FINITE IMPULSE RESPONSE NOTCH FILTER WITH NON-ZERO INITIAL CONDITIONS, BASED ON AN INFINITE IMPULSE RESPONSE PROTOTYPE FILTER

Using the isppac 80 Programmable Lowpass Filter IC

EE247 - Lecture 2 Filters. EECS 247 Lecture 2: Filters 2005 H.K. Page 1. Administrative. Office hours for H.K. changed to:

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

Subtractive Synthesis. Describing a Filter. Filters. CMPT 468: Subtractive Synthesis

Signal processing preliminaries

Signal Processing Toolbox

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

4. K. W. Henderson, "Nomograph for Designing Elliptic-Function Filters," Proc. IRE, vol. 46, pp , 1958.

Equalizers. Contents: IIR or FIR for audio filtering? Shelving equalizers Peak equalizers

WEIGHTED median smoothers, which were introduced. A General Weighted Median Filter Structure Admitting Negative Weights

Digital Signal Processing

Implementation of Decimation Filter for Hearing Aid Application

IEEE TRANSACTIONS ON COMMUNICATIONS, VOL. 50, NO. 12, DECEMBER

EE247 Lecture 2. Butterworth Chebyshev I Chebyshev II Elliptic Bessel Group delay comparison example. EECS 247 Lecture 2: Filters

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

Classic Filters. Figure 1 Butterworth Filter. Chebyshev

CHAPTER -2 NOTCH FILTER DESIGN TECHNIQUES

Digital Filters - A Basic Primer

Signal Processing. Naureen Ghani. December 9, 2017

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

Analog and Telecommunication Electronics

Audio Restoration Based on DSP Tools

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

Developer Techniques Sessions

Infinite Impulse Response Filters

Noise removal example. Today s topic. Digital Signal Processing. Lecture 3. Application Specific Integrated Circuits for

Design Digital Non-Recursive FIR Filter by Using Exponential Window

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

Adaptive Filters Application of Linear Prediction

Signals and Filtering

Physiological Signal Processing Primer

Lab 8. Signal Analysis Using Matlab Simulink

Signals. Continuous valued or discrete valued Can the signal take any value or only discrete values?

Outline. Discrete time signals. Impulse sampling z-transform Frequency response Stability INF4420. Jørgen Andreas Michaelsen Spring / 37 2 / 37

Instruction Manual DFP2 Digital Filter Package

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

EE 6422 Adaptive Signal Processing

AUDIO SIEVING USING SIGNAL FILTERS

Digital Signal Processing

Digital Filters FIR and IIR Systems

Narrow-Band Interference Rejection in DS/CDMA Systems Using Adaptive (QRD-LSL)-Based Nonlinear ACM Interpolators

ASC-50. OPERATION MANUAL September 2001

ELEC3104: Digital Signal Processing Session 1, 2013

Analog and Telecommunication Electronics

Introduction (cont )

Transcription:

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

Motivation 1) Artifact removal: for example power line non-stationarity due to baseline variation muscle or eye movement artifacts in EEG or ECG Solution?: epoch rejection due to artifacts

Motivation 2) Enhancement of useful information bandpass filtering finding certain signal waveforms such as eye blins from EEG or QRS complexes from ECG smoothing for illustrative purposes

FIR Finite impulse response (FIR) filter Stable Simple to implement Linear phase response Symmetrical impulse response All frequencies have the same amount of delay no phase distortion y( n) N 1 0 H( z) h( ) x( n ) N 1 0 h( ) z

FIR structure Source: http://www.netrino.com/publications/glossary/filters.php

FIR 0.12 0.1 0.08 0.06 0.04 Magnitude (db) 50 0-50 -100 0 20 40 60 80 100 120 Frequency (Hz) 0.02 0-0.02-0.04 0 5 10 15 20 25 30 35 40 45 Phase (degrees) 0-200 -400-600 -800 0 20 40 60 80 100 120 Frequency (Hz) Lowpass filter, order 44 (N=45), positive symmetry. fs=256 Hz, Fp=13 Hz, Rp=4 db, Fs=19 Hz, Rs=38 db Characteristics: passband, transition band, stopband, ripple, attenuation, sampling frequency

IIR Infinite impulse response filters Feedbac system Normally fewer coefficients that with FIR Used for sharp cut-off (notch filters for example) Can become unstable or performance degrade if not designed with care Pole-zero diagram Nonlinear phase characteristics causes phase distortion altering harmonic relationhips frequency components have different time delays (often undesirable) M N M M N N z b z a z b b z z a z a a z H 1 0 1 1 1 1 0 1... 1... ) ( M N n y b n x a n x h n y 1 0 0 ) ( ) ( ) ( ) ( ) (

Source: http://www.triplecorrelation.com/courses/fundsp/iiroverview.pdf

Smoothing: averaging filter Average of sliding window of size N samples FIR filter y( n) 1 N N 1 0 x( n )

Smoothing: Hanning filter H( z) 1 [1 4 2z z 1 2 ]

Smoothing: Butterworth lowpass filtering Butterworth lowpass filter - Select suitable order and cutoff frequency

Synchronized averaging Filter noise by averaging several signals containing the same events Often simple/complex pulses Signals must first be time-synchronized Averaging of flash visual ERP s from EEG

Notch/comb filter Often used for 50/60 Hz power line artifact filtering Narrow stop-band in basic and harmonic frequencies Be careful with the aliased harmonics Can be implemented as FIR or IIR Ruha et al. (1997)

Notch/comb filter Original signal Filtering result

Trend removal (detrending) High-pass filtering time-domain: difference filter frequency-domain: DFT Trend removal with other methods Savitzy-Golay filter IPG-FMH (in-place growing FIR median hybrid)

Difference filtering, version 1 First-order difference operator: T=sampling interval 1 y( n) [ x( n) x( n 1)] T

Difference filtering, version 2 Modified first-order difference operator: - T=sampling interval - Additional pole inserted at zero frequency to steepen the y transition band 1 1 1 z H( z) 1 T 1 0.995z 1 ( n) [ x( n) x( n 1)] 0.995y( n 1) T

Detrending: Butterworth highpass filter Select suitable order and cutoff frequency

Savitzy-Golay filter S-G filters are called polynomial or leastsquares smoothing filters Fits a polynomial of given degree optimally to a signal window In a sliding time window (frame), a polynomial curve is fitted to signal, and its middle value in the frame is taen as a smoothened value Decomposes the signal into a trend signal and residual signal The trend component can be interpreted as the useful signal component or the noise component, depending on the application Can be realized as a fast FIR filter 4 2 0-2 ORIGINAL -4 0 200 400 600 800 1000 1200 1400 1600 1800 2000 POLYNOMIAL ORDER 3, FRAME SIZE 21 4 2 0-2 -4 0 200 400 600 800 1000 1200 1400 1600 1800 2000 POLYNOMIAL ORDER 3, FRAME SIZE 41 4 2 0-2 -4 0 200 400 600 800 1000 1200 1400 1600 1800 2000

IPG-FMH In-place growing FIR-median hybrid filters (IPG-FMH) are based on median filtering and FIR-filtering Median filter: taes the median value within a signal window as filter output value Has robust nature against noise Pulses longer than root signal are detected reliably, shorter pulses are removed Suitable also for trend estimation of signals Preserves sharp edges in trend better than linear low-pass filter Attenuates wide-band noise effectively Wichman et al. (1990)

Wiener filtering Optimal filter that taes into account statistical characteristics of signal and noise processes Noise spectrum S and desired signal spectrum S d must be nown or estimated W ( ) 1 1 S ( ) S d ( )

LMS adaptive filtering (least mean square) Situation: an interfering signal component is summed to the actual biosignal Filter aims to subtract the interfering signal x from the noisy biosignal y The interference signal x is usually measured independently and simultaneously with another sensor device In an ideal situation, the interference signal x is identical to the interference component in y; only the amplitude and sign must be determined before subtraction (one filter weight is enough) Sometimes only a correlated version of the interference can be measured; the filter adapts the interference signal shape optimally to the interference signal component that appears in y (many filter weights are needed) Be careful with the possible delay between the interference signal and biosignal x e n 1 LMS, y w ( i) i0 (EOG) w ( 2 i 1) W x i wi elms, y (EEG+EOG) - x i e (EEG)

LMS adaptive filtering (least mean square) Based on steepest descent optimization algorithm, where the n filter weights are updated at every sample iteratively according to local gradients on error surface Learning rate parameter 0 < < 1/l max l max : largest eigenvalue of data correlation matrix should be adaptive if data is nonstationary Proper initialization of filter weights is important E.g., letting the filter adapt for a while without outputting anything (wors on-line) E.g., running filter bacwards in time to initialize (wors off-line) x e n 1 LMS, y w ( i) i0 (EOG) W x i y (EEG+EOG) - e (EEG) w i( 1) wi 2eLMS, x i

Example: removing respiration effects from heart rate data

Example: removing ocular artifacts from EEG 150 100 50 0-50 -100-150 1 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2 x 10 4 400 200 0-200 -400-600 1 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2 x 10 4 150 100 50 0-50 -100-150 1 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2 x 10 4

Adaptive filtering of ECG

Selected references Journal articles on two trend detectors Wichman R, Astola JT, Heinonen PJ, Neuvo YA (1990) FIR-Median Hybrid Filters with excellent transient response in noisy conditions. IEEE Trans. Acoust., Speech, Signal Processing 38:2108-2117. Original Savitsy-Golay paper: http://pubs.acs.org/cgibin/archive.cgi/ancham/1964/36/i08/pdf/ac60214a047.pdf Boos on signal processing basics Ifeachor EC, Jervis BW. Digital Signal Processing: A Practical Approach. Addison-Wesley, reprint 1996, pp. 279-287, 375-383, 550-551, 561-563, 697-706. Orfanidis, SJ. Introduction to Signal Processing. Prentice-Hall, Englewood Cliffs, NJ, 1996, pp. 434-441.