Design of IIR Notch Filter For Removal of Baseline Wander and Power Line Interference From ECG Signal
Design of IIR Notch Filter For Removal of Baseline Wander and Power Line Interference From ECG Signal
Design of IIR Notch Filter For Removal of Baseline Wander and Power Line Interference From ECG Signal
Abstract: This paper proposes a design of IIR notch filter with modified pole placements. The pole angle is derived from quadratic
programming to find the appropriate pole position on the unit circle in z-plane in order to achieve the symmetry of the amplitude
response. The simulation results are shown when compared with the conventional design technique. Moreover, it uses the
TMS320C31 DSP chip for hardware implementation. Finally, the hardware implementation can be applied to removal of ECG
baseline wander and elimination of AC power line interference in ECG signal.
Keywords: IIR Notch Filter, Quadratic programming, Optimal Pole placement, ECG
1 − 2 cos(ω 0 ) z −1 + z −2
H ( z) = (2)
1 − 2r cos(ω 0 ) z −1 + r 2 z − 2
ω
The zeros are constrained to locate on the unit circle at notch
frequency ω0 and poles are at the same radial line as zeros. ω0 π
For the stability, pole radius r must be smaller than one. When
r approaches unity, amplitude response becomes an ideal ω0 − ε ω 0 + ε
notch filter. Also, the radius r can be controlled the bandwidth Fig. 1 Assumption used for define cost function
of notch filter.
Follow by this design method, it gets the notch frequency
From Fig. 1 and eq. (3), assume k = 1. Also, the cost
which is exactly at ω 0 but it has the limitations on asymmetric function can be defined as
pass-band gain and cannot determine the pass-band gain
2
according to the desired specifications [4]. This problem causes
B (e jω )
2
A(e jω ) − B (e jω )
from the inappropriate pole position. Also, the quadratic J (a) = ∫ 1 − d ω = ∫R dω
programming can be used to search the new optimal pole R A(e jω ) A(e jω )
2
J k (a k ) = ∫ 2
dω = ρ k −1 a + 2 β k −1 a k + α k −1
2
k
normalized the pass-band gain is equal to 1. In case of the
Ak −1 (e jω )
R
conventional design method using eq. (2) and the optimization
design method using eq. (3-9) where given ε = 0.0001π
(6) and terminate the iterative procedure if J k − J k −1 ≤ 0.00001 .
where Fig. 2 shows the convergence of algorithm that uses the initial
q(ω ) values a 0 = cos(ω 0 ) .
2
ρ k −1 = ∫ 2
dω
Ak −1 (e jω )
R
Re al[ p (ω )q ∗ (ω )] 2
β k −1 = ∫ 2
dω 1.5
Ak −1 (e jω )
R r = 0.6
1
r = 0.7
p(ω )
2
0.5
α k −1 = ∫ dω
Values of Jkmin(ak)
2
Ak −1 (e jω )
0
R
r = 0.8
-0.5
-1
Minimize J k ( a k ) = ρ k −1 a k2 + 2 β k −1 a k + α k −1
-2.5
(7) r = 0.9
-3
− 1 ≤ ak ≤ 1
0 2 4 6 8 10 12 14 16 18
Subject to No. of Iterations (k)
The cost function of this optimization problem [5] is a (a) Values of minimized cost function.
parabola curve. Also, the unique closed form optimal solution
can be obtained as follows,
− β k −1
>1
0.72
⎧ if
⎪ 1
ρ k −1
− β k −1 (8) 0.7
⎪
ak = ⎨ − 1 if < −1
⎪ − β k −1 ρ k −1 0.68
r = 0.6
⎪ ρ − β k −1
⎩ k −1 if − 1 ≤ ≤1 0.66
ρ k −1
Values of ak
0.64
r = 0.7
r = 0.8
obtained. The amplitude response of notch filter becomes 0.6
r = 0.9
symmetrical. However, the pass-band gain cannot been
0.58
controlled according to the desired specification. Therefore, it
must be computed the scaling constant k which is used for
0 2 4 6 8 10 12 14 16 18
controlling the pass-band gain to meet the specifications. No. of Iterations (k)
Since, the amplitude response is symmetry already. Also,
the magnitude of transfer function at ω = 0 is equal to at
(b) Values of cos(ω p ) .
ω = π . Consider in eq. (3) with normalized maximum pass-
band gain, it can be get
Fig. 2 Convergence curve of algorithm
TABLE I
RESULTS FROM CONVENTIONAL DESIGN AND OPTIMIZATION DESIGN METHOD FOR IIR NOTCH FILTER ω 0 = 0.3π
The computed values of pole-zero position, pole angle and 5. APPLICATION TO REMOVAL OF ECG
scaling constant that is used for pass-band gain controlling is BASELINE WANDER AND POWER LINE
shown in Table I and Fig. 3 shows the amplitude response that INTERFERENCE
obtained from conventional design method when compared In particular, medical signal processing of ECG signals,
with the optimization design method using quadratic there is a need to eliminate the baseline wander that caused
programming. from very low frequency components and the AC power line
frequency [6-7]. Also, in this experiment will be divided to 2
1.6 experiments. The first, for removal of ECG baseline wander
r = 0.7
r = 0.6
which assumed very low frequency is 1 Hz. Therefore, the first
1.4
IIR notch filter has notch frequency at 1 Hz, sampling
1.2 frequency 800 Hz and 3dB bandwidth 1 Hz which correspond
to pole radius r = 0.996 with optimal pole angle ± 0.007124
Normalized Amplitude
1
r = 0.9 r = 0.8 radian. Follow by proposed method can be got the transfer
0.8 function as follows,
0.6
0.2
0
and the amplitude response can be shown in Fig. 4.
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Normalized Frequency
1.1
1.2 0.9
1
0.8
r = 0.6
Normalized Amplitude
0.8
r = 0.7 0.7
r = 0.8
0.6
r = 0.9 0.6
0.4
0.5
0 50 100 150 200 250 300 350 400
0.2 Frequency (Hz)
0
Fig. 4 Amplitude response of removal of ECG baseline wander
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Normalized Frequency filter