C Marchesi, M Paoletti
alarms generation., biosignal digital processing, ecg, event recorders, intelligent holter, monitoring, portable systems, qrs detector
C Marchesi, M Paoletti. ECG Processing Algorithms for Portable Monitoring Units. The Internet Journal of Medical Technology. 2003 Volume 1 Number 2.
This paper presents DSP algorithms running on a portable unit (
Deep and extended changes are going to characterise, along common directions, health systems organisation in Europe, North America, and some of the countries of Pacific area as well . One of these will be the managed care approach that has some implications on the extended role of the practitioners. Moreover evidence based medicine will stimulate a more objective attitude in symptoms evaluation, possibly through personal instrumentation encouraging patient to physician cooperation.
Development of devices for personal monitoring has also gained a new momentum because of various factors, like: availability of resources, demand of home care providers, increased senior population, increased costs of in-hospital assistance, international trend according to evidence based medicine. Such monitoring devices should fulfill quite new requirements as far as reliability and dependability. In particular we focus our studies on ECG signal monitoring, in fact especially for cardiac patients, a portable and reliable system plays a pivotal rule in order to generate alarms when a heart attack is detected and to provide useful diagnostic parameters extracted by ECG during the daily life of ambulatory patients . In this paper we'll introduce an algorithms set for portable units, based on a high performance and low computational cost quadratic operator, for arrhythmia and gradual onset episodes (ischemia) detection.
Biological signal processing is usually developed through an appropriate DSP algorithms cascade (Fig. 1). The main stage consists in a signal segmentation, such as to include characteristic wave shapes to be detected.
Wave shapes detection generally is based on enhancing slope variations respect to a level of reference (base line). For instance the element to be identified in the case of ECG are the wave shapes of the QRS complex.
Such a detection is traditionally done with digital filter design techniques, both in time and frequency domain .
It's often advisable to precede the derivative stage with a band-conditioning filter or with one that generically reduces the energy of the noise through smoothing tasks.
In this study, involved in carrying out a realization of a portable instrument, it is essential to guarantee efficient and effective performances of algorithms .
Being the process of detection of the QRS wave shapes the most important one of the analysis chain, therefore involved in the elaboration of every signal sample, it's an important task to estimate if a single operator is sufficient for an effective detection.
In this paper we propose a high performance QRS detector by exploiting the curve-length concept . Fig. 2 shows how the lengths L1 and L2 are able to characterize the shape of the curves, given a certain time interval DT.
This principle can be applied to detect the wave -fronts that characterizes the beginning and the end of an episode.
Applying Pythagoras theorem in the discrete time domain we can approximate the arc- length relative to the i-th sample with the chord length, obtaining:
L is the total estimated length of the episode, Tx is the sampling interval, yi –yi-1 represents the i-th increment and n is a rough estimate of the duration of the episode (or waveform) to be detected: in our case
We can also write L as:
Now, being Tx a constant and approximating the hypotenuse of successive triangles with their height we obtain:
During experimentation we found that taking the square of this quantity bring us a better discriminator capacity. So we can define a new operator, called U2, as:
Finally, centering the computational window on the i-th sample, and calling w=n/2 we obtain a recursive low computational cost form easily programmable also using assembly languages for DSPs processors, usually used in portable systems:
A procedure producing similar results was published by Pan-Tompkins  and consists of a cascade of four filters: a band pass, a differentiator, squaring operation, and finally a moving window integrator.
Double threshold algorithm
After the ECG signal has been filtered by the U3 quadratic operator, the normalised ( 0...1) output signal is compared first with an opportune primary threshold in order to detect the QRS complexes and then with a variable secondary threshold used to detect QRS following episodes (premature beats, T wave and ST changes) captured by the particular form of U3 output signal ( Fig. 3,4,5).
The study of the annotated ECG database European St-T , that we have carried out to validate the operator, has underlined that the values of the primary threshold maximizing the performances of the detection algorithm vary in the range 0,5... 0,6. The secondary threshold is dynamically moved, controlled by the system logic, in order to recover missed beats or to detect gradual onset events (ST, T changes).
Each time a primary event is detected, RRa interval is calculated and compared with the mean RR (calculated on the last 10 s buffer). The procedure is:
the system has probably missed a beat.
In this case a time window ( “A” window), starting after
and ending at the beginning of the following beat is analyzed with the secondary threshold that, assuming values decreasing to zero, looks for a cross point with U3. If no beat is detected a flag, called MB, is set, meaning that a missed beat (pause of length RRa) has been detected, otherwise the RR series (RRa value) is corrected adding the new beat. This procedure is also useful in presence of some particular forms of PVC (Fig. 6) that are not detected with the primary th. while usually the ectopic QRS shows large U3 wave shapes (Fig.5) allowing reliable detection.
The secondary threshold is also used to monitor the time window (“B” window)
seconds following the current beat, looking for secondary peaks of U3. Compatible events with those peaks are:
ST-T changes: The onset of ischemic ST-T changes is detectable using the secondary threshold ( Fig. 7). When looking into this time window the secondary th. is initially set to 0.05 (experimental best value).
When a secondary event is detected the algorithm looks back, decreasing the th. value, into the buffered U3 data (20 s) measuring the Max. values of the secondary peaks. If the procedure finds a positive trend a flag, called STT, is set and the algorithm proceeds measuring the following U3 secondary peaks in order to find the end of the episode. When no more secondary peaks are detected the flag STT is reset.
Abnormal T waves: Some patients presents an ECG signal characterized by an abnormal T wave shape. U3 operator enhances this feature (Fig. 8) and the secondary th. is used to detect each wave. When secondary peaks with the same amplitude are detected in each beat, a flag TS is set to inform the system of this signal feature.
The following schematic (Fig. 9) represents, using a sequential-combinatorial logic net architecture, the alarms management module of the applicative software. Each time a QRS is detected a clock pulse is generated.
The inputs are derived parameters obtained by previously presented numerical algorithms. The sequential module acts like a counter switching the outputs (N,PVC,DP,TP,TAC flags) on when arrhythmia episodes are detected. Those signals represent strobe lines for the following alarm enabling combinatory net (see Tab. 1). The binary variables obtained as output from this second stage represent an example of a
System performances are strictly related with the main U3 algorithms performances, so a wide validation has been performed in order to test the quadratic operator. The signal database, ST-T European Database , used as test set, was provided by
In order to test the algorithm performances, each record has been filtered with U3 and then , varying the primary th. from 0.1 to 1.0 (step 0.1) , the revealed beats have been compared with the annotations. For each record, sensibility and P+ have been calculated for different values of the th. We also calculated ROC curves for each record. The obtained best th. value was 0.4 (Min Max), giving mean sensibility and P+ values of 0.998 and 0.999 over the entire database.
Carlo Marchesi Professor of Medical Informatics DSI, Department of Systems and Computer Science University of Florence Via S. Marta 3, 50010, Firenze, IT firstname.lastname@example.org tel. +39 055 4796255cell. +39 329 4309871fax. +39 055 4796249