You are on page 1of 46

Artifact Detection and Removal

for In-Vivo Neural Signal



Presented By:
Md Kafiul Islam
A0080155M

Supervisor: Dr. Zhi Yang


Department of Electrical and Computer Engineering
National University of Singapore

20
th
Feb, 2013
Presented By Md Kafiul Islam
Outline
Introduction
Motivation
Artifact Characterizing: Its Types, Sources and Properties;
Dynamic range analysis
Literature Review
Proposed Method
Wavelet Transform Based Artifact Removal
Simulation Results
Comparison with Other Methods
Future Work
Real-time Implementation of Proposed Algorithm
Presented By Md Kafiul Islam
Motivation
Closed Loop Neural System for BCI or neural prosthetic Application
Presented By Md Kafiul Islam

Motivation

Presented By Md Kafiul Islam
Typical In-Vivo Neural Signal Processing Steps
Remove
50/60Hz
Noise
LPF @
200Hz
Offset
Remove
Smoothing Alignment
Under
Sampling
LFP
Data
Notch Filter
Field Potentials Recording
Artifact Detect &
Remove
HPF @
1Hz
BPF
(300Hz~5kHz)
Smoothing
Normalization
& Alignment
Spike
Data
Spike Detection
Spike Detection & Recording
Feature
Extraction
Classification
Compression
Motivation
In-vivo neural recording
Investigate brain information processing & data storage
Better Spatio-temporal resolution.
Better Signal-to-Noise Ratio (SNR).
The study of both LFP & Spikes along with their correlation: more insight on
how brain works.

Artifacts
Recordings corrupted by artifacts, especially in less constrained
environment.
Cause mistakes in interpretation of neural information.
Signal Preprocessing: Automatic Detection and Removal of Artifacts
The challenges for in-vivo artifact identification compare to EEG/MEG-
artifacts are:
No prior knowledge about artifacts unlike EEG-artifacts
The broad frequency band of in-vivo data (0.1 Hz 5 kHz) makes it difficult
to separate artifacts from signal



Presented By Md Kafiul Islam
Single-multi unit
What is Artifact!?
In neural recording, artifacts are interfering signals that originate
from some source other than the brain of interest.

In Vivo Recording of Spontaneous
Neural Activity of a freely moving rat




Offending artifacts may obscure, distort, or completely
misrepresent the true underlying recorded signal being observed.
Presented By Md Kafiul Islam
What is Artifact (Cont)
Local : localized in space, i.e. appear only in a single recording channel.
Global : across all the channels of an electrode at the same temporal window.
Irregular: only once in the whole recording sequence
Periodic: regular manner possibly due to some periodic motions of the subject.

Presented By Md Kafiul Islam
0 2 4 6 8 10
-10
-5
0
5


0 2 4 6 8 10
-10
-5
0
5


0 2 4 6 8 10
-10
-5
0
5
S
i
g
n
a
l

A
m
p
l
i
t
u
d
e
,

m
V


0 2 4 6 8 10
-5
0
5


0 2 4 6 8 10
-5
0
5


0 2 4 6 8 10
-4
-2
0
2


0 2 4 6 8 10
-4
-2
0
2
Time, Sec

0 2 4 6 8 10
-2
0
2


ch 1 ch 2
ch 4
ch 6
ch 3
ch 5
ch 7 ch 8
Global Artifacts
Irregular/Local Artifacts Periodic Artifacts
Perspective Artifact Category/Class
Repeatability Irregular/No Periodic/Regular/Yes
Origin Internal External
Appearance Local Global
Possible Artifact Sources
Artifacts may generate from 3 general factors :
i) Environmental factors (e.g. power noise, sound/optical interference, EM-coupling
from earth: 7.82 Hz and harmonics*, etc.)
ii) Experiment factors (e.g. electrode position altering, connecting wire
movement, etc. due to mainly subject motion )
iii) Physiological factors (e.g. EOG, ECG, EMG, BCG, etc.)



Presented By Md Kafiul Islam
Artifact Types
Presented By Md Kafiul Islam
(Identified by Empirical Observations Based on Real Neural Sequence, there could be
many other types as well)
Properties of Artifacts

Usually the artifacts have very large
magnitude compared to the neural data
of interest, i.e. spike and local field
potential.

The frequency range for artifact may
vary from very low (motion artifact) to
high frequency (artifact due to residue
charge) range.

Presented By Md Kafiul Islam
Local Field Potential => 0.1 Hz ~ 200 Hz, 0.1 ~ 1 mV
pp
Neural Spikes => 300 Hz ~ 5 kHz, 40 ~ 500 uV
pp
Artifacts => 0 ~ 10 kHz or even higher, max amplitude as high as
20 mV
pp
. (From real data observation)
Properties of Artifacts
(Comparison in Spectral Domain with Neural Signal of Interest)
Presented By Md Kafiul Islam
Problems with Artifacts
Can cause electronics saturation [1]
High dynamic range required (Higher ENOB in ADC) [2]
Mislead to spike detection (high freq) [3]
Misinterpretation for LFP recording(low freq) [4]

Presented By Md Kafiul Islam
260 265 270 275 280 285 290 295
-15
-10
-5
0
5
x 10
-4
Time, Second
V
o
l
t
a
g
e
,

V
o
l
t
260 265 270 275 280 285 290 295 300
-2. 5
-2
-1. 5
-1
-0. 5
0
0.5
1
x 10
4
Time, Second
V
o
l
t
a
g
e
,

V
o
l
t
Af ter BPF of In Vivo data from 300 Hz to 5 kHz
False Spike detection
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
x 10
5
-2
-1. 5
-1
-0. 5
0
0.5
1
1.5
2
x 10
-3
Time Sample
V
o
lt
a
g
e
,
V
9.06 9.08 9.1 9.12 9.14 9.16 9.18 9.2
x 10
4
-15
-10
-5
0
5
x 10
-5
Time, Second
V
o
l
t
a
g
e
,

V
o
l
t
Local Fi eld Potenti al
[1]
[2]
[3]
[4]
Dynamic Range Study
Presented By Md Kafiul Islam
Subject
(Fs in kHz)
B.W.
No of Data
Sequences
(Data Length
in min)
Amplifier Circuit
Noise Floor
(V rms)
DR without
Artifact
(Mean SD)
(Full SpectrumData
in dB)
DR with
Artifact
(Mean SD)
(Full SpectrumData
in dB)
Increase in DR
(Full Spectrum
Data in dB)
DR without
Artifact
(Mean SD)
(Spike Data in
dB)
DR with
Artifact
(Mean SD)
(Spike Data in
dB)
Increase in
DR
(Spike Data
in dB)
Rat
Hippocampus
(40)
0.1 Hz 10 kHz
134
(15)

1

69.01 2.10

82.44 4.21

13.43

59.21 4.32

78.35 8.26

19.14
Human Epilepsy
(32.5)
0.5 Hz 9 kHz
64
(18)

1

34.45 3.42

64.36 3.42

29.90

28.82 4.605

55.75 6.94

26.92
0 5 10 15
40
45
50
55
60
65
70
75
80
85
90
Artifact Amplitude, mV
D
y
n
a
m
i
c

R
a
n
g
e
,

d
B


Full SpectrumData with T2 art
Spike Data withT2 art
Full SpectrumData with T1 art
Spike Data withT1 art
Full SpectrumData with T3 art
Spike Data withT3 art
Full SpectrumDR
Without Artifact
SpikeDR
Without Artifact
Literature Review
(No literature particularly on artifacts for in-vivo neural signals)
EEG artifacts removal:
ICA, CCA (offline and manual intervention, at best semi-automatic,
works for global artifacts only)
Adaptive filtering (Reference channel to record artifact)
Wavelet-enhanced ICA/CCA (Identification of artifactual
Component is a tough job, DWT involved)
HHT, e.g. EMD or EEMD (Computational complexity and storage
problem)


Presented By Md Kafiul Islam
Literature Review
Limitations of Current Methods
Assumes the sources are independent and at most one
source can be Gaussian distributed (ICA)
Assumes the sources are maximally un-correlated (CCA)
Requires extra reference channel to record artifacts
(Adaptive filter)
Assumes signals and artifacts to be stationary linear
random process and known spectral char (Wiener filter)
Filter model to be linear, a-priori estimation is Gaussian
and work only for unimodal distribution (Kalman filter)

Presented By Md Kafiul Islam
Comparison of Current Artifact Removal Techniques
for Physiological Signals
(EEG, EMG, ECG, ECoG, fNIRS, PPG, Respiration, etc.)
Presented By Md Kafiul Islam
Adopted from: Kevin T. Sweeney, Tomas E. Ward, and Sean F. McLoone, Artifact Removal in Physiological SignalsPractices and
Possibilities, IEEE Transactions on Information Technology In Biomedicine, vol. 16, no. 3, May 2012.
Comparison of Current Artifact Removal Techniques
(Computational Time)
Adopted from: Kevin T. Sweeney, Sean F. McLoone, and Tomas E. Ward The use of Ensemble Empirical Mode Decomposition
with Canonical Correlation Analysis as a Novel Artifact Removal Technique, IEEE Transactions on Biomed Eng., 2012.


Presented By Md Kafiul Islam
About Wavelet Transform
(A Multi-resolution Analysis)
Split Up the Signal into a Bunch of Signals
Representing the Same Signal, but all Corresponding to Different Frequency Bands
Only Providing What Frequency Bands Exists at What Time Intervals

Presented By Md Kafiul Islam
( ) ( ) ( ) dt
s
t
t x
s
s s
x x


= =

*
1
, , CWT
Translation
(The location of
the window)
Scale
Mother Wavelet
From http://www.cerm.unifi.it/EUcourse2001/Gunther_lecturenotes.pdf, p.10
Wavelet
Small wave
Means the window function is of finite length
Mother Wavelet
A prototype for generating the other window functions
All the used windows are its dilated or compressed and shifted
versions
Scale S>1: dilate the signal
S<1: compress the signal
Why Wavelet Transform:
Artifacts:
Appear as abrupt change in signal amplitude (e.g. motion artifacts)
Overlaps with neural signal in both temporal & spectral domain
Different waveform shapes
Presented By Md Kafiul Islam
WT:
Good time-frequency resolution
Can work with non-stationary signals, e.g. neural signal
Easy to implement [complexity: DWT-> O(N); FFT -> O(N log
2
N);N-> length of signal]
Can work for both single and multi-channel recordings
Most importantly it can be used for both detection (from decomposed coefficient) and
removal (thresholding and reconstruction) of artifacts.

Why Wavelet Transform:


DWT is applied on raw neural signal (decomposition level, L = 5) which is contaminated by artifacts. The coefficients of decomposed signal components can
localize the artifact regions.

Presented By Md Kafiul Islam
Proposed Solution
Presented By Md Kafiul Islam
Purpose of Algorithm

Minimum (or almost no)
distortion to neural signal
Remove artifacts as much as
possible
Should be automatic
Robustness is important
Able to implement online
Should work in both single and
multi-channel analysis
Should not depend on artifact
types.


Traditional Wavelet
Denoising
Why SWT (1) ?
We prefer to use Stationary Wavelet Transform (SWT) instead of DWT and CWT:

Usually DWT or SWT is preferred over CWT when signal synthesis is required
CWT is very slow and generates way too much of data.
SWT is translation invariant where DWT is not. So better reconstruction result (No loss of
information, preserves spike data and doesnt generate any spike-like artifacts).
Choice of mother wavelets for CWT is limited.
SWT implementation complexity [O(N L)] is in between DWT [O(N)] and CWT [O(N L
log
2
N)].
N = length of signal, L = decomposition level

Presented By Md Kafiul Islam
Digital implementation of SWT:
A 3 level SWT filter bank and SWT filters
A 2-Level DWT decomposition and the
reconstruction structures
Why SWT (2) ?
Presented By Md Kafiul Islam
FPR
TP = # True Positives (Hit)
FP = # False Positives (False Alarm)
TN = # True Negatives (Correct Rejection)
FN = # False Negatives (Misdetection)
0 100 200 300 400 500 600 700 800 900 1000
-10
-5
0
5
Spike data comparisonafter artifact removal
N
o
r
m
a
l
i
z
e
d

A
m
p
l
i
t
u
d
e


0 500 1000 1500 2000
-15
-10
-5
0
5
10
15
Time Sample
Ref
DWT
CWT
SWT
Original Spike
(True Positive)
False Spike
(False Positive)
False Spike
(False Positive)
Original Spike
(True Positive)
Original Spike
(True Positive)
Effect of Filtering
Separate spikes from artifacts
Presented By Md Kafiul Islam
0 1 2 3 4 5 6 7 8
-1000
-500
0
500
Real Data from Monkey Front Cortex


0 1 2 3 4 5 6 7 8
-1000
-500
0
500
A
m
p
l
i
t
u
d
e


0 1 2 3 4 5 6 7 8
-1000
-500
0
500
Time, Sec


Original
Reconstructed
by only SWT
Reconstructed by
SWT +Filtering
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
ROC for Spike Detection
FPR
T
P
R


SWT +Filtering
Only
Threshold Value
Universal Threshold:


W
i
=Wavelet coefficients;
i
=variance of Wi; N =length of signal

Modified Threshold:
Presented By Md Kafiul Islam

k = k
A
for approx. coef.
k
D
for detail coef.

By empirical observation from
signal histogram
5 < m < infinite
2 < n < 3

D
4
, D
5
, D
6
contain the frequency
band of spikes.
Choice of Threshold Function (Garrote)
Hard: Discontinuous which may produce large variance (very sensitive to small changes
in the input data)
Soft: Continuous but has larger bias in the estimated signal (results in larger errors)
Garrote: Less sensitive to input change, lower bias and more importantly continuous.
Presented By Md Kafiul Islam
Hard Garrote Soft
Performance Evaluation
(Important Definitions)
Simulation is performed on both real and
synthesized (semi-simulated) signal database
from different subjects.

Removal Measurement
Lamda, : Amount of artifact reduction

SNR: Improvement in signal to noise (artifact) ratio



Distortion Measurement
RMSE: Root mean square error


Spectral Distortion:

Presented By Md Kafiul Islam
x(n) = Reference signal
x(n) = Reconstructed signal
y(n) = Artifactual signal
e
1
(n) = error between x & y
e
2
(n) = error between x & x
R
ref
= auto-correlation of reference signal

R
rec
= cross-correlation between
reference and reconstructed signal
R
art
= cross-correlation between
reference and artifactual signal

Artifact SNR:
Consider artifact as signal and
neural signal as noise:
Data Synthesis for Simulation
Presented By Md Kafiul Islam
Clean in-vivo
Data (Reference)
Raw In-Vivo Data
With Artifacts
Extract Artifact
Templates
Synthesized
Artifactual Data
Random
Amplitude
Random
Location
Random
Duration
Results (Tested on Synthesized Sequence)
Presented By Md Kafiul Islam
Results (Tested on Synthesized Sequence)
Presented By Md Kafiul Islam
Results
(Tested on Real Sequence-1)
Presented By Md Kafiul Islam
Data Sample 1: Rat Hippocampus
Results
(Tested on Real Sequence-2)
Presented By Md Kafiul Islam
0 0.5 1 1.5 2 2.5 3 3.5 4
x 10
5
-8
-6
-4
-2
0
2
4
Recorded vs Reconstructed (Before & After Artifact Removal)
Time Sample
S
i
g
n
a
l

A
m
p
l
i
t
u
d
e
,

m
V


Reconstructed
Recorded
Data Sample 1: Rat Hippocampus
Results
(Tested on Real Sequence-3)
0 0.5 1 1.5 2
x 10
5
-0.25
-0.2
-0.15
-0.1
-0.05
0
0.05
0.1
0.15
0.2
Original vs Reconstructed
Time Sample
S
i
g
n
a
l

A
m
p
l
i
t
u
d
e

Reconstructed
Original
Presented By Md Kafiul Islam
Data Sample 3: Cat Spinal Cord (High-pass Filtered @300 Hz)
5.7 5.75 5.8 5.85 5.9 5.95 6 6.05 6.1 6.15
x 10
4
-6
-4
-2
0
2
4
6
8
Spike Data before & after artifact removal
Time Sample
N
o
r
m
a
l
i
z
e
d

A
m
p
l
i
t
u
d
e


Original Spikes
Reconstructed Spikes
Results
(Tested on Real Sequence-4)
0 0.5 1 1.5 2 2.5 3
x 10
5
-800
-600
-400
-200
0
200
400
Original vs Reconstructed
Time Sample
S
i
g
n
a
l

A
m
p
l
i
t
u
d
e


Reconstructed
Original
Presented By Md Kafiul Islam
1 1.02 1.04 1.06 1.08 1.1 1.12
x 10
5
-35
-30
-25
-20
-15
-10
-5
0
5
10
Spike Data before & after artifact removal
Time Sample
N
o
r
m
a
l
i
z
e
d

A
m
p
l
i
t
u
d
e

Original Spike Data
Recons Spike Data
Data Sample 4: Monkey Front Cortex
Quantitative Evaluation-1
Presented By Md Kafiul Islam
Quantitative Evaluation-2
Presented By Md Kafiul Islam
Comparison with Other Methods
Presented By Md Kafiul Islam
, dB
dB
dB
Artifact
Artifact
Comparison with Other Methods
Presented By Md Kafiul Islam
Artifact
dB
Artifact
dB
Presented By Md Kafiul Islam
Comparison with Other Methods
Date RMS
Date RMS
Conclusion
First time (to best of knowledge) Investigation of
artifacts for in-vivo neural data
Artifact characterization
Dynamic range study due to artifacts
Database synthesis for quantitative evaluation
Proposal of a detection and removal algorithm
Threshold improvement
Robust (Depends only on neural signals spectral char)
Automatic
Real-time implementable
Presented By Md Kafiul Islam
Applications
Any closed loop neural system (e.g. BCI or
neural prostheses)
Basic neuroscience study
Clinical research
Removal of stimulation artifacts.
Both online and offline implementation
Both single and multi-channel recordings

Presented By Md Kafiul Islam
Future Plan-1
Optimize the algorithm further to allow faster
processing and less storage.
Perform additional experiments (simulations) in
order to fine tune the algorithm.
Proceed to hardware implementation and
perform real-time experiments to verify the
actual performance in practice.

Presented By Md Kafiul Islam
Future Plan-2
Publish the artifact database to public domain to
facilitate future research.
Development of a Software (MATLAB based) tool
for offline analysis that will be open for all to
download.

Presented By Md Kafiul Islam
Future Plan-3
Primary Work (with Dr. Amir)
A Wavelet Transform Based Algorithm for Usable Speech*
Segments Extraction from Co-Channel Signals
Presented By Md Kafiul Islam
Unvoiced frame and
its DWT
Voiced frame and its
DWT
*Can be replaced by in-vivo neural signal
Publications
In Preparation (Journal):
1. Md Kafiul Islam, Amir Rastegarnia, Nguyen A. Tuan, and Zhi Yang, A Wavelet Based Artifact Detection
and Removal Algorithm for In-Vivo Neural Recording In preparation for submission to Journal of
Neural Eng.
2. Jian Xu, Md Kafiul Islam and Zhi Yang, A 13W 14-Bit Modulator for Wide Dynamic Range Neural
Recording In preparation for submission to IEEE Trans. On BioMed. Circuit & Systems.


Submitted (Conference):
1. Jian Xu, Md. Kafiul Islam, and Zhi Yang, A 13W 87dB Dynamic Range Implantable Modulator for
Full-Spectrum Neural Recording Submitted to EMBC13
2. Azam Khalili, Amir Rastegarnia, Md Kafiul Islam, Zhi Yang, A Bio-Inspired Cooperative Algorithm for
Distributed Source Localization with Mobile Nodes Submitted to EMBC13

Accepted (Conference):
1. Md. Kafiul Islam, N Tuan, Y. Zhou, and Z. Yang, Analysis and Processing of In-Vivo Neural Signal for
Artifact Detection and Removal - Accepted in the International Conference on BioMedical Engineering
and Informatics (BMEI), October 2012, Chongqing, China.

Presented By Md Kafiul Islam
The End
Q & A

Thank You

Presented By Md Kafiul Islam

You might also like