signal is expressed by
()= ()+ () ( )st ht wt 10
where h(t) denotes the pure signal to be recovered, and w(t) de-
notes the independent noise which energy is smaller than that of h
(t), then the AFD will extract MCs of the pure signal first during the
decomposition. Therefore, such MCs in the first N decomposition
levels can be selected to approximate the pure signal. Based on the
decomposition components of G(t), the reconstructed ECG signal
^
(
t
can be expressed as
⎪⎪
⎪⎪
⎧
⎨
⎩
⎫
⎬
⎭
∑
^
()= ( )
()
=
{}
ht G e B eRe , .
11
n
N
na n
jt
1
n
The key problem is to determine a suitable maximum decom-
position level N adaptively. To solve this problem, a stop criterion
of the AFD is proposed based on the estimated SNR of the noisy
signal. Since the denoising aims to make the MSE defined as
=
^
−
()
−
LEh hMSE
12
1
2
as small as possible where L denotes the total data length [31,32],
the reconstructed ECG signal at the suitable decomposition level N
should be able to minimize
⎛
⎝
⎜
⎜
⎜
⎜
⎞
⎠
⎟
⎟
⎟
⎟
()
^
()
−+
()
st
ht
1
1
10
13
2
2
SNR /10
e
where
NR
e
defined as
=
()
() ( )
ht
wt
SNR 10log
14
e
2
2
denotes the estimated SNR of the noisy signal. According to
(6) and (11), the energy of the reconstructed ECG signal can be
represented as
∑
^
() =
()
=
{}
ht G e
1
2
,.
15
n
N
na
2
1
2
n
Then, combining (13) and (15), the suitable maximum decom-
position level N can be determined by solving
⎧
⎨
⎪
⎪
⎩
⎪
⎪
⎛
⎝
⎜
⎜
⎜
⎜
⎞
⎠
⎟
⎟
⎟
⎟
⎫
⎬
⎪
⎪
⎭
⎪
⎪
⎫
⎬
⎪
⎪
⎭
⎪
⎪
{
()
∑
−+
()
>∈
=
st
Ge
min
1
2
,
1
1
10
.
16
NN
n
N
na
1,
2
1
2
SNR /10
n
e
Since the standard remainder R
N
(t)in(1) satisfies
() ≤
()
Rt
M
N 17
N
where M is a constant that is related to the energy of the de-
composed signal [33], the energy of the standard remainder R
N
(t)
decreases as the decomposition level N increases. In other words,
the energy ratio of the noisy signal to the reconstructed signal
decreases monotonically when the decomposition level N in-
creases, which means that (16) only has one optimization solution.
Therefore, (16) can be used as the stop criterion of the iterative
process of the AFD in the ECG denoising process. The objective
function value in (16) is evaluated at each decomposition level. At
first decomposition levels, the objective function values will de-
crease. When the objective function achieves its minimum point,
the decomposition iteration should be stopped. The filtered result
can be reconstructed by using all extracted MCs based on (11).
Algorithm 1. Computational process of the AFD-based ECG de-
noising method.
Input: s(t): noisy ECG signal; SNR
e
: estimated SNR of s(t).
1:
{
()← ()− ()
tst stmean
;
2:
/
{
()← ()+ ()
tst st
3:
Initialize
=a
1
, N¼ 1,
()= (
tGt
1
,
=
{}
e 1
a
1
, and
=B 1
1
;
4: repeat
5:
⎛
⎝
⎜
⎞
⎠
⎟
←()−
+ {}{}
−
−
Gt G e e,
NNNaa
ae
ea
1
1
NN
N
jt
jt
N
;
6:
←
{}
−
−
+
+
+
e
a
a
ae
1
1
N
N
N
jt
1
1
2
1
;
7:
⎧
⎨
⎩
⎫
⎭
←∈
++{}+
+
a arg max G , e : a
NNaN11
2
1
N 1
;
8:
←
+
−
−
−
−
+
+
BB
N
a
ae
ea
a
1
1
1
1
N
N
jt
jt
N
N
1
2
1
2
;
9:
←+NN
;
10:
⎛
⎝
⎜
⎜
⎞
⎠
⎟
⎟
←−+
()
∑
=
{}
FV 1
st
Ge
1
2
,
1
10
n
N
na
n
e
2
1
2
SNR /10
;
11: until OFV achieves its minimum value
12:
{
^
←
∑
=
{}
Ge BRe ,
n
N
na n
1
n
;
Output:
: reconstructed filtered result; N: final decomposition
level.
In each decomposition level, one value in the a
n
array is de-
termined from the dictionary based on the MPP. Although the
dictionary of a
n
can be adaptively generated according to the
processed signals [21], the optimization problem shown in (7)
cannot be solved efficiently using the exhaustive searching
method. Therefore, to improve the computational efficiency of the
MPP implementation, the Nelder–Mead algorithm is applied in the
process of searching a
n
[34]. The main computational process of
the proposed method is shown in Algorithm 1.
4. Simulation results
Simulations are carried out in the MATLAB using two types of
ECG signals: the synthetic ECG signal based on an ECG model
proposed in [23] and real ECG signals from the MIT-BIH Ar-
rhythmia Database. The signal generated by the ECG model is
applied to verify the signal denoising principle shown in Section 3,
while real ECG signals are used to verify the ECG denoising per-
formance of the proposed method. The performance of the pro-
posed method is evaluated based on the SNR and the MSE. In the
following evaluations, the SNR of the reconstructed ECG signal is
calculated by
=
∑
()
∑
^
()
()
=
−
=
−
ht
wt
SNR 10log
18
t
L
t
L
0
1
2
0
1
2
where h(t) is the synthetic ECG signal or the real ECG signal, and
^
(
wt
is the noise of the reconstructed signal which is estimated by
^
()=
^
()− () ( )wt ht ht 19
where
^
(
t
is the reconstructed signal. The MSE is calculated by
Z. Wang et al. / Computers in Biology and Medicine 77 (2016) 195–205 197