Respiratory monitoring

advertisement
DSP II – Final presentation
Hans De Clercq & Rogier Corthout
16/12/2008
1
Hans De Clercq & Rogier Corthout
16/12/2008
2

Project integrated in master thesis:
◦ “Textile-integrated data-acquisition system”
◦ Prof. Dr. Ir. R. Puers
◦ Optional course in Biomedical technology



Application for monitoring breathing
disorders (e.g. SIDS) during sleep for
babies
Accelerometer-based design measuring
movements during breathing
Started from scratch  shaped our own
DSP-project…
Hans De Clercq & Rogier Corthout
16/12/2008
3


Non-uniform chest/abdomen expansion
 measurement variation of inclination using
accelerometers placed sideways on the
chest/abdomen
XY-plane  modulus & angle
Respiration
g
Hans De Clercq & Rogier Corthout
16/12/2008
4
Time (s)
Accelerometer (angle)
Time (samples @ 20 Hz)
Spirometer
Hans De Clercq & Rogier Corthout
16/12/2008
5
• Noise cancellation from low-cost accelerometers
Signal
conditioning
Adaptive
filtering
• Offset cancellation
• Extraction dominant breathing frequency using adaptive
band-pass filter
• Extraction RMS
Information
processing
Decision
making
• Phase shift with reference signal
• Fuzzy clustering: distinction heavy/quiet breathing, coughing,
apnoea…
Hans De Clercq & Rogier Corthout
16/12/2008
6
Accelerometer
signal
Offset &
noise
cancellation
Adaptive BPF
Spirometer
signal
Nishimura
or
N-points
FFT
Extraction
dominant
frequency
Breathing rate
RMS
Decision
making
(fuzzy logic)
Breathing
pattern
Phase shift
Error rate
Hans De Clercq & Rogier Corthout
16/12/2008
7
• Noise cancellation from low-cost accelerometers
Signal
• Offset cancellation
conditioni
ng
Adaptive
filtering
• Extraction dominant breathing frequency using
adaptive band-pass filter
Informatio • Peak and amplitude detection
n
• Phase shift with gold standard
processin
g
Decision
making

• Heavy/quiet breathing, coughing, talking and
undefined signal
Noise cancellation from low-cost
accelerometers outside useful breathing BW
◦ Noise limits accelerometer resolution:
1000μg/sqrt(Hz)
◦ Analog filtering (simple RC)  anti-aliasing: sample
frequency ADC ~ 10 Hz

Offset cancellation
◦ Simple, but steep high-pass IIR-filtering (cut-off ~
0.01 Hz)
◦ E.g. third order Chebychev

Normalization with reference signal
Hans De Clercq & Rogier Corthout
16/12/2008
8
• Noise cancellation from low-cost accelerometers
Signal
• Offset cancellation
conditioni
ng
Adaptive
filtering
• Extraction dominant breathing frequency using
adaptive band-pass filter
Informatio • Peak and amplitude detection
n
• Phase shift with gold standard
processin
g

Decision
making
Objectives:
• Heavy/quiet breathing, coughing, talking and
undefined signal
◦ Cancel the noise inside the useful breathing BW,
obtaining only the “sine wave”-like signal
◦ Obtain the dominant frequency as a parameter for
the pattern detector

Comparison with gold standard…
Hans De Clercq & Rogier Corthout
16/12/2008
9

Two methods explored:
◦ Nishimura method
◦ STFT-method

Algorithms tested on 3 different signals:
1. Sine wave with Gaussian noise
 4 different frequencies/amplitudes
 SNR < 2dB
2. Spirometer measurement (gold standard)
3. Accelerometer measurement (test signal)
4. … and those two combined …
Hans De Clercq & Rogier Corthout
16/12/2008
10


Concept: adaptive band-pass filter (IIR!)
Filter is tuned in real-time to maximize the
output of the bandpass filter:
◦ Basically, input is a “sine wave” with a variable
frequency covered in noise…
◦ Bandpass filtering for maximum output
= looking for the frequency band with maximum
power!
Hans De Clercq & Rogier Corthout
16/12/2008
11
Time (s)
Frequency (Hertz)
Hans De Clercq & Rogier Corthout
16/12/2008
12

2nd order IIR-filter:
1  0
1  z 2
H B ( z) 
.
2 1  1 (k )(1   0 ) z 1   0 z 2

α0 determines the selectivity of the filter…
Increasing α0
Hans De Clercq & Rogier Corthout
16/12/2008
13

2nd order IIR-filter:
1  0
1  z 2
H B ( z) 
.
2 1  1 (k )(1   0 ) z 1   0 z 2


α0 determines the selectivity of the filter
α1 determines the center frequency of the
pass-band:
1
0  cos 1 1 (k )
T

α1 is iteratively tuned in real-time to
maximize the output of the bandpass filter…
Hans De Clercq & Rogier Corthout
16/12/2008
14

Iterative updating scheme for α1:
◦ Gradient algorithm2 towards maximum output power
 y (k )
 2 y (k ) (k )
1 (k )
◦ μ determines the convergence speed, and is heavily
related with stability…
Δ
+
μ
x
 (k )  1 (k )(1   0 ) (k  1)
 0 (k  2)  (1   0 ) y (k  1)
1 (k  1)  1 (k )   y(k ) (k )
u(k)
HB(z)
y(k)
G(z)
Hans De Clercq & Rogier Corthout
16/12/2008
15
Strengths
Weaknesses
Hans De Clercq & Rogier Corthout
16/12/2008
16


Δ
Update filter for every new input value
Computational efficiency  real-time
implementation possible
+
μ
x
 (k )  1 (k )(1   0 ) (k  1)
 0 (k  2)  (1   0 ) y (k  1)
1 (k  1)  1 (k )   y(k ) (k )
u(k)
HB(z)
y(k)
G(z)
Hans De Clercq & Rogier Corthout
16/12/2008
17
Strengths
Weaknesses
Hans De Clercq & Rogier Corthout
16/12/2008
18
Detected dominant
frequency (Hz)

Limited convergence speed if varying
frequency…
E.g. on sine wave signal with varying
frequency and amplitude…
Amplitude input signal

Time (s)
Time (s)
Hans De Clercq & Rogier Corthout
16/12/2008
19
Strengths
Weaknesses
Computational
efficiency 
real-time
implementation
Stability
problems of IIRfilter
Update filter for
every new input
value
Limited
convergence
speed if varying
frequency
Hans De Clercq & Rogier Corthout
16/12/2008
20

Estimation
of real
frequency
Detected dominant
frequency (Hz)

Works “fine” on artificial sine wave signal…
Biomedical signals aren’t deterministic at all
 limited convergence speed = bottleneck in
detecting the dominant frequency
E.g. on simple spirometer signal…
Amplitude input signal

Time (s)
Time (s)
Hans De Clercq & Rogier Corthout
Unstable working
regime…
16/12/2008
21





After paper Hung & Bonnet…
Divide signal in 51.2s (1024 samples)
segments with 1/6th overlap between
windows for edge continuity
Assumption: continuity over time window
Calculate spectrum and detect maximum
freq. of accelerometer signal f0 ∈ 0.1-1Hz
Filter the signal in pass-band:
max(0.1Hz, f0  0.4 Hz)  f  f 0  0.4 Hz
using a 4th order Butterworth filter…
Hans De Clercq & Rogier Corthout
16/12/2008
22
Strengths
Weaknesses
No stability
problems
Not in realtime
No
convergence
problems
Accuracy:
Heisenberg
principle
Hans De Clercq & Rogier Corthout
16/12/2008
23

E.g. on spirometer signal (trivial on sine wave)
frequency
time
less smearing out
of low breathing
frequencies
Hans De Clercq & Rogier Corthout
16/12/2008
24

Filtered signal
Detected frequency
Detected dominant
frequency (Hz)

E.g. applied on spirometer signal…
Limited frequency resolution
But still more reliable than Nishimura for long
term monitoring…
Amplitude signal

Time (s)
Time (s)
Hans De Clercq & Rogier Corthout
16/12/2008
25
Amplitude signal
Detected dominant
frequency (Hz)
Amplitude signal
 Original signal
Detected dominant
frequency (Hz)
Amplitude signal
 Filtered (STFT method)
Time (s)
Time (s)
Time (s)
Similar results:
• STFT more reliable and
intuitive
• Nishimura hard real-time
potential…
 STFT seems to be the
wisest choice for longterm applications!
 Filtered (Nishimura)
Time (s)
Hans De Clercq & Rogier Corthout
16/12/2008
26
Accelerometer signal
Spirometer signal
Filtered signal using STFT
Detected frequency using STFT
Consistent detection on
both signals
Filtered signal using Nishimura
Detected frequency using Nishimura
Inconsistent detection due to
unstable behaviour…
Hans De Clercq & Rogier Corthout
16/12/2008
27
• Noise cancellation from low-cost accelerometers
Signal
• Offset cancellation
conditioni
ng
Adaptive
filtering
• Extraction dominant breathing frequency using
adaptive band-pass filter
Informatio • Peak and amplitude detection
n
• Phase shift with gold standard
processin
g



Dominant frequency (supra)
RMS-value of BP-filtered signals
Phase shift with gold standard
Decision
making
• Heavy/quiet breathing, coughing, talking and
undefined signal
◦ Normally consistently small during quiet breathing
[GOLLEE]
◦ Exception: transient/fast movement, e.g. forced
expiration (coughing)
◦ Implemented, but not yet used for this
application…
Hans De Clercq & Rogier Corthout
16/12/2008
28
• Noise cancellation from low-cost accelerometers
Signal
• Offset cancellation
conditioni
ng
Adaptive
filtering
• Extraction dominant breathing frequency using
adaptive band-pass filter
Informatio • Peak and amplitude detection
n
• Phase shift with gold standard
processin
g
Decision
making


• Heavy/quiet breathing, coughing, talking and
undefined signal
Determination of breathing pattern from
processed information
Clustering of sampled values for all
parameters using fuzzy techniques
 Advantage: clustering techniques can reveal
structures in data without relying on assumptions
common to conventional statistical methods, such
as the underlying statistical distribution
Hans De Clercq & Rogier Corthout
16/12/2008
29

Data set to be clustered:
z1N 
 z11


Z 

z

z
nN 
 n1
Time samples k=1…N
Cluster variables
1…n

Every time sample has its membership
function μik:
ik   0,1 , 1  i  c , 1  k  N
c

i 1
ik
1 , 1 k  N
N
0   ik  N , 1  i  c
i 1
Hans De Clercq & Rogier Corthout
16/12/2008
30

Objective is to minimize the fuzzy c-means
functional:
c
N
2
J   ( ik ) m DikA
, m2
i
i 1 k 1
Membership function of
sample k to cluster i

Distance of sample k to
center of cluster i
Implementation of Gustaf-Kesselson algorithm in
Matlab
◦ Complex iterative algebraic problem, further
mathematical details omitted…
◦ Only input parameter: expected number of clusters c
Hans De Clercq & Rogier Corthout
16/12/2008
31
◦ Partition matrix with all
membership functions U


cN 
 v11
◦ Cluster prototype matrix V

V 
with cluster centers
v
 c1
v1n 


vcn 
Cluster variables k=1…n
◦ Cluster covariance matrix F
 f11

F 
f
 c1
f1n 


f cn 
Cluster variables k=1…n
Hans De Clercq & Rogier Corthout
Cluster number 1…c
Time samples k=1…N
16/12/2008
Cluster number 1…c
Output of algorithm:
1N 
Cluster number 1…c

 11

U 

 c1
32


Detection mean amplitude or average power
per breathing pattern
Application on artificial test signals obtain
low error rates during clustering:
◦ ε < 15% using Nishimura
◦ ε < 5% using STFT-BPF!
Hans De Clercq & Rogier Corthout
16/12/2008
33
point
cloud
boxplot
dom. freq.
Quiet
breathing
boxplot
RMS
Cluster number
Heavy
breathing
No
breathing
RMS STFT-BPF output
Cluster number
Long-term measurement using only accelerometers…
Dominant frequency (STFT)
Hans De Clercq & Rogier Corthout
16/12/2008
34


Gustaf-Kesselson starts with random cluster
centers  use statistical information to
initialize clustering more reliably
Expand frequency detection & fuzzy
clustering to other signals (ECG, oximetry,…)
in order to:
◦ Obtain redundant measurements  increase
reliability
◦ Examine the correlation between those signals
during apnoea
Hans De Clercq & Rogier Corthout
16/12/2008
35
DSP II – Intermediate presentation
Hans De Clercq & Rogier Corthout
16/12/2008
36
Download