i&i. L’ng. f’hys. Vol. 18, No. 2, pp. 1.3-160, 1996 Copyright Q 1996 Elsevicr Science Ltd lor IPEMB Printed in Great Britain. All rights resen,cd
1350-4533(95)00035-6
ELSEVIER
1350-4533/96
Design of an FECG scalp electrode rate monitor F. Bereksi
Reguig*
1%15.on+ n.00
fetal heart
and D.L. Kirkt
“Departement d’l?lectronique, Institut des Sciences Exactes de Tlemcen BP.1 19, 13000, Algerie;tDepartment of Electrical and Electronic Engineering, University of Nottingham, Nottingham NG7 2RD, UK Received 14 July 1994, accepted 16 February 1995 ABSTRACT The design of a fetal heart rate (FHR) monitor using fetal electrocardiogram (FECG) scalp electrodes is described. It is shown that the design approach followed two stages: generation of FHR pulses at R-R intervals and FHR computation. The former uses a simple hardware approach for QRS detection and R-wave enhancement, while the latter requires a software implementation in order to produce FHR traces on a beat to beat basis. The QRS o!etection is based on bandpass filtering using switched mode capacitor technique; the R-wave enhancement and amplitude information are achieved by differentiation followed by fullwave rectzfication and peak detection. An adaptive threshold together with a comparator circuit are used to generate FHR pulses at R-R intervals. Beat to beat variations of FHR traces are produced by hardware and software implementation on a %80 microprocessor board. Results obtained by the FHR monitor are evaluated and contrasted to other commercial FHR monitors.
Keywords: FHR monitor, QRS detection, beat to beat FHR variations Med. Eng. Phys., 1996, Vol. 18, 150-160,
R-wave enhancement,
switched
mode
capacitor
technique,
March
INTRODUCTION Since 1958, when Han’ reported the usefulness of electronic evaluation of the fetal heart rate (FHR), different techniques and approaches have been used in order to enhance and improve the FHR recordings. Hon evaluated two electronic systems for measuring fetal heart rate. These used abdominal electrodes. He showed that although these systems performed much better than the previous auscultatory systems in counting FHR beats, they suffered from the poor signal-to-noise ratio of the fetal electrocardiogram (FECG) signal. In 1963 Hon2 described the use of a vaginal electrode and showed that the signal-to-noise ratio could be improved with highly satisfactory recordings of FHR being obtained with the improved electrode. By the end of 1966, a more rigorous study to relate the FHR to the fetal physiological condition had been made by Bemmel and Weide3. They stated that the monitoring of the FHR and the FECG of an unborn child during gestation and delivery was a detection problem and developed an on-line method of performing this detection. The detection scheme was based on an analysis of the abdominal signal with regard to three separate criteria: frequency, amplitude and statistical properties of the signal. In the fre-
quency domain they found that the fetal R-wave was in a frequency band between 15 and 40 Hz. In the time domain, the random nature of the noise and the periodicity of the FECG led them to distinguish noise and R-waves. However the results they obtained were not satisfactory. Subsequent work by Bernmel described a method of detecting fetal R-waves in adverse noise conditions by the use of abdominal electrodes. Bemmel was able to reject the interfering maternal ECG signal by the use of cross-correlation techniques described earlier by Favret and Caputo. ‘s6. Autocorrelation techniques were then used to detect the FECG waveform from the remaining noise once the maternal ECG had been eliminated. Many researchers in the seventies used the known shape and large amplitude of the QRS complex to develop different digital techniques to accurately locate in time the QRS complex. Simoons et al. ’ described a system based on template matching algorithm, combined with a system of differential triggering to establish the existence of a QRS complex. Shield8 designed a software method of QRS detection based on the use of matched filter techniques. With the increase in computer power and development of digital hardware, more and more QRS detection algorithms have been developed basically including one or more of the three pro-
c
Amplification & isolation
QRS-wave fitter
R-wave detector
a
1 Scalp electrodes
I
t
9
Generation of pulses at R-R intervals
Printer FHR trace
_
ZRO Processor board
I
I
n
AGND
--5V
I
Outpu1
I
l/h I
20 Switched
mode capacitor filter MF 10
Switched
mode capacitor filter MF 10
I I
IAGND-5V
filter Figure
2
FC = 48Hz
E:i+rh
oltlcr
handpass
filtc-r
circuit
diagranl
formation and decision based rule algorithm are respectively implemented in a simple hardware approach based on bandpass filtering, fullwave rectification and adaptive threshold. This hardware implementation, complemented by simple software routines, enables on-line detection and continuous recording of variations in fetal heart rate. FHR traces we obtain are contrasted to those produced by commercially available FHR monitors which use a software approach in FECG signal processing.
Requirement
cessing steps: linear digital filtering, non-linear transformation and decision based rule algorithm. In this paper we present a similar method in which linear digital filtering, non-linear trans-
of the monitoring
system
The design of the system followed two broad parts: (1) Generation of FHR pulses at R-R intervals comprising: the QRS filter, the R-wave enhancement and the adaptive threshold. (2) FHR computation comprising: frequency conversion in beats/min and FHR recording.
151
Design
of an R?CC: scalp electrode fetal
heart rate monitor:
-.-.-.-.-.-.-.-._.-_-.
!’ I
820R
and D.L.
Kirk
1 2.2uF I I
=I
F. Bereksi Reguig
10K
I
i
2.2UF
I
7.SK
I AGND+ AGNDl -J i.-.-.-.-.-.-.-.-.-.-.-.-.
10K
IOK
i i
w l.i
.
P
IN4004
10K g
-9 AGND
AGND
(a) Diffemntiater Figure
THE
4
Differentiator
(b) Full wwc ruiifim
and full-wave
rectifier
S/N ratio conditions, matched filtering has been shown to provide a significant improvement in detection performance as compared to differentiation or level detection techniquesg; but it provides little or no improvement compared to bandpass filtering lo . Optimal filtering views the signal as a stochastic process and tries to minimize the error due to noise by means of the least square estimator method. Such filters include the a posteriori Wiener filter and the recursive Kalman filter algorithm. However their application is limited, owing to the fact that they assume a priori knowledge of the statistics of the signal and noise processes. Furthermore they are unsuitable in the low S/N ratio case” and could not be easily
QRS FILTER
It is known3x4 that the power of the FECG appears to be favourable in the frequency band 15-40 Hz. Many techniques of QRS detection are available including bandpass filtering, matched filtering and optimal filtering. Bandpass filtering is the simplest technique and has been used with varying degree of success for low noise-level applications. Matched filtering maximizes the S/N ratio but requires a priori knowledge of the QRS complex waveshape and power spectrum of the noise sources, since this method involves a filter whose impulse response is merely the time inverse of the waveform to be detected. In moderate-to-large
.-.-.-.-.-
I‘-‘(C)
5vI ec-4 i
Comparator with hysteresis
FECG ,JJ
I
pulses u
.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
I
IS”
full wave
A&ND
.
I’.. -.-.-.
AGND
L ._._.-.-._.-.-.-.-.-.-.-.-.-.-. (a) Figure
152
5
Peak
detector,
AGND -.-.
AGND
I
J
(b) Variable
Peak detector
variable
attenuator
and
mixer,
and
comparator
with
hysteresis
circuit
attenuator diagrams
and mixer
(1)
Bandpass filtered FECG signal
Differentiated FECG signal
FECG signal from tape
FECG signal from tape
(4)
tVi i i ilil i i i/i I Fullwave rectified FECG signal
Peak detected FECG signal
THE R-WAVE DETECTOR The slope of the R-wave is a popular signal feature used to locate the QRS complex in many QRS detectors12. Such slope information can be straightforwardly provided by means of analogue circuits or a real-time derivative algorithm. However by its nature a derivative amplifies the undesirable higher frequency noise components. Also many abnormal QRS complexes with large amplitude and long durations are missed in a purel) derivative approach because of their low R-wave slopes. Hence R-wave slope alone is insufficient for proper QRS detection. It is therefore necessar) to extract other parameters from the signal such as amplitude, width and QRS energy which can be achieved using softwzu-e algorithms”,“. In the system where the major requirement is to implement the R-wave dktector in hardware, such parameters, especially width and QRS energ) require cumbersome hardware. Thus a simpler approach was used based on differentiation to give R-wave slope enhancement, fullwave rectification and peak detection to provide R-wave amplitude information. Finally an adaptive threshold together with a comparator circuit was used to generate pulses at R-R interv&.
(3)
FECG signal from tape
FECG signal from tape
implemented in real time by using simple electronic components. The bandpass filter is perhaps the easiest and most reliable technique for low S/N ratio applications. This was chosen for QRS detection and implemented in the system. However, the centre frequency and bandwidth must be carefully chosen so as to obtain the maximum S/N ratio for most conditions and situations. The filter must also have a sharp frequency roll-off‘ thereby attenuating both the low frequency Twave and the higher frequency EMG (muscle artefacts) noise without excessive QRS level loss.
(2)
FETAL
HEART
RATE COMPUTATION
Fetal heart rate computation is necessary in order to monitor fetal heart rate variabilify. The process of FHR computation was divided mto two parts: one hardware and the other software. In hardware, computation of FHR was made using binary counters to count clock pulses at R-R intervals. The number of bits used determines the precision at which the FHR variations are measured. The longer the string (number of bits) the more precisely the measurement is made, the limitation being in the hardware complexity. In software, the generation of fetal heart rate was achieved by Implementing on a 280 processor based board an algorithm which converts the counted pulses at R-R intemlls into beats per minute.
DESIGN
OF THE MONITORING
The design of the monitoring block diagram of I$pw I.
Isolation
SYSTEM system follows
the
and amplification
The maximum signal from a scalp electrode is in the order of few millivolts, so high common mode r,cjection is the main requirement of the ampliher. The analogue device (2865) high performance isolation amplifier provides such isolation and amplification and was used in the system.
QRS wave filter The power spectral density of the FECG located within the frequency range of 15-40 Hz is central to the design of the QRS filter. In the system a new technique with switched mode capacitor filters is llsed. Many integrated circuits which use this technique are now available, among them the MFlO
153
Design
of an
WCG
scalp electrode fetal heart rate monitor:
F. Be&i
Reguig
and D.L.
sampled data filter which was used in the system. They are both stable and easily tunable by varying the switching clock frequency. A fourth order bandpass filter was first experimented before an eighth order bandpass filter was implemented as depicted in Figure 2. The choice of a minimum resistor value for the QRS bandpass filter was made taking into account the fact that internal operational amplifiers of the MFlO can source a 3 mA current and sink 1.5 mA. A high stability multiturn potentiometer Rl was used to allow gain control of the filter. Figure3 shows the frequency response of the filter, a 3 dB passband from 18 Hz to 37 Hz and 24 dB/octave roll-off were achieved. These were reasonably close to the design goal.
slope information information.
order,
(b)
FECG input signal with 0.2~ added noise
rec@cation. After differentiation, the signal was fully rectified (Figure 4b) so that if an FECG waveform has negative-going R-waves
Sv/div
.lv/div
I
I
I
I Timebase
Output of eighth bandpass filter
(d)
FECG input signal with 0.2~ added noise
154
Input
FECG
signal
with
0.2 V added
I
I
I
I
noise
J
1 OOmsldiv
O.Zvldiv
0.1 vldiv
I
‘I Timebase
7
I
order
I
Figure
last two amplitude
Fullwave
u
I
(c)
the
The differentiation was approximated by a second order bandpass filter designed to provide a frequency response as linear as possible in the region of lo-30 Hz approximating therefore an ideal derivative giving R-wave slope information and to provide maximum amplification in this region (around 9 dB). The circuit is depicted in Figure 4a. A resistor Rl connected to ground was used to provide impedance matching to the bandpass filter. In addition this circuit provides smoothing to the filtered FECG signal in that it eliminates the beat frequencies which appear at the output of the QRS filter when the input frequency approaches the filter clock frequency.
The R-wave detector was divided into three sections: differentiation, fullwave rectification and peak detection. The first section provided QRS
Output of fourth banbpass filter
and
DifSerentiation.
R-wave detector
(a)
Kirk
and
corresponding
outputs
1OOmsldiv of fourth
and
eighth
order
bandpass
filters
5dBIdiv
(a)
FECG frequency spectrum OHz
lOOH
OH2
1OOHz
OH2
1OOHz
OH2
1OOHz
SdB/div
(b)
Filtered lrequency
FECG spectrum
5dBIdiv
(c)
FECG frequency spectrum
SdB/div
(d)
Figure
8
Input
FECC;
Differentiated FECG frequency spectrum
frequency
sprctrum
and corresponding
outputs
(inverted FECG signal) it may be easily detected and taken into account in R-R interval measurements. A general purpose op-amp 741 was used; this did not affect the circuit operation in any way since the frequency of interest was around 40 Hz. Peak detection. The last stage to provide QRS amplitude information was peak detection. The circuit used is given in r;iscLre 5a. It is an active peak detector. The LM393 was chosen as input driver because it presents a low input biasing current 2.3 nA, and the 741 op-amp as output follower. Generation
of pulses
at R-R intervals
This was achieved by implementing in the system a comparator with hysteresis along with an adaptive threshold. One simple solution would be to set the threshold at a fixed level. However this appeared to be unsatisfactory since some R-peaks
of fourth
and
eighth
ol-drr
bantlpav
filters
were missed. A better solution was the adaptive threshold. This was generated using a variable attenuator and mixer (Figwe 5~). The fully rectiified signal was fed through a low pass filter with a large time constant; this produced a signal which followed the variations of R-peaks. The varying signal was then fed to the variable attenuator and mixer. A variable resistor of 47k provided trip setting and a IOk provided maximum sensitivity setting. At the output of the circuit a d.c. level was produced and was used as a threshold level for the comparator with hysteresis (Figure 5b). The positive feedback resistor within the comparator ensured rapid transitions regardless of the speed of the input waveform. The pulses obtained were at R-R intervals frequency regardless of their duration which is not of great importance compared to their frequency which corresponds to the fetal heart rate. I;igur~ 6 illustrates the signals at the output of the different stages adopted in the FECG signal processing.
155
Design
of an FECG scalp electrode fetal heart rate monitor:
(a)
Output of fourth bandpass filter
(b)
I;. Bmksi
Reguig
and D.L.
order
O.Pvldiv
FECG input signal with iv added noise
O.Cv/div
Timebase
of eighth Output bandpass filler
(c)
(d)
Kirk
200ms/div
order
.2vldiv
FECG input signal with iv added noise
.5vldiv
Timebase
200msIdiv
Svldiv
(e)
Triggering
consistency O.Svldiv
Timebase Figure ency
9
Input
FECG
signal
with
1 V added
noise
and corresponding
Interface The purpose of this interface was to provide the data to be processed along with the handshake signals to the 280 processor based board. In order to measure FHR variations a 12-bit binary counter was used to count clock pulses between successive heart beats. A 1 kHz clock frequency was used providing a good FHR measurement resolution. The interfacing of the counter to the 280 processor board required the use of two octal buffers so that the 8 least significant bits were selected, then the 4 most significant ones of the 12 bits data. Finally for the monitoring system to work a system software program had to be written in assembly language to perform the basic operations of fetal heart rate measurement and digital printer driving.
156
outputs
200msldiv of fourth
and eighth
order
bandpass
filters
and triggering
consist-
RESULTS Evaluation
of the QR!3 detection
circuit
The reliability of fetal heart rate determination depends upon the R-wave detection capability of the monitoring system. A number of tests to show the performance of the bandpass filter have been carried out, using raw FECG signals previously recorded in labour wards at Nottingham Queen’s Hospital. Figure 7 illustrates the results obtained. It shows the performance of the bandpass filter in matching the QRS waveform even in the presence of excessive white noise levels which were added to the recorded raw FECG. The location and enhancement of the R-wave in the amplitude domain were also considered by evaluating the performance of the differentiator. Comparing the
frequency spectrum (which was recorded using the Scopadaptor spectrum analyser) of the filtered FECG (Figure 8b) with the frequency spectrum of the differentiated FECG signal (F&WY 86) it can be seen that the frequency domain corresponding to the R-wave has been enhanced from 10 dB up to -20 dB. However the large low frequency component appearing in the frequency spectrum is respectively Figure 8b and d is due to d.c. signal levels. Finally the adaptive threshold with the comparator allowed a high consistency of triggering, event in successive waveforms as can be seen in Fzgure 9~. Evaluation
of FHR traces
The FHR traces produced by the system were assessed and compared to the ones produced by a number of commercial monitors by considering the features which affect their clinical interpretations and susceptibility of these cardiotocograph to commonly occuring errors or problems. These features include the following: (i)
Equipment induced errors: for example, mistiming of the fetal heart interval may be obscure the true baseline FHR variabilitv.
(ii)
L,oss of fetal heart rate signal during contractions. (iii) Substitution of missing data by the cardiotocograph in order to provide continuous tracings. (iv) Inability to trace rapid changes in rate for example in patterns of accelerations and decelerations.
Reproducibility
of F’HR traces
This test was carried out in order to study the system induced errors and their effect on the FHR trace. A specific recorded raw FECG signal was fed into the system for a defined period of time and the FHR trace was recorded. This test was repeated five times and at two different stages of labour, in order to study the reproducibility of the FHR traces. First, during a stage of labour where FHR was relatively steady, and as shown in ~@~re 10 the traces were accurately repeated with a clear baseline fetal heart rate variability suggesting that the system-induced errors are inslgnificant. Then during a second stage of labour in the presence of excessive contractions, the FHR trace showed long deceleration and acceleration per-
157
DeJ ;igrl
of an FECG scalp electrode fetal heart rate monitw:
Figru re 11
Rc zproducibility
of FHR
I;. Bereksi h!eg-uig and D.L.
Kirk
traces
Huntleigh 2000 showing high spikes of noise
ECGlCll
:04:00
Y” :04:10
ECGlCM
“” ECGK” SONICAIO -
-ibo-80.. . . 1
1
-60
]
) 19:49
Figure
12
Comparison
of different
FHR
I 04.,11.1$88
traces
. I
I , Fi-i7 ECG
ICMIMIN
6 I TOCO-EXT
I
/
1
] ,-60 IS:04
0
I 04.11.1988
FH7 ECG
Hunclelgh 2000 showing loss of FH data
i FCDICM
:04:40 lr!
!
!
!
ran 1.LVU
I
-1-1 i
i
Sonicaid FH7 showing loss of FHR data
lcmlmin
System resolv FHR data
____ sONtC*tO _-.._’
. .
0-
:04:50 1200
ECGICM ’
’
I
:05 00 200
-2 1
foco-EXT
ing
I-
iods (&UW 1 I), again here the traces were accurately repeated indicating that there was no mistiming of fetal heart intervals and no loss of FHR. Comparison
of different
FHR traces
The system produced FHR traces on a beat-to-beat basis. However, FHR traces produced by most commercial machines are based on averaging three or four beats. A set of FHR traces was recorded from different commercial machines and contrasted to the FHR traces produced by the system. As is clearly shown in E;iffure 12 the commercial systems failed to resolve fine structure in FHR variations, especially the Huntleigh 2000 monitor where high spikes of noise appeared on the trace. However, Sonicaid FM7 produced FHR traces with better baseline variations but did suffer from some problems in resolving the fine structure of the heart rate. In a different circumstance (J4g~re 13) and in the presence of accelerations and decelerations, these commercial monitors totally failed in recording FHR variations, things which did not happen in the designed system. The FHR traces they produced show discontinuities and gaps indicating their inability to trace rapid changes in accelerations and decelerations. CONCLUSION In summary, the signal recognition (recognition of the QRS waveform) and enhancement (enhancement of the R-wave) techniques built in the system showed an excellent ability to distinguish the true FECG parameters from noise, in adverse conditions of S/N ratio. The interface circuit along with the software implemented on a
280 processor board produced FHR traces free from spikes of noise and clearly following fetal heart rate mriations with the knowledge that the FHR was being printed on a beat-to-beat basis. It showed a high reproducibility of FHR traces in extreme noise conditions. It was also capable of following rapid changes in heart rate in the presence of accelerations and decelerations. REFERENCES Han EH. The elccrronic evaluation of the fetal heart rate. prelitninat-y report. .\VL 1 Ohslf~l Cyn~cnl 19.58; 121% 30. Han EH. Instrumentatioll of fecal heat-t t-ate and fetal elcctrocardiograph7;, 2, a vaginal elrctrotl~~. ,Avr~,J Olxtrt GTnrcol 1963; 772-84. B&ttnrl JM’, X’anderweide, H. Detection procedure to rcprescnt the fetal heart rate and ~lcc-trocardiogram. I123 ‘l‘mns Biomed Eng 1966; 13: lT.“+X’L. BrrtttnelJ~. Dctrction of weak fetal r,lrctro~ardiograms by autocorrelation and crosscorrelation of envelopes. tb2.T: ?)an,s Biornvd Erg 1968; 15: 17-23. Favret A<;, Caputo AF. Application of’ computer techniqttcs to the fetal electrocardioSr;ttil. IS/o?wd Sri ins/ 196‘9. . 317-23. Favrel AC;, (:aputo AF. Evaluation of autocorrelation techniques for detection of the fetal ~lc~trocarctiogram. 11+X Trnns Riomrd I:‘ng 1966; 13: 37-43. Simoons ML, Book BK, Stnallenberg E. On line proccssittg of orthogonal exercise clrc trocardiogram. Corrcput Hiomrd Krc 1975; 8: 10.5. Sheild JEA. Srt~eillance of Asphyxia with FcLal Electracardiogram Evaluation. [PhD thrsis) Nottingham Ilttiversit?, 1977. Mottds FB, Telford RW. Matchczd ti1tr.r location of E(X; complexc~s. I&Z ConJAppl Electron i2fvd I :nwcwity oJcSouthcl~npton. I:n$:lnnd April 19i6; 1 1 l-8. A/c\cdo SC. I,ottgini R. Ahdotninal Icart li%t;tl vlectrocar-
159
Design
of an FECG
scalp electrode fetal heart rate monitor:
I? Bereksi
Reguig and D. I>. Kirk
diographic R-wave enhancement for heart rate determination. IIZE Trans Biomed Eng 1980; 27: 255-60. 11. de Woered JPC. Facts and fancies about a posteriori Wiener filtering. IEE l’rans Biomed lhg, 1981; 28: 252-7. 12. Ahlstrom ML, Tompkins WJ. Automated high speed analysis of Holter tapes with microcomputers. Zfi%E Earrs Biomed Eng 1983; 30: 651-7.
160
13. Nygards M, Sornmo I,. A QRS delineation algorithm with low sensitivity to noise and morphology changes. Cornput Cardiol 1981; 347-50. 14. Ligtenberg A, Kunt M. A robust digital QRS detection algorithm for arrhythmia monitoring. Compul Binmed Kes 1983; 16: 273-86.