advanced digital signal processingyildiz.edu.tr/~naydin/adp/lectures/pdf/adp_10.pdf · advanced...
TRANSCRIPT
1
Prof. Nizamettin AYDIN
http://www.yildiz.edu.tr/~naydin
Advanced Digital Signal Processing
1
Identification and Detection of Embolic Signals Using DWT and Fuzzy Logic
2
Introduction
• Stroke is an illness causing partial or total paralysis, or death. • The most common type of stroke (80% of all strokes) occurs
when a blood vessel in or around the brain becomes plugged. • The plug can originate in an artery of the brain or somewhere
else in the body, often the heart, where it breaks off and travels up the arterial tree to the brain, until it lodges in a blood vessel.
• These "travelling clots" are called emboli.• Strokes caused by emboli from the heart are often seen in
people with an irregular heartbeat (a condition called atrial fibrillation), as well as after a heart attack or heart surgery.
3
Embolic signals (ES) are;• Within audio range• Very short duration• Non-stationary• Frequency focused• High intensity transient
like• Unidirectional
Embolic Signals
4
Gated
transmiter
Master
osc.
Band-pass
filter
Sample
& holdDemodulator
Receiver
amplifier
RF
filter
Band-pass
filter
Sample
& holdDemodulator
Logic
unit
si
sq
V
Transducer
sin
cos
Typical Doppler System for Detecting Emboli
• Transcranial Doppler (TCD) ultrasound• Operating frequency=1-2 MHz
Further processing
5
Detection System
sq(k) sr(k)
Quadrature to directionalconversion
DWT(n scale)
DWT(n scale)
ForwardCoeff.filtering
IDWT(n scale)
[.]2
(n scale)
ReverseCoeff.filtering
IDWT(n scale)
[.]2
(n scale)
Detectionand
Classifi-cation
sf(k)si(k)
6
2
DWT of ES
time (ms) time (ms) time (ms) time (ms)
7
Fuzzy Membership Function and Detection Rules
113,)(
112
1 zzzthth
thnx−=−
−=
Membership value (MV):
If x(n) < th1 ; MV ⇒ 0 or 1
If x(n) ≥ th1 & ≤ th2 ;
MV ⇒
If x(n) > th2 & < th3 ; MV ⇒ 0 or 1
If x(n) ≥ th3 & ≤ th4 ;
MV ⇒
If x(n) > th4 ; MV ⇒ 0 or 1
th1 th2 th3 th4 x(n)
0
1
Trapezoidal membership function used for the derivation of membership values
214,3)(
234
zzzthth
thnx−=−
−=
8
Some Parameters Used in Detection
Ath : threshold value
P2TR: peak value to threshold ratio
TP2TR: total peak value to threshold ratio
RR : rise rate
FR : fall rate
F2RM : peak forward power to reverse power ratio
TF2R : total forward power to reverse power ratio
)()(
)(log102
)()(
)(log102
)/(2
)/(2
)()(
log102
)(log102
loglog 22
dBkA
kARTF
dBtA
tARMF
msdBtt
TRPFR
msdBtt
TRPRR
dBA
kATRTP
dBA
ATRP
NNA
off
on
off
on
off
on
t
tk r
t
tk f
pkr
pkf
pkoff
onpk
th
t
tk f
th
pk
rnfnth
∑∑
∑
=
=
=
=
=
−=
−=
=
=
+= σσ
Ath
Apk
ton tpk toff time
power A sketch of an instantaneous power.
9
More Parameters
These parameters are based on the narrow-band assumption
ts : averaged time centre of the signal
fs : averaged frequency centre of the signal
Ts2: time spreading
Bs2: frequency spreading
a(t) : instantaneous amplitude
f(t) : instantaneous frequency
sa(t) : complex quadrature signal given as
sa(t)=s(t)+jH{s(t)}
Where H{s(t)} is Hilbert transform of s(t) dt
tsdtf
tsta
dttsE
dftSffE
B
dttsttE
T
dffSfE
f
dttstE
t
a
a
s
ss
s
ss
s
ss
ss
)(arg
2
1)(
)()(
)(
)()(1
)()(1
)(1
)(1
2
222
222
2
2
π=
=
+∞<=
−=
−=
=
=
∫
∫
∫
∫
∫
∞+
∞−
∞+
∞−
∞+
∞−
∞+
∞−
∞+
∞−
10
Method
• Two independent data sets comprising 100 ES, 100 artefacts and 100 Doppler speckle were used (parameters were optimised using the 1st data set)
• Sampling frequecy was 7150 Hz• 8 scales DWT was applied to directional Doppler signals• 8th order Daubechies wavelet filter was used
• Individual wavelet scales were reconstructed
• Instantaneous powers for each scale were calculated
• Thresholds for each scale were determined
• Certain parameters were evaluated for each scales
• Membership values were derived from the membership functions
• Final decision for the type of the signal is based on average membership values of all the parameters for each signal types
11
Table 2: Membership rules for the parametersx(n) < th1 ≥ th1&≤ th2 > th2&< th3 ≥ th3&≤ th4 > th4
ar em sp ar em sp ar em sp ar em sp ar em sp
P2TR 0 0 1 0 z1 z3 0 1 0 z2 z4 0 1 0 0TP2TR 0 0 1 0 z1 z3 0 1 0 z2 z4 0 1 0 0F2RM 1 0 0 z3 0 z1 0 0 1 0 z2 z4 0 1 0TF2R 1 0 0 z3 0 z1 0 0 1 0 z2 z4 0 1 0RR 1 0 0 z3 z1 0 0 1 0 0 z4 z2 0 0 1FR 1 0 0 z3 z1 0 0 1 0 0 z4 z2 0 0 1ts 0 0 1 0 z3 z1 0 1 0 z2 z4 0 1 0 0fs 0 0 1 0 z1 z3 0 1 0 z2 z4 0 1 0 0T 2
s 0 0 1 0 z3 z1 0 1 0 z2 z4 0 1 0 0B2
s 1 0 0 z3 z1 0 0 1 0 0 z4 z2 0 0 1V IE 0 0 1 z1 0 z3 1 0 0 z4 z2 0 0 1 0V IF 1 0 0 z3 z1 0 0 1 0 0 z4 z2 0 0 1
ar: artifact, em: emboli, sp: speckle; z1 = (th2 − th1)−1(x(n) − th1),
z2 = (th4 − th3)−1(x(n) − th3), z3 = 1 − z1, z4 = 1 − z1
Membership Values for Parameters
12
3
ES Artifact DSMean SD Mean SD Mean SD
SMP 2.45 0.83 5.96 0.77 3.27 0.72TP2TR 25.13 3.17 34.57 6.62 18.32 3.13P2TR 12.1 3.01 14.16 6.67 6.29 1.82F2RM 25.44 7.01 9.4 11.15 23.18 7.59F2R8 1.29 7.13 1.79 11.25 -0.58 6.18RR 3.88 2.53 0.95 0.59 3.52 2.05FR 4.65 3.15 0.97 0.63 4.00 2.12
TF2R 15.30 6.24 4.05 9.82 14.13 4.03ts 51.59 31.7 146.38 76.8 6.96 4.9fs 0.114 0.049 0.014 0.007 0.108 0.189T 2
s 73.87 43.3 185.08 106.6 10.86 8.6B2
s 0.08 0.038 0.033 0.031 0.492 0.438V IE 101.34 96.1 43.47 63.3 12.3 5.6V IF 0.016 0.008 0.012 0.021 0.021 0.012
Mean and Standard Deviations of Parameters
13
Threshold Values of Parameters
th1 th2 th3 th4
P2TR (dB) 6 12 14 20TP2TR (dB) 17 23 26 38F2RM (dB) 10 20 22 26TF2R (dB) 4 8 10 20RR (ms) 0.6 1.4 2 5FR (ms) 0.6 1.4 2 6ts (ms) 10 20 60 120
fs/Fs (unit) 0.01 0.035 0.08 0.1T 2
s (ms2) 6 18 40 100B2
s/Fs (unit) 0.03 0.06 0.1 0.4V IE (unit) 12 60 100 140
V IF/Fs (unit) 0.008 0.016 0.021 0.04Fs= Sampling frequency
14
Detection Results
Data set 1 Data set 2100 ES 100 ES
98% as embolic signal 95% as ES1% as artifact 3% as artifact1% disputed 2% disputed100 artifacts 100 artifacts
96% detected as artifact 98% as artifact4% disputed 2% as ES
100 DS 100 DS93% as DS 95% as DS6% as ES 1% as artifact
1% disputed 4% disputed
When it was tested on a third data set, 198 ES out of 202 were detected as ES
15
Denoising of Embolic Doppler Signals
Wavelet denoising involves:•Taking DWT •Estimating noise level and an appropriate threshold•Shrinking the coefficients•Taking inverse DWT
16
DWT and Denoising
∑−
=
−=1
0 0
00)(1
),(
0
N
km
m
ms
a
anbkks
anmW ψ
• Scaling and positions are dyadic
• Fast algorithms exist• Scaling function and
wavelet must satisfy the following conditions
S(k)
A1LPF
D1HPF 2
2
S(k)
LPF
HPF2
2N
N
N N
N
N
N/2
N/2
0)(,1)( == ∫∫ dttdtt ψφ
Wavelet denoising involves;•Taking DWT •Estimating noise level and an appropriate threshold•Shrinking the coefficients•Taking inverse DWT
17
Method
• 50 low intensity ES from patients with symptomatic carotid stenosis were recorded by using a TCD system.
• The data length was 2048 point with a sampling frequency of 7150 Hz.
• For wavelet denoising, Daubechies’ 8th order wavelet with 8 scales was used. Wavelet denoising rules were specifically adapted to suppress Doppler speckle and artifacts, by utilizing ES characteristics.
• ES were analyzed using both a 128 point complex FFT with Hanning window and a 64 scale complex Morlet WT.
• TF and TS representations of ES before and after denoising were compared by calculating EBR, HWM, and ESO.
18
4
EBR, HWM, ESO
• Embolic signal to background power ratio (EBR) is given as
• Apeak is the power at frequency with maximum power intensity. Bavg is the average power of the background intensity and calculated by time and frequency/scale averaging of the TF/TS results.
• HWM is an estimation of temporal resolution, defined as half width maximum of the embolic signal power increase in the time domain.
• ESO is absolute time of embolic signal onset as an estimation of the accuracy of temporal localization.
)(log10 dBB
AEBR
avg
peak=
19
DWT of ES
time (ms) time (ms) time (ms) time (ms)
20
Results
Mean (and standard deviations) of the EBR, HWM, and ESO for the 50 embolic signals
EBR(dB) HWM(ms) ESO(ms)
WFT 15.31(2.65) 11.98(11.77) 57.82(22.91)
WFTdenoise 21.90 (3.44) 10.77(11.07) 67.76(7.67)
WT 15.45(2.37) 22.00(47.46) 53.07(28.10)
WTdenoise 22.40(4.23) 13.21(27.41) 68.39(7.70)
ESO measured from time domain signals 67.85(7.64)
21
Improvement on EBR
0
5
10
15
20
25
30
35
40
1 4 7 10 13 16 19 22 25 28 31 34 37 40 43 46 49
Signal no
EB
R (
DB
) EBRf
EBRfd
EBRw
EBRwd
22
Improvement on HWM
0
50
100
150
200
250
1 4 7 10 13 16 19 22 25 28 31 34 37 40 43 46 49
Signal no
HW
M (
ms) HWMf
HWMfd
HWMw
HWMwd
23
Improvement on ESO
0102030405060708090
1 4 7 10 13 16 19 22 25 28 31 34 37 40 43 46 49
Signal no
ES
O (
ms)
ESOf
ESOfd
ESOt
ESOw
ESOwd
24
5
Red: WFT, green: WFT_d, blue: WT, yellow: WT_d
time (ms)
Denoising Examples
25
Red: WFT, green: WFT_d, blue: WT, yellow: WT_d
time (ms)
Denoising Examples
26
Red: WFT, green: WFT_d, blue: WT, yellow: WT_d
time (ms)
Denoising Examples
27
Red: WFT, green: WFT_d, blue: WT, yellow: WT_d
time (ms)
Denoising Examples
28
Denoising Examples
Red: WFT, green: WFT_d, blue: WT, yellow: WT_d
time (ms)
29
Denoising Examples
Red: WFT, green: WFT_d, blue: WT, yellow: WT_d
time (ms)
30
6
Denoising Examples
Red: WFT, green: WFT_d, blue: WT, yellow: WT_d
time (ms)
31
Denoising Conclusion
• ~5 dB improvement in EBR is achieved• Time localization has improved• Most of the low frequency artifacts can be
removed by simply discarding higher scale coefficients during reconstruction
• Attained a considerable improvement on analysis and detection of embolic signals
• Denoising algorithms must take into account unique specifications of a signal being analyzed
32
33
Denoising Embolic Doppler Ultrasound Signals Using Dual Tree Complex
Discrete Wavelet Transform
34
Dual tree complex wavelet transform
• The Dual Tree Complex Wavelet Transform (DTCWT) was developed to overcome the lack of shift invariance property of ordinary DWT.
• In the analysis of non-stationary Doppler signals (particularly embolic Doppler ultrasound signals which are similar to transients), any distortion in the phase of the input-signal can cause unwanted variations in different scales.
• DTCWT is approximately shift invariance and this property can cause better results in analyze part of embolic Doppler ultrasound signals.
35
Dual tree complex wavelet transform
36
In the figure 16 unit step functions with different phases are used as input signals for DWT and DTCWT. As it is seen, the coefficients in DTCWT are less affected.
7
Dual tree complex wavelet transform
• DTCWT consists of a pair of DWT trees, each representing real and imaginary parts of the transform.
• In both DWTs all the filters are real and these two real trees use two different sets of filters. These sets of filters are jointly designed so that the overall transform is approximately analytic.
• The complexity of the transform can be observed from the frequency response of wavelets at levels 1 to 4 and of the level 4 scaling function.
• In DTCWT, a real signal is applied to the both trees for decomposition and the outputs of the both reconstructed trees are added at the end of the reconstruction stage.
37
Dual tree complex wavelet transform
38
Decomposition
( )nh1
( )nh 0
( )nh1
( )nh 0
( )ng 0
( )ng 1
( )ng 0
( )ng 1
( )ng 0
( )ng 1
( )nh1
( )nh 0
Dual tree complex wavelet transform
39
Reconstruction
( )ng 1
~
( )ng 0
~
( )ng 1
~
( )ng 0
~
( )ng 1
~
( )ng 0
~
( )nh 0
~
( )nh 1
~
( )nh 0
~
( )nh 1
~
( )nh 0
~( )nh 1
~( )nh 1
~
Dual tree complex wavelet transform
40
Dual tree complex wavelet transform
41
Method
• 25 low intensity ES from patients with symptomatic carotid stenosis were recorded by using a TCD system.
• The data length was 2048 point with a sampling frequency of 7150 Hz.
• For DWT denoising, Daubechies 8th order wavelet with 8 scales was used.
• For DTCWT denoising, a DTCWT algorithm adapted from “http://taco.poly.edu/WaveletSoftware“ with 8 scales was used.
• Doppler signals were analyzed using 128 point complex FFT with Gausian window.
42
8
EBR, HWM, ESO
• TF representation of embolic signals before and after denoisingwere compared by calculating EBR, HWM, and ESO. – Embolic signal to background power ratio (EBR) is given as
• Apeak is the power at frequency with maximum power intensity. Bavg is the average power of the background intensity and calculated by time and frequency averaging of the TF results.
– HWM is an estimation of temporal resolution, defined as half width maximum of the embolic signal power increase in the time domain.
– ESO is absolute time of embolic signal onset as an estimation of the accuracy of temporal localization.
• Wavelet denoising rules were specifically adapted to reject or suppress Doppler speckle and artifacts caused by probe tapping, tissue movement, speech etc, by utilizing embolic signal characteristics.
)(log10 dBB
AEBR
avg
peak=
43
DWT of ES
time (ms) time (ms) time (ms) time (ms)
44
Example of denoising using
DTCWT
45
Example of denoising using
DWT
Example of denoising using
DTCWT
46
Example of denoising using
DWT
Results
Mean of the EBR, HWM, and ESO for the 25 embolic signals
Denoising EBR(dB) HWM(ms) ESO(ms)
none 17.6 9.5 67.8
DWT 22 8.9 70
DTCWT 25.8 8.8 70.2
47
Denoising Conclusion
• ~8 dB improvement is obtained by using DTCWT compared to the improvement provided by the conventional DWT (less than 5 dB).
• Most of the low frequency artifacts can be removed by simply discarding higher scale coefficients during reconstruction
• Attained a considerable improvement on analysis and detection of embolic signals
• Denoising algorithms must take into account unique specifications of a signal being analyzed
48
9
49
Processing Complex Quadrature Signals Using Modified Complex Discrete Wavelet Transform
Quadrature Doppler Signals• A quadrature Doppler signal can be assumed as a complex signal,
in which the real and imaginary parts can be represented as the Hilbert transform of each other. Mathematically, a discrete quadrature Doppler signal can be modeled as
Y(n) = D(n) + jQ(n)
where D(n) is in-phase and Q(n) is quadrature-phase components of the signal.
• D(n) and Q(n) can also be represented in terms of the directional signals as
D(n) = ± Sf(n) ± H[Sr(n)]
Q(n) = ± H[Sf(n)] ± Sr(n)
where sf(n) and sr(n) represent forward and reverse signals respectively and H[ ] stands for the Hilbert transform.
50
Quadrature Signals
51“IWW 2009, June 5-7, 2009 Kocaeli , Turkey” “Görkem Serbes”
The information concerning flow direction is encoded in the phase relationship between D(n) and Q(n). You can see the phase difference in the above figure if you look carefully.
Extracting Directional Signals from Quadrature Signals
52
There are a number of methods for extracting directional signals from the quadrature signals, the phasing-filtering technique
(PFT), which is based on Hilbert transform, is most widely used method. Therefore in this work, the reconstructed directional
outputs of the new method are compared with the outputs of the PFT.
Analysis of Directional Signals
• After the extraction of directional signals, different signal processing methods in frequency domain and wavelet domain can be applied to these signals for diagnosis.
• Discrete Wavelet Transform(DWT) is one of the methods which provides analyzing directional signals in wavelet domain.
• With DWT, directional signals are decomposed to different frequency bands and examined.
• But DWT suffers from the lack of shift-invariance property which means that small shifts in the input signal can cause major variations in the distribution of energy between DWT coefficients at different scales .
53
Modified Dual Tree Complex Wavelet Transform
• But DTCWT has two different DWT trees inside and this causes redundancy(2m:1 for m dimensional signals).
• Quadrature Doppler ultrasound signals are dual channel signals obtained from the systems employing quadrature demodulation. Prior to processing Doppler signals by using DTCWT, directional flow signals must be obtained and then two separate transform applied, and this increases the computational complexity.
• In order to decrease computational complexity, a newcomplex discrete wavelet transform, Modified Dual Tree Complex Wavelet Transform(MDTCWT), algorithm is proposed.
54
10
Modified Dual Tree Complex Wavelet Transform
• In the MDTCWT, two modifications are made to the conventional DTCWT.1. At the analysis stage, instead of applying the complex quadrature
signal to the both trees, the in-phase part is applied to the real tree through a Hilbert transformer introducing a 90 degree phase shift into the real part of the signal, and the quadrature-phase part is applied to the imaginary tree directly.
2. At the reconstruction stage, in addition to adding the outputs of reconstructed real and imaginary trees, which gives the signals caused by the blood flow in one direction, they are also subtracted resulting in the signals caused by the blood flow in the other direction.
55
Modified Dual Tree Complex Wavelet Transform
56
( )nh1
( )nh 0 2
2
( )nh1
( )nh 0 2
22
2
2( )ng 0
( )ng 1 2
2( )ng 0
( )ng 1 2
2( )ng 0
( )ng 1 2
( )nh1
( )nh 0
Real Tree
Imaginary Tree
Level 1
Level 2
Level 3
Hilbert
TransformD(n)
Q(n)
Modified Dual Tree Complex Wavelet Transform
57
2
2 ( )nh 1
~
( )nh 0
~
2
2 ( )nh 1
~
( )nh 0
~
2
2 ( )nh 1
~
( )nh 0
~
( )ng 1
~
( )ng 0
~2
2
( )ng 1
~
( )ng 0
~2
2
( )ng 1
~
( )ng 0
~2
2
Real Tree
Coefficients
Real Tree
Coefficients
Imaginary Tree
Coefficients
Imaginary Tree
Coefficients
Level 3
Level 2
Level 1
sr(n)
sf(n)
-
+
Results
• The proposed methods success is measured in two ways. Firstly, the directional signals are obtained by using PFT from a quadrature signal to compare with. Then the same quadrature signal was decomposed to five levels and then reconstructed by using the MDTCWT resulting in the forward and reverse signals.
• Finally both results are compared statistically by using the percent root mean square difference (PRD) for both forward and reverse signals
58
100)(
2
2
×−
=∑
∑j
ji
x
xxPRD
In PRD formula, xj is the resulting directional signal
obtained by the PFT and xi is the resulting directional signal obtained by the MDTCWT.
Results
59
For an objective evaluation of the PRD, PRD values of 50 embolic Doppler signals with length of 4096
samples each were calculated and the final PRD value was obtained by averaging the 50 PRD values.
Error(PRD)
Forward output signal: 5.69×10−8
Reverse output signal: 2.65×10−8
Results
60
The signals representing forward (blue line) and reverse (red line) flow components of the embolic
Doppler signal, which are obtained by using the MDTCWT and the PFT
are shown in Figure (a) and (b) respectively. The error signals
obtained by subtracting the signals in Figure (b) from the signals in
Figure (a) are illustrated in Figure (c) and (d) respectively. It is
remarkable that the difference signals for both forward and reverse
flow signals are around -80 dB, indicating that the algorithm works
as exactly intended.
11
Results
• Secondly, the computational complexity of the algorithm was also compared with the PFT followed by two real DWTs, and the PFT followed by two DTCWTs on a PC with Pentium M 1.86 GHz processor and 1 GB RAM.
• The algorithms were implemented in Matlab and tested using a quadrature Doppler signal having 1024 samples. In order to minimize effect of any computational time used by any program, which might be running at the background, each algorithm was run 1000 times and average execution time of the algorithms were calculated.
61
Results
Method: Processing time(ms):
PFT with DWT: 9.0
PFT with DTCWT: 18.1
MDTCWT: 9.1
62
Computational cost of the proposed algorithm (9.1 ms) is almostsame as the PFT algorithm followed by two DWTs (9.0 ms) andhalf of the PFT algorithm followed by two DTCWTs (18.1 ms).
Results
• In conclusion, the MDTCWT algorithm is computationally efficient, inherently offers advantages provided by the conventional DTCWT, and additionally maps directional signals at the end of the reconstruction stage. In the future, it may be possible to design new complex wavelet filters that will have properties similar to that of a Hilbert transformer for further reducing the computational complexity.
63 64