
 
signal in time-domain; this first step is crucial for the 
successfulness of the whole diagnostic process. Our 
method is relatively simple and was developed for 
the detection of QSCG pseudo-periods in real time. 
The method is derived from a well-known and 
robust algorithm for QRS complex detection in 
traditional electrocardiograms (ECG), originally 
developed by Hamilton et al. The algorithm was 
based on the first derivative of the input signal and 
many thresholds and parameters are automatically 
adapted to individual changes in the input signal 
using sophisticated empirical rules. The results 
(position of the dominant – so-called R - wave) are 
obtained with some detection delay (above 200 ms). 
For details on the algorithm, see [Hamilton].  
For our purposes it is important that the initial 
values of many parameters are adjustable and by 
modification of these values the original method was 
slightly adapted to QSCG’s different curve 
morphology. Namely the following parameters were 
changed: (1) length of the first derivative from the 
original 10 ms to 80 ms, (2) length of the high-pass 
pre-filter from 125 ms to 350 ms, (3) length of 
moving window integration from 80 ms to 200 ms. 
Optimal values were selected experimentally in 
order to achieve the best detection results.  
Additionally, we developed a special backward 
searching process for the precise detection of the 
position of the I-wave and J-wave in each QSCG 
pseudo-period. 
The function of the whole algorithm is as follows: 
output of the traditional ECG QRS detector gives the 
rough position of the systolic complex inside the 
QSCG - candidate X. Then the specific morphology 
of the QSCG curve is utilized to backward search 
the position of the J-wave – we expect the first big 
negative peak in MTI samples (about 100 ms). If the 
detection is successful, we assign the position of the 
peak as the I-wave; see Figure 8.  
 
6000
7000
8000
9000
10000
11000
12000
13000
1 58 115 172 229 286 343 400 457
time [samples]
Force  (quant. le ve ls )
X
I
H
K
L
I
max
MTI
 
Figure 8: Backward local I-peak searching in the QSCG 
cycle. 
Finally we search forward for the position of the 
J-wave, which we expect to be the first big positive 
peak in maximally MTJ samples (about 160 ms), see 
Figure 9. 
 
6000
7000
8000
9000
10000
11000
12000
13000
1 58 115 172 229 286 343 400 457
time [samples]
Force (quant. le ve ls )
I J
H
K
L
J
max
MTJ
 
Figure 9: Forward local J-peak searching in the QSCG 
cycle. 
For the peak-detection we used a very simple 
method based on the first difference (length 15 ms): 
when the transition from negative to positive value 
of the difference occurs, then the sequence is marked 
as a negative peak; the transition from a positive to 
negative difference means a positive peak. If 
searching for the J-wave or the I-wave fails, 
candidate “X” is rejected and the algorithm 
continues without detection of the QSCG pseudo-
period.  
The rejection of “candidate X” is very important 
step and it increases robustness of the whole 
detection procedure against the artifacts – see 
demonstration on the Figure 10. 
8800
10800
12800
1 11 21 31 41 51 61 71 81 91 101 111 121 131 141 151 161 171 181 191 201 211 221
time (samples)
Force (quant. levels)
X3
I
max
MTI
 
Figure 10: Rejection of the false beat detection. We search 
backward from “candidate X3” for the first big negative 
peak. The I-wave must be recognized in MTI samples 
(about 100 ms), so in this case the detection was not 
successful. 
The false detection of the dominant “candidate 
X”, which is not a true QSCG cycle, was corrected 
by the proposed simple backward searching 
ICINCO 2006 - SIGNAL PROCESSING, SYSTEMS MODELING AND CONTROL
64