Advanced Template Matching Algorithm
Advanced Template Matching Algorithm
net/publication/318123367
CITATIONS READS
19 612
4 authors, including:
Alexander Koelpin
Technische Universität Hamburg
290 PUBLICATIONS 2,582 CITATIONS
SEE PROFILE
Some of the authors of this publication are also working on these related projects:
NeoWatch: Non-contact monitoring system for neonates on the NICU View project
All content following this page was uploaded by Christoph Will on 21 May 2019.
Abstract—Instantaneous heartbeat detection is a key parame- If heart rate identification is not sufficient and instantaneous
ter in modern vital sign monitoring. Continuous wave (CW) radar heartbeat detection is required, advanced algorithms have to
systems enable contactless measurements of the vibrations on be used. A cross-correlation based template matching for CW
the human skin effected by heartbeats. Since a high accuracy as
well as robustness of the measurement sensor is appreciated, the radar systems was published in [6]. Similar to BCG [7] and
belonging signal processing routine has to deal with challenging PPG [8] based template matching approaches, the signal curve
requirements. In this paper, an advanced template matching of the used templates included the dicrotic notch which depicts
(ATM) algorithm is proposed to enhance the performance regard- a typical characteristic in pulse signals [9]. The closing of the
ing instantaneous heartbeat detection using CW radar systems. cardiac valve as well as reflections of the vasodile blood wave
Compared to common template matching algorithms, multiple
heterogeneous templates are utilized in this approach, at which at blood vessels and forks cause this notch. In some cases
the appropriate template type is determined by prior feature a second notch caused by the venous pulse effect produces
detection. A 24 Ghz Six-Port microwave interferometer is used for another local maximum prior to the main maximum of a
vital sign measurements of a person-under-test. The functionality heartbeat signal [9]. Especially on the thorax several effects are
of the proposed algorithm is verified by a synchronous reference superimposed [10], for which reason the heartbeat signal curve
electrocardiogram (ECG) and its enhancement is shown by
reducing the root-mean-square error (RMSE) of the interbeat can have different shapes. Additionally, the required filtering
intervals (IBI) compared to an ordinary template matching to extract the heartbeat signal has an influence on the resulting
algorithm. signal curve. Therefore, using a single template is insufficient
Index Terms—biomedical signal processing, digital signal pro- for a desired perfect detection probability.
cessing, electromagnetic measurements, radar interferometry, Several algorithms have been published to enhance the
radar signal processing.
robustness of radar based vital sign monitoring, like random
body movement cancelation [11]. In this paper, a different
I. I NTRODUCTION approach for an increased robustness is proposed, the usage of
multiple heterogeneous templates. These templates are defined
Accurate vital sign monitoring is essential in hospitals, by various features, similar to a feature based correlation
but additionally, it is useful if not even required in further algorithm for ultra-wideband (UWB) radar systems [12]. Prior
application fields. Health status recognition of a car driver [1] to the measurements, a training phase is necessary, in which
and monitoring of a sleeping child at home to expeditiously several templates of each type are generated. During subse-
detect apnea or the Sudden Infant Death Syndrome [2] are just quent classification these templates are utilized for a fast and
two examples. Since contactless measurements of breathing accurate heartbeat detection.
and heartbeat are appreciated in such application examples,
radar based approaches are preferred to electrocardiography II. A DVANCED T EMPLATE M ATCHING
(ECG), ballistocardiography (BCG) or photoplethysmography
(PPG). Radar systems utilize the large difference of the A. Definining the heterogeneous template types
electromagnetic permitivity between air and human skin which Since a single heartbeat signal shape as template type impli-
causes a reflection of the emitted radio frequency (RF) signal. cates limited robustness regarding different persons-under-test
Heartbeats cause vibrations on the thorax which can be de- and varying measurement points on the body, the proposed
tected as Doppler shifts by CW radar systems. ATM algorithm utilizes a variety of templates which can be
First radar based vital sign detection was achieved in 1975, categorized in five heterogeneous types. Exemplary curves
at which the respiration of a cat was monitored [3]. Over the of the unequal heartbeat signal shapes are shown in Fig. 1.
years the radar technique advanced and the research on CW Type 2 depicts the signal shape of the templates used in [6],
radar systems for vital sign monitoring increased in the early including the dicrotic notch. The other types were defined
90s [4]. Beside hardware enhancements, the corresponding due to their similarly high occurrence probability in empirical
signal processing routines were improved, too. Previously investigations of heartbeat signal shapes of different persons-
published algorithms mostly determine the heart rate of the under-test.
person-under-test. In [5], for instance, the periodicity of the The signal shape of every template type contains multiple
heartbeat is utilized within an autocorrelation based approach. characteristic points, which are declared as features. These
Filtered signal PK VL RDP RDV FDP FDV C. Training stage
Before ATM based heartbeat detection measurements are
possible, a template database has to be generated within a
training stage. Here, the heartbeat signals of one or better
various persons are measured by the used radar system for
a sufficient time frame to ensure that multiple signal curves
for every heartbeat type are acquired. Contemporaneously,
(a) Type 1 (b) Type 2 (c) Type 3 (d) Type 4 (e) Type 5
during training, an ECG signal of the particular person-under-
test has to be synchronously recorded to enable a subsequent
Fig. 1. Five heterogeneous types of heartbeat curves. verification of the determined heartbeat positions.
The acquired radar signal is filtered and subsequently
investigated regarding the template types 1...4 by scanning
are the six features that are also used in the feature based the signal for their specific feature sequence. No templates
correlation approach for UWB radar systems published in [12]: are generated for the type 5 heartbeat shape since the peak
prominence as well as the time difference to the adjacent peaks
• PK: peak (dx(t)/dt = 0 and d2 x(t)/dt2 < 0) are examined. The correctness of the heartbeat detection for
• VL: valley (ds(t)/dt = 0 and d2 s(t)/dt2 > 0) the signal shape types 1...4 are verified by means of the ECG
• RDP: rising derivative peak reference. For correct detections, the corresponding cutout,
(ds(t)/dt > 0, d2 s(t)/dt2 = 0 and d3 s(t)/dt3 < 0) whose borders are defined by the (outer) valleys, is extracted
• RDV: rising derivative valley and saved as an exemplary template for its appropriate type.
(ds(t)/dt > 0, d2 s(t)/dt2 = 0 and d3 s(t)/dt3 > 0) Additionally, the cutout is resampled to a predefined nor-
• FDP: falling derivative peak malized sample length m to ensure a proper comparability
(ds(t)/dt < 0, d2 s(t)/dt2 = 0 and d3 s(t)/dt3 < 0) independent of the sample rate during classification.
• FDV: falling derivative valley
(ds(t)/dt < 0, d2 s(t)/dt2 = 0 and d3 s(t)/dt3 > 0) D. Classification stage
The sequences of the feature occurrences are specific for the The first step during classification of new measurement data
signal shapes of every template type, whereas the start as well is extracting the previously defined features. The extracted
as the end of all template types are each defined by valleys: features are afterward used to detect the sequence types 1...4
(1) VL→RDP→PK→FDV→FDP→FDV→VL within the measured signal just as during the training stage.
(2) VL→RDP→PK→FDV→VL→RDP→PK→FDV→VL When a characteristic sequence is detected, the appropriate
(3) VL→RDP→PK→FDV→VL→RDP→PK→FDV→VL cutout is resampled to the normalized sample length m.
(4) VL→RDP→RDV→RDP→PK→FDV→VL Thereafter, this cutout Am is cross-correlated with all saved
(5) VL→RDP→PK→FDV→VL templates Bm,i of the corresponding type, which were gen-
erated within the training stage, to calculate the correlation
coefficients ri , at which the zero-mean values of both vectors
B. Challenges of the feature detection are used:
P
Since type 2 and type 3 have the same feature sequence, Am − Ā · Bm,i − B̄i
the heights of the two peaks within one signal curve have to ri = rPm 2 P 2 (1)
be compared amongst each other. If the first peak is higher Am − Ā · Bm,i − B̄i
than the second one, the investigated signal cutout is a type 2 m m
heartbeat shape. Otherwise, the signal output depicts a type 3 If one correlation coefficient is higher than a predefined
shape with the dicrotic notch prior to the main heartbeat peak. threshold rmin , the examined cutout is determined as a heart-
A second inconvenience represents the fact that two consec- beat. The exact position of the occurred heartbeat is defined
utive type 5 heartbeats have the same feature sequence as one by the (higher) peak within the cutout. For type 2 or type 3
type 2 and type 3 heartbeat shape. Therefore, to distinguish curve shapes, the lower peak is explicitly marked as a non-
two consecutive type 5 heartbeats from the other two cases, heartbeat. The remaining type 5 peaks are classified regarding
additional curve characteristics have to be examined. Here, the their prominence and their distances to the adjacent peaks.
time difference between the two peaks compared to the latest
detected interbeat interval (IBI) values is a criteria as well as III. M EASUREMENT S YSTEM
the prominence (”height”) of the valley between the two peaks New vital sign measurements were performed to verify
regarding the ordinate values of the outer valleys. The curve the functionality of the proposed algorithm. Here, a Six-Port
cutout is determined as a type 2 or type 3 heartbeat shape microwave interferometer was used, which is a specific type
if the valley in the mid is positioned higher than the half of of CW radar. Primarily invented for power measurements by
the maximal height of whole cutout and simultaneously higher Engen and Hoer in the 1970s [13], the Six-Port network is
than both outer valleys. nowadays also utilized as a quadrature interferometer [14] for
radar applications. The complete passive structure implicates a the antenna and was breathing normally. The Lead II of
high phase accuracy as well as a low power consumption and Einthoven’s triangle, which is the voltage difference between
low costs. In these measurements, a monostatic system variant a left leg electrode and right arm electrode [10], was chosen
was chosen, whose block diagram is depicted in Fig. 2. The as ECG reference signal in the training stage and also for
radio frequency (RF) signal is generated by a PSG Analog verification in the classification stage. The Pan-Tompkins
Signal Generator E8257D from Keysight at a frequency of algorithm [15] was utilized to detect the QRS complexes
24,05 GHz and an output power of 5 dBm. A 10 dB coupler within the ECG signal. The values for the tuning parameters
splits this RF signal into two parts, whereupon the major of the ATM algorithm were chosen as in the following:
part is transmitted through a circulator to be emitted by a • fl = 0.5 Hz (lower bandpass cutoff frequency)
small horn antenna with a gain of 15 dB. The transmitting • fu = 3.0 Hz (upper bandpass cutoff frequency)
(TX) antenna is focused on the thorax of a person-under-test • rmin = 0.85
and simultaneously works as a receiving (RX) antenna. The • dmin = 0.50 (min. required distance to adjecent peaks)
received signal is fed through the circulator to one of the two • pmin = 0.05 (min. required prominence of the peak)
Six-Port inputs. The other input port is fed by the minor output
Here, the used bandpass filter was implemented as a forth
signal of the coupler.
order Butterworth filter, and dmin as well as pmin are the
threshold values for a type 5 shape heartbeat classification.
Thorax
To emphasize the robustness of the algorithm, the person-
PSG 10 dB TX/RX under-test during this classification was another person than
the one who was utilized in the training stage to generate
the heartbeat templates. In total, around ten exemplary signal
Heartbeat curves per template type were generated in the training stage.
Six-Port A classification cutout of the filtered radar signal as well as
the detected features are illustrated in Fig. 3.
500 samples per second is used for data acquisition. The 0.25
Six-Port baseband voltages are sampled differentially and
synchronously with the output voltages of two electrodes that 0.0
have to be attached on the person-under-test during the training
-0.25
stage. The acquired data is sent via Ethernet to a personal
computer where further signal processing is performed. -0.5
0 4 8 12 16
IV. M EASUREMENT R ESULTS Time (s)
During the performed measurements, the person-under-test
was sitting at a distance of approximately half a meter to Fig. 4. Detected heartbeat types in the filtered radar signal.
The exact positions of the detected heartbeats in the belong- feature detection prior to the cross-correlation and the utiliza-
ing unfiltered radar signal are depicted in Fig. 5a, together with tion of multiple templates of heterogeneous template types
the detected R-peaks of the ECG reference signal. In subplot which improves the robustness as well as the accuracy of
5b the template matching results of the algorithm in [6] (XCF) the heartbeat detection. A Six-Port microwave interferometer
are shown which enables a first accuracy comparison. and a reference ECG were used for verification measurements.
Despite the fact that the used templates had been generated
3 with a different person within a prior training stage, the
Relative distance (mm)