Computer diagnosis of the heart - pacemaker interface

8
Computer diagnosis of the heart - pacemaker interface M. Malik and A. J. Camm Department of Cardiological Sciences, St George's Hospital Medical School, London SW17, UK The object of the so-called Electrocardiographic Inverse Problem is the algorithmic analysis and diagnosis of the electrocardiogram (ECG). A part of this general problem is the Pacemaker Inverse Problem, which means the analysis of the ECG in order to establish details of heart-pacemaker interaction (HPI) with special reference to the diagnosis of pacemaker failure. The solution to this problem is of practical importance, because it is often impossible to evaluate such records clinically. The ECG patterns of natural cardiac activity and of the events stimulated by the pacemaker may not be distinguishable and many combinations of potential response of the implanted device have to be taken into account. A computer system providing automatic analysis of the HPI, based on ECG data, has been developed and implemented on an IBM PC AT computer. The system uses a complex algorithm which enables the evaluation of all possible combinations of HPI events, and establishes for each of these combinations its correspondence to the specified pacemaker algorithm. The system is written in Turbo Pascal and its source text has more than 11000 lines. Keywords: Electrocardiographic inverseproblem,implantablepacemakers,heart-pacemaker interaction, diagnosisof pacemaker failure 1 Introduction Implantable cardiac pulse generators have been used clinically for several decades. The original devices were very simple and only enabled the heart to be periodically stimulated at a constant frequency. Later, more soph- isticated devices were developed which allowed natural cardiac activity to be electronically recognised and stimulation actions to be delayed appropriately. Cur- rently, the pulse generators which are used in clinical practice employ very complex internal algorithms (Barold et al, 1986). These sophisticated algorithms allow pacemakers to respond properly to most cardiac rhythms which might be encountered. At the same time, the complexity of pacemaker activity restricts the pos- sibility to forecasting the actions of a generator under complicated circumstances and of evaluating its function for the diagnosis of its faults and technical failures. At the same time, a detailed comprehension of the heart-pacemaker interface (HPI) is important in clinical medicine. In modern pacemakers, parameters such as the refractory periods (during which the natural cardiac activity is ignored), sensitivity of intracardiac elec- trodes, or output amplitude and width of stimulation pulses, can be individually programmed according to the particular patient's need. Therefore, each unusual episode of the HPI has to be explained in detail. Poten- tially, more serious mismatch between the heart and the pacemaker may develop in the future and it might be prevented by proper reprogramming the device parameters. Manufacturers have improved the process of under- standing the HPI by introducing the so-called marker channel (Kruse et al, 1983). The same electronic device that is used to program the pacemaker (ie, to set the parameters of its algorithm) is able to record the ECG signal and to produce it together with special marks which indicate the pacemaker actions and explain how the device responded to natural cardiac activity. However, many unusual and peculiar ECG episodes are recorded in paced patients when the technical sup- port producing the marker channel is not available. In such cases, the mechanisms of the HPI may be difficult to understand. The pacing spikes (recorded pacemaker excitation pulses), which can normally be observed in the ECG, can fuse with the patterns of cardiac exci- tations or can be hidden within the recording noise. The ECG patterns of natural beats may imitate the paced events and the pacemaker can inappropriately respond to electrical potentials due to chest muscle movement, etc. In such cases, the evaluation of the HPI requires all possibilities and their combinations to be taken into account. The large number of such possibilities is the most important difficulty of the HPI evaluation. In order to solve this problem, a computer system has been devel- oped which guides the diagnosis of paced ECGs and suggests possible explanations of the HPI. The aim of this paper is to describe the system and to present the performance of its current computer ver- sion. The paper emphasises the problem of ECG data 118 Measurement Vol7 No3, JuI-Sep 1989

Transcript of Computer diagnosis of the heart - pacemaker interface

Computer diagnosis of the heart - pacemaker interface M. Malik and A. J. Camm

Department of Cardiological Sciences, St George's Hospital Medical School, London SW17, UK

The object of the so-called Electrocardiographic Inverse Problem is the algorithmic analysis and diagnosis of the electrocardiogram (ECG). A part of this general problem is the Pacemaker Inverse Problem, which means the analysis of the ECG in order to establish details of heart-pacemaker interaction (HPI) with special reference to the diagnosis of pacemaker failure. The solution to this problem is of practical importance, because it is often impossible to evaluate such records clinically. The ECG patterns of natural cardiac activity and of the events stimulated by the pacemaker may not be distinguishable and many combinations of potential response of the implanted device have to be taken into account.

A computer system providing automatic analysis of the HPI, based on ECG data, has been developed and implemented on an IBM PC AT computer. The system uses a complex algorithm which enables the evaluation of all possible combinations of HPI events, and establishes for each of these combinations its correspondence to the specified pacemaker algorithm. The system is written in Turbo Pascal and its source text has more than 11000 lines.

Keywords: Electrocardiographic inverse problem, implantable pacemakers, heart-pacemaker interaction, diagnosis of pacemaker failure

1 Introduction

Implantable cardiac pulse generators have been used clinically for several decades. The original devices were very simple and only enabled the heart to be periodically stimulated at a constant frequency. Later, more soph- isticated devices were developed which allowed natural cardiac activity to be electronically recognised and stimulation actions to be delayed appropriately. Cur- rently, the pulse generators which are used in clinical practice employ very complex internal algorithms (Barold et al, 1986). These sophisticated algorithms allow pacemakers to respond properly to most cardiac rhythms which might be encountered. At the same time, the complexity of pacemaker activity restricts the pos- sibility to forecasting the actions of a generator under complicated circumstances and of evaluating its function for the diagnosis of its faults and technical failures.

At the same time, a detailed comprehension of the heart-pacemaker interface (HPI) is important in clinical medicine. In modern pacemakers, parameters such as the refractory periods (during which the natural cardiac activity is ignored), sensitivity of intracardiac elec- trodes, or output amplitude and width of stimulation pulses, can be individually programmed according to the particular patient's need. Therefore, each unusual episode of the HPI has to be explained in detail. Poten- tially, more serious mismatch between the heart and the pacemaker may develop in the future and it might be prevented by proper reprogramming the device parameters.

Manufacturers have improved the process of under- standing the HPI by introducing the so-called marker channel (Kruse et al, 1983). The same electronic device that is used to program the pacemaker (ie, to set the parameters of its algorithm) is able to record the ECG signal and to produce it together with special marks which indicate the pacemaker actions and explain how the device responded to natural cardiac activity.

However, many unusual and peculiar ECG episodes are recorded in paced patients when the technical sup- port producing the marker channel is not available. In such cases, the mechanisms of the HPI may be difficult to understand. The pacing spikes (recorded pacemaker excitation pulses), which can normally be observed in the ECG, can fuse with the patterns of cardiac exci- tations or can be hidden within the recording noise. The ECG patterns of natural beats may imitate the paced events and the pacemaker can inappropriately respond to electrical potentials due to chest muscle movement, etc. In such cases, the evaluation of the HPI requires all possibilities and their combinations to be taken into account.

The large number of such possibilities is the most important difficulty of the HPI evaluation. In order to solve this problem, a computer system has been devel- oped which guides the diagnosis of paced ECGs and suggests possible explanations of the HPI.

The aim of this paper is to describe the system and to present the performance of its current computer ver- sion. The paper emphasises the problem of ECG data

118 Measurement Vol 7 No 3, JuI-Sep 1989

manipulation. Some other technical aspects of the sys- tem and its clinical potential have been reported elsewhere (Malik and Camm, 1988a and 1988b).

2 S y s t e m d e s c r i p t i o n

The system is composed of four parts. The first part establishes the algorithm of the relevant pacemaker, the second part inputs the ECG data, the third part per- forms the main evaluation and the fourth part outputs the results.

2.1 Pacemaker algorithms

Special mathematical means have been developed which enable each pacemaker algorithm to be specified in a uniform way.

In general terms, a given pulse generator can occur in several functional states and its actions can be com- prehended as successive instantaneous changes between these states. The state changes can be divided into two groups: explicit changes performed in response to an ex- ternal input to the pacemaker, i e, when the pacemaker senses natural cardiac activity; and implicit changes cor- responding to the internal device characteristics. Some of these changes do not manifest as any external action of the device; others are associated with the production of a stimulation pulse.

In those states which mirror the pacemaker's refrac- tory periods, sensing of cardiac activity in the atria and/ or ventricles is not permitted. Therefore, the corres- ponding explicit change is not defined for these states.

For example, a simple VVI (Parsonnet et al, 1981) pacemaker (ventricular 'on demand') can occur in two different states: the sensing period and the refractory period. Three different changes can be comprehended between these states:

(i) implicit change from the refractory period to the resting state, performed when the time counter of the refractory period is reset;

(ii) implicit change from the resting state to the refrac-

Malik and Camm

tory period, performed when the time counter of the resting state is zeroed and a ventricular pacing pulse is generated;

(iii) explicit change from the resting state to the refrac- tory period, fulfilled when sensing natural activity in the cardiac ventricles.

Formally, each pacemaker can be described by the set Z of its states and by four mappings a, b, c and d:

a : {Asen, Vsen} × Z ~ Z b : Z ~ Z x R + c : {Asen, Vsen} x Z ~ {Apac, Vpac} d : Z ~ {Apac, Vpac}

where R + denotes the set of positive real numbers (in- terpreted as the time values) and {Asen, Vsen} and {Apac, Vpac} are the sets of pacemaker's sensing inputs (i e, atrial sensing and ventricular sensing) and pac- ing outputs (i e, atrial pacing and ventricular pacing), respectively.

The four mappings define the explicit and implicit changes of the pulse generator and their association with pacing outputs:

If a given pacemaker [Z, a, b, c, d] occurs in the state z E Z and obtains a sensing input s E {Asen, Vsen}, it accepts this impulse s if a(s,z) is defined. In such a case, the pacemaker changes its state to a(s,z), and if c(s,z) is defined, the stimulation output c(s, z) is generated.

If this pacemaker changes its state to z~ ~ Z at the moment q, where b(z 0 is defined, b(zl) = (z2, t2), and if it does not accept any sensing impulse till the moment h+t2, it changes its state to z2 at the moment q+t2, and if d(z 0 is defined, the stimulation output d(Zl) is generated.

In a more understandable way, we can use these for- mal means to construct 'state diagrams' of pacemaker algorithms expressing graphically their operations. Fig 1 shows such a diagram of a pacemaker operating in the standard DDD mode (Parsonnet et al, 1981). In clinical practice, however, even more complicated modes (Barold et al, 1986) are used (Fig 2).

A B

Fig 1 State diagrams of the simple DDD pacemaker algorithm. The exact form of the diagram depends on whether the postventricular atrial refractory period is shorter (A) or longer (B) than the ventricular re- fractory period. The pacemaker's states are: (1) the resting period dur- ing which both the atrial and ven- tricular sensing inputs are accepted; (2) the atrioventricular delay; (3) the general refractory period with no sensing possibilities; (4) the rest of the ventricular refractory period; (5) the rest of the atrial refractory period. The bold arrows denote the implicit changes which can be associated with atrial (ap) or ventricular (vp) pacing. The fine arrows correspond to the ex- plicit changes performed because of atrial (as) or ventricular (vs) sensing

Measurement Vol 7 No 3, JuI-Sep 1989 119

Malik and Gamrn

Fig 2 The state diagrams of two modi- fications of the standard DDD pac- ing mode preventing the so-called crosstalk by introducing a post-atrial blanking period (A) or a ventricular triggering period (B). The figure shows the complexity of the algo- rithms of current sophisticated de- vices. Large open circles correspond to pacemaker states, small open circles to sensing events and open ellipses to pacing events A

C:. o ° 0 - ©

B

2.2 ECG data acquisition

The system is designed for off-line analysis of ECGs recorded in paced patients. Therefore, it does not con- tain an algorithm for computerised pattern recognition of the ECG signals. Each ECG is expected to be 'manu- ally' recognised and input in an interactive mode.

The diagnosis of the HPI is based on judging the heart and pacemaker rhythm characteristics. Thus only four types of ECG events have to be distinguished: atrial and ventricular pacing pulses which the device delivers to the heart, and atrial and ventricular depolarisations of the cardiac muscle which can be sensed by the pacemaker.

In some traces, the pacing events are easily recog- nised. The pacing spikes may be visible or unusual acti- vation patterns which may suggest artificial origin of the excitation. In other cases, distinguishing between natural and paced complexes can be difficult; chest mus- cle movement can imitate cardiac activity and the pat- terns of different heart events can fuse. Therefore, in some cases, the system permits the postulation that a certain HPI event definitely occurred, whilst other events are only possible.

In this way, the ECG trace is described as the timing of all recognised events. However, the timing cannot be exact and must be specified as a time interval during which the event occurred. For instance, in the case of a natural ventricular activity that should be sensed by the device, it is impossible to specify at which moment the pacemaker recognised the spontaneous excitation, only that it is within the duration of the ventricular complex. Furthermore, the timing intervals of several events may occur simultaneously.

Formally, the result of the ECG recognition has the form of a succession of records of separate items, each of them having the form (T, M, /), where T E {Asen, Vsen, Apac, Vpac} describes the type of the event, M E {Definite, Possible} specifies its existence mode, and I is the time interval of its occurrence.

2.3 Evaluation principles

The evaluation phase of the system establishes whether there exists a correspondence between the specified pacemaker algorithm and the events recog- nised in the ECG.

This requires to find a representation of the specified ECG data, which means:

• for each event which is specified as 'possible', an es- tablishment whether it did happen;

• for each occurred event (i e, for each 'definite' event and for each of the selected 'possible' events), an exact localisation of its occurrence.

The fact that such an ECG data representation satisfies the device algorithm means that there exists a succession of the device's algorithm changes which is in accord with its formal specification, and which, assum- ing the same sensing events, produces the same pacing events as are ordered in the ECG representation.

In addition to this, the permitted inaccuracy of the pacemaker has to be taken into account. The be- haviour of the device may differ from the ideal mode within a given limit. Such an inaccuracy of a pacemaker [Z, a, b, c, d] may be formally specified using a mapping q : Z ~ R + expressing that the implicit change from a state zl to the state z2, where b(z 0 = (z2, t), will not require exactly the delay t, but a delay t*, where t*E ( t -q(z l ) , t+q(zl)).

Hence, if the recognition of an ECG trace which should correspond to actions of a pacemaker [Z, a, b, c, d] with an inaccuracy q during the time interval (t, T), resulted in a succession of 'fuzzy' events {(Ti, Mi, li)}i= 1 . . . . . . (see the previous Section), the evaluation phase has to establish whether it exists:

• a succession of accurate events {(E i, tj)}i= 1 . . . . . .

where Ej E {Asen, Vsen, Apac, Vpac} and tj E R +, for each j, 0 < j < m + l ;

• an initial state z0 E Z and a succession of the changes of states of the device {(zk, uk)}k= 1 ..... p where z~ E Z a n d uk E R+, for each k, 0 < k < p + l ,

such that:

(1) For each j, 0 < j < m+ l, it exists i, 0 < i < n+ l, such that Ei = Ti and tj EIi .

(2) For each i, 0 < i < n + l , Mi = Definite, it exists j, 0 < j < r e + l , such that EZ = Ti and tj E l i .

120 Measurement Vol 7 No 3, Jul-Sep 1989

(3) For each k, 0 < k < p + l , uk/> uk_~,whereu0 = t, and if b(zk-1) is defined, b(zk-1) = (z*, u*), then uk <<- Uk-l+u* +q(zk-O. If b(zp) is defined, b(zp) = (z**, u**), then T >i Up+U**.

(4) For each j, 0 < j < m + l , E i ~ {Asen, Vsen}, either a(Ej, Zh) is not defined or tj = Uh+l and Zh+l = a(Ej, Zh), where Uh < tj ~< Uh+~.

(5) For each k, 0 < k < p, (5.1) either it exists j, 0 < j < m + l , Ej E Asen,

Vsen}, such that a(Ej, zk) is defined and Z k + 1 = a(Ej, zk), uk+l = t h

(5.2) or b(zk) is defined, b(z~) = (zk+l, u*), and Uk+l >I uk+u*--q(zk).

(6) For each k, 0 < k < p, (6.1) if (5.1), j is as in (5.1), and c(Ej, zk) is defined,

then it exists h, 0 < h < m + l , such that th = tj and Eh = c(Ej, zk),

(6.2) if (5.2) and d(zk) is defined, then it exists h, 0 < h < m + l , such that th = Uk+~ and Eh = d(z,).

(7) For each h, 0 < h < m + l , Eh ~ {Apac, Vpac}, it exists k, 0 < k < p, such that if (5.1) then h is as in (6.1), whilst if (5.2) then h is as in (6.2).

Condition (1) means that the succession of accurate events corresponds to a representation of the specified E CG data and Condition (2) ensures that none of the definite events has been omitted. Condition (3) expres- ses that the pacemaker cannot wait in any state longer than is permitted by its internal counters (plus the per- mitted error). Condition (4) states that the pacemaker either omits the sensing events because of its refractory periods or copes with them by proper change of state. The fact that all changes of the device's states are due to sensing or due to internal counters, is expressed in Con- dition (5). Finally, Condition (6) means that all pacing outputs generated by the pacemaker are present in the ECG, while Condition (7) ensures that none of pacing events recognised in the ECG is omitted by the device.

The objective of the computer program performing this evaluation is to test possible orderings of pacemaker actions and EC G events in order to establish whether they fulfil the above conditions. In usual cases, how- ever, the system must evaluate very many possibilities of the HPI history. For instance, the device [Z, a, b, c, d] with the inaccuracy q reached its state zt sometime dur- ing the interval (i~, iz). Therefore, its implicit change to the state z2, where b(Zl) = (z2, t), is scheduled within the interval (Jl, j2), where

jl = i l + t - q ( z l ) , h = i2+t+q(zl).

Further, let a sensing input s ~ {Asen, Vsen} be speci- fied to occur during the interval (kl, k:), where (jl, j2) 71 (kl, k2) :/: 0.

Then, two different possibilities of HPI development have to be distinguished:

(a) The input s occurs during the interval (kl, min(k2, h)) before the pacemaker changes its state to z2; if a(s, Zl) is defined, an explicit change takes place.

Malik and Camm

(b) The pacemaker changes its state implicitly to z 2 dur- ing the interval (jl, min(j2, k2)) before the input s is sensed; then, the evaluation algorithm has to con- sider the future state changes starting from the state z2; however, the occurrence of the input s must be restricted to the interval (max(j1, kl), k2), in this case.

When considering a longer ECG record, the number of combinations of such possibilities can be enormous. It is not possible to evaluate all of them one by one since the computing time demands would not be acceptable.

However, we may construct all these combinations simultaneously with their evaluation from the beginning of the elaborated ECG record. Each combination which considers only an initial part of the ECG is a common beginning of different 'total' combinations correspond- ing to the complete trace. If this initial combination does not satisfy the pacemaker algorithm (i e, does not produce a specified pacing output, or - on the contrary - produces a pacing output which does not fit with any of those specified), its further development is unnecessary. This enables whole groups of combinations which start improperly to be excluded at once. Based on this prin- ciple, the developed system has a suitable computing speed.

2.4 Output of the system

In each case, the system prints a simplified form of the specified ECG data which has only a very basic infor- mational character and enables verification that the recognised ECG data have been correctly entered.

In the current version of the system, the specified atrial and ventricular depolarisations are represented as simple triangles, and the pacing events by spikes with small square bases. The width of these triangles and square bases correspond to the lengths of the specified occurrence intervals. The positive or negative polarity of triangle or spike indicates whether the given event is specified as definite or possible. The scaling of the whole simplified pattern corresponds to the scaling of the elaborated ECG; recording at 25 mm/s is used in the current version.

If not acceptable interpretation of the elaborated case is discovered, the system prints this information and terminates. The negative result may either mean that a pacemaker failure has been diagnosed or that the ECG data have been incorrectly entered.

Alternatively, the system may find one or more logic- ally different interpretations. To make the results easily understood, the system produces them in a graphical way. It accompanies the simplified pattern of the analysed ECG by a simulated simple marker channel for each interpretation. This channel indicates the timing, in the interval form, of atrial and ventricular sensing and pacing.

Although this simulated marker channel offers the explanation in a clinically acceptable form, it may not be sufficient for a detailed understanding of the pacemaker behaviour. For this reason, another 'technical' marker channel is produced. It supports the clinical marker channel by interval timing of the explicit and implicit state changes of the pacemaker algorithm.

Measurement Vol 7 No 3, JuI-Sep 1989 121

Malik and Camm

3 Sample results The first version of the system has been implemented

on a standard configuration of an IBM PC AT computer; a standard dot matrix printer is used to produce the graphical output. The program is written to Turbo Pascal and its source text has more than 11000 lines. For the experimental results shown here, the computer memory of 350 kbyte was used to run the program. The proper evaluation of all presented cases (not including the print of graphical results) took less than 1 min of the computation time.

The developed system has been tested with different examples of paced rhythms. Some of these examples were real clinical records while others were artificial hypothetical cases.

;::'~.~L" V

~ : . ~ 2 ~ ? . . . . . . . . . . . . . . . . . . . i . . . . . . . . . . . . . . . . . . . . . , . . . . . . . . . ! . . . . . . . . . . .

~ ; g ; ; - - i ~ . . . . . . . . . . ~ . . . . . . . . ; . . . . . - ~ . . . . . . ~ . . . . . . . . . ; . . . . . . . . ~ . . . . . . . . . .

C h a n c e 2 , N u |

~ ? ~ ? _ . ~ . . . . . . . . . . . . . . . . . . . . . . . ~ . . . . . ~ . . . . . . . . . . . . . . . . . . . . . . . . ~ . _ _

* * * * * * * * * * * * * * * * * * * * * * * * * * * o . e . . e . . * * * e e * * * * *

8* Ch inBe 1 . <Ven tF , ~e f , peF lod> ¢o <Ree f i ng I t i t e >

lO Ch inGe ~ • < R e i t l n I I t a ¢ • • t o < V e n t r . r o t . p e r | o d > * V, P8¢ .

8 m Chsnse 3 - < R e m t i n I i r a t e ) t o < V m n ¢ ~ , r o t . ~ l r i o d > * V. S e n .

m o o e m ~ m e m m m o ~ o o ~ o o ~ e ~ * e o ~ m e m ~ o o ~ * ~ e * e m ~ 8 ~ e ~ * ~ e e ~ e o m o e ~ e e o o m e m m o m

3.1 Artificial tests

Fig 3 shows a hypothetical ECG curve recording ac- tions of a VVI pacemaker (the so-called ventricular 'on demand' mode). The trace permits more explanations and can be differently specified. The system elaboration of this case (Fig 4) shows that some of these specifications conform to the pacemaker algorithm, while others do not.

Another hypothetical complicated record of a DDD pacemaker is shown in Fig 5. This pacemaker operates in a complex mode, senses and stimulates both atria and ventricles and artificially synchronises the excitations of the atria and ventricles when the natural synchronisation is defective. Here, some of the specifications permit the HPI to be explained in several ways (Fig 6) while other specifications do not conform to the pacemaker mode. When specifying a more accurate performance of the device, different results were obtained (Fig 7). By com- paring the results in Figs 6 and 7, we can observe that some possible explanations are reliant upon lower pacemaker accuracy.

3.2 Evaluation of clinical cases

A real clinical episode recorded in a patient with a DDD pacemaker is shown in Fig 8. Here, both the atrial and ventricular pacing spikes are clearly visible in the upper record. Starting from the fourth paced P-QRS complex (activation of atria and ventricles), the onset of the QRS complexes (activation of ventricles) precedes the ventricular pacing spike.

" " r " " " • - - , ~ - - w . . . . . w . . . . . . - ~ V " . . . . r -

t t 1 2

Fig 3 A hypothetical ECG recorded in a patient with a V~I pacemaker. Four paced ventricular complexes and one natural ventricular complex are clearly distinguish- able. The pattern (1) probably corresponds to an extra- systolic depolarisation, but it may also be a recording artefact. The pattern (2) is very similar to the form of other paced complexes, but the corresponding pacing spike is not present

S P E C I I r l I O I

l e a I m A Q t V

I ~ O l l ' b | l e v e n t l z

Fig 4 Computer elaboration of the ECG record shown in Fig 3. The case (A) presents the computer explanation when specifying complex (1) (see Fig 3) as only 'possible' ventricular depolarisation, and the pattern (2) as a 'de- finite' ventricular complex which is 'possibly paced'. The simulated marker channel shows that pattern (1) corres- ponds to a ventricular beat and that complex (2) was not paced. The tracing starts after the first paced complex since this is used to initialise the evaluation algorithm of the current version. The technical marker channel traces the pacemaker actions, explanation of changes 1 to 3 refers to the behaviour diagram of the device. Note that the system restricts the possible interval of sensing com- plex (2) since it has to fit (+the permitted error) with the time of the next ventricular pace. The case B shows that when specifying the ventricular complex (2) as 'definitely paced', no correspondence with the pacemaker algorithm is found. This is because the pacing of complex (2) would either occur too soon after complex (1) (when supposing that pattern (1) represents a ventricular beat) or too late after the previous paced event, in the opposite case when pattern (2) is ignored

"t -t t f t - --t "t t" 1 2 3 4 5 5 3 6

Fig 5 A hypothetical ECG recorded in a patient with a D D D pacemaker. Four paced ventricular complexes and two paced P waves are clearly visible. The other patterns permit different explanations. Complex (1) is definitely a ventricular complex which possibly fuses with the pacing spike; (2) can be explained as a premature atrial beat; (3) are P waves which may be paced, (4) is probably a ven- tricular complex which might hide a ventricular pacing spike; (5) can be interpreted as possible atrial P wave; and (6) is a natural ventricular beat which fuses with a pacing spike

122 Measurement Vol 7 No 3, JuI-Sep 1989

Malik and Camm

A ... . . . . ^̂ 15 A ^ . . . . . . . . ' [ 1 v v 1

~• ~ o l e l b l •

, H n I H • • l m v . ~[•iz#a • •

A. PAt iNa i

~ : _ ~ f ~ ................... ! ................ m ........ ! ......... ! ...... !___

~ ; ~ ; - - i 7 ........ k - . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

C~nc* 21 P~ H ~ H H H k - 4

• n • C~ • 31 P~ P~ P ~ H H M

C h l n l l ~J H H ~ H

N c~*nse 5* # K g g

C h ~ n ~ o 6~ P~

~ _ _ ~ 5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ~ . . . . . . . . . . . .

. ~ * I * * ~ * * * * * * ~ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

~ • t t n l t * t

I r l C l ~ Z l O

. . . . . . . . ' I 1 v v 1 I v • n i p 8

2 : - i i & i l R G . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . m - . . . . . . . i . . . . . . . . . . . . . . . . i . . . . .

v . S l t 11111 N(~ l •

A . PAC INQ I I

_v:__~_~_e!_~o_ . . . . . . . . . . . . . . . . . . . [ . . . . . . . . . . . . . . . . m . . . . . . . . I . . . . . . . . . n_ . . . . . . ! _ . _

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Chln l l t 21 H H I,,-4 H H H

ChanCe )1 N H P ~ P~ H 1',4

n • Ch~ • ~ i | N

C h l n l l ~l | I( N I{ N

Cl~llnll• 6t H _c,:._._._._._ _~_ ,_ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . _._ . . . . . . . , . . . . . . . . . . . . . . . . . . . . . .

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

d l tLn t l / c . . . . . . . ^ I r i o X • z IO

....... ' J 1 v v I ~ven t lm :

k T - ; i ; i i & 6 . . . . . . . . . . . . . . . . i . . . . . . . . . . . . . . . i - . . . . l . . . . . . . . . . . . . i - ""

v. SI~ INO l •

A, P A C I N Q i

V . PACKNO I I I I I . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

~ ; ; ; ; - - ; ; . . . . . . . . k - . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

C h i n l • 2s H M H N N I P,,,,,4 c h i n s * 3: H M H # W |

C h i n l i QI H H 1 H

cn*n=* 51 M M N l M

- - ~ ! ~ _ _ ~ 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ! . . . . . . . . . . . .

o leeeeee le • •os • •ee lee leee • l l e e e l s e e e l o l o e e o o e e l l • • • • • • e l l o l e • e * • • • * o e o o • o *

:=:::' A ,J po l l abX* • v e n t * a

2 : - ~ i ~ i i & G . . . . . . . . . . . . . . . . i . . . . . . . . . . . . . . . m - . . . . . . . i . . . . . . . . . . . . . . . . i . . . . .

v. SINSi.. •

A. P A C Z m O I

v . PACIeO I l • l I l l . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . : . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Chanlo 2 ; M M H N I I

C h l n • • 31 I N H N N |

c ) , • n • * ~, M N I M

Chan¢* 5a H

C h m n • * 6 l I . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

k : - i l ; i i & & . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . b - . . . . . . . i . . . . . . . . . . . . . . . . i . . . . .

v..immnma •

A . P A t I N a ! I

c h a h e • 21 I H P~ H H H k -4

Cban ,e 31 I H I--4 ~ H H

C h l n l l I I I

ChinS• 5m H

i n • Ch • 6m H N M . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Fig 6 Computer elaboration of the ECG record shown in Fig 5. In addition to specifying the proper parameters of the device, its accuracy has been set to correspond to the end-of-life state of the battery. The cases (A), (B), and (C) show three of several different explanations which can be found when specifying the record recognition men- tioned in the description of Fig 5. The technical marker channel orders the listed changes as they appear in each case, Therefore, the numbering of state changes differs in different cases. However, we can observe that the offered explanations have a very different nature

The computer evaluation (Fig 9) proves that the first fusion of the natural complex with ventricular pacing can still be explained within permitted pacemaker behaviour while the second and third fusions definitely imply a sensing failure.

Fig 10 presents an episode of DVI pacing, in which the atrial and ventricular pacing spikes are not clearly distinguishable. In the last but one complex, the regular succession of paced P waves (excitation of atria) followed by paced QRS complexes (excitation of ventricles) dis- appears and only paced QRS complexes are recorded.

Fig 7 Computer elaboration of the ECG record shown in Fig 5. The same parameters of the device and the same recognition of the ECG record as in Fig 6 have been used. However, the accuracy of the pacemaker has been set to correspond to the beginning-of-life state of the battery. Thus, the pacemaker should operate more precisely. The cases (A) and (B) show two of several different ex- planations which have been found. However, neither of the possible explanations corresponds to the case (C) in Fig 6. Hence, that case was possible only because of low pacemaker accuracy. Note also that compared to Fig 6, the technical marker channels offer much narrower oc- currence intervals for pacemaker changes in these cases of higher accuracy

A

i I |

B

Fig 8 Example of a DDD pacemaker failure. An episode recorded in a patient with a DDD pacemaker. The figure shows an exact redrawn copy of the natural record which was not reproducible

Measurement Vol 7 No 3, Jul-Sep 1989 123

M a l i k a n d C a m m

a l t l n l t * A . . . . . . .

I P I C I V I I D

l C O INAOE

; : - i i ; ; i i ; . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

v . s l ~ S l ~ O •

A. P A C Z ~ G I l I l

V. PACINO | ! m l . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

~ ; ~ ; ; - - ~ ; . . . . . . . . i . . . . . . . ¥ . . . . . . i . . . . . . ~ . . . . . . . . . . . . . . . . . . . . . . . . . . .

C h * n l * 3~ m H N

C h i l l i i ; [ ~ N K

~ _ _ ~ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ~ . . . . . . . . . . . . . . . . . . . .

Q e f l n l t *

I P E C I ? I I [ D

[ C G Z~Aql

D O S S l b 2 e

* * * NO X N T E R P R E T A T X O N $ OF F O S S Z B L Z P A C I N A K ~ B A C T X O N S HAVE B[K N FOUND * * *

Fig 9 Computer evaluation of the rhythm episode shown in Fig 8. The result (A) corresponds to the A interval and the result (B) to the B interval of the ECG record. See text for details. The changes of pacemaker states indicated by the technical marker channel in case (A), are (see the be- haviour diagram in Fig IB): 1 - implicit: from A V delay to general refractory period+ ventricular pacing," 2 - im- plicit: from general refractory period to the rest of the at- rial refractory period; 3 - implicit: from atrial refractory period to resting state; 4 - implicit: from resting state to A V delay+atrialpacing; 5 - explicit: from resting state to the refractory period due to ventricular sensing

S P I C I F I K D

i[e£1 i N ^ o [

* * * NO Z N T E R P R Z T A T I O N S OV P O S S £ B L E P A C E N A K [ ~ A C T I O N S H A V [ B E I N r O U N D i l l

z ~ c a I N A a E

p o l l l b ] i * v * n t l :

; 7 - ; ; ~ i i N ~ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . - l i . . . . . . . ; ' - - -

A . P A C I N O i I I I I I

!: ~ ? .......... i ....... * ....... ~ ........ ! ........ i ...................

~;;g;;--i; . . . . . . . . m ......... i ........ ] . . . . . . . i . . . . . . . i . . . . . . . . . . . . . . . . . . . C h s n l * 2 * H H H H H H

~ _ _ ~ ................................................... ~ ....... ~___

Fig 11 Computer evaluation of the rhythm episode in Fig 10. The result (A) corresponds to the A interval and the result (B) to the B interval of the ECG record. In case (A), the pacing spike indicated by the arrow is treated as ventricular pacing, and in case (B) as atrial pacing. The changes of the pacemaker states indicated by the technical marker channel in case (B) are: 1 - implicit: from A V delay to ventricular refractory period+ventricular pac- ing; 2 - implicit: from ventricular refractory period to resting state; 3 - implicit: from resting state to A V de- lay+atrial pacing; 4 - explicit: from A V delay to refrac- tory period due to ventricular sensing

A JI II

B

Fig 10 Example of a rhythm episode recorded in a patient with a non-committed DVI pacemaker. The figure pre- sents at exact redrawn copy of the natural record which was not reproducible

The computer analysis (Fig 11) shows that the dis- puted pacing spike (indicated by an arrow in Fig 10) can only be explained as the atrial stimulus and that atrial pacing is followed by ventricular excitation.

4 C o n c l u s i o n and p e r s p e c t i v e s

The system concentrates on the reconstruction of pacemaker activity and on diagnosing the device and/or

HPI failure. For such a purpose, the system does not cover many aspects of automatic on-line ECG analysis. For the later off-line analysis it is purposeless to compli- cate the system by automatic ECG pattern recognition (Klusmeister et al, 1976; Pan and Tompkins, 1985) or by automatic heart rhythm evaluation (Jenkins, 1983; Macfarlane, 1985). On the other hand, the computer approach reported here covers an important area of computerised cardiological diagnosis which is outside the capacity of other computer systems supporting ECG analysis.

The experiments with the current version give several suggestions as to how the system might be developed in future versions. Such a system must contain a library of the most common clinical pacemakers so that it can be easily applied in most clinical cases. The manual recog- nition of the ECG records has to be supported by a digitising board or similar equipment.

The current system also has some clinical simpli- fications. When a discrepancy between the pacemaker algorithm and the ECG record is found, the current system declares this situation but does not classify the possible mechanisms of the abnormality. In clinical practice, however, the establishment of inappropriate pacemaker activity requires a very detailed evaluation.

An automatic classification of the HPI abnormality is difficult since many different effects can be responsible

124 Measurement Vol 7 No 3, JuI-Sep 1989

for the same case. In spite of this complexity, com- puterised diagnosis should produce at least a basic clin- ical discussion, if a correlation between the cardiac rhythm and the pacemaker algorithm is not found. Such a discussion could be offered interactively in order to improve the efficiency of the discussion.

Despite these important restrictions and simplifica- tions, the system which has been developed performs a clinically relevant evaluation of complicated episodes observed in paced ECG records. It demonstrates that it is possible to computerise the diagnosis of the heart- pacemaker interface.

References

Barold, $. S., Falkoff, M. D., Ong, L. S., Heinle, R. A. and Willis, J. E. 1986. 'Electrocardiography of con- temporary DDD pacemakers', in: Satini, M., Pistolese, M., Alliegro, A. (eds.): Proc Progress in Clinical Pacing, Rome, 276-314.

Jenkins, J. M. 1983. 'Automated electrocardiography and arrhythmia monitoring', Prog Cardiovasc Dis, 25, 367.

Malik and Camm

Klusmeier, S., Klinkers, H., Friedrichs, P. and Zywietz, C. 1976. 'Comparison of different algorithms for P- onset and P-offset recognition in ECG programs', Adv Cardiol, 16, 221.

Kruse, I., Markowitz, T. and Ryden, L. 1983. 'Timing markers showing pacemaker behavior to aid the fol- low-up of a physiological pacemaker', Pacing Clin Electrophys, 6, 801.

Macfarlane, P. W. 1985. 'Analysis of cardiac rhythm by digital computer', New Trends Arrhyt, 1, 111.

Malik, M. and Camm, A. J. 1988a. 'The pacemaker inverse problem: Computer diagnosis of paced elec- trocardiograms', Comput Biomed Res, 21,289.

Malik, M. and Carom, A. J. 1988b. 'Computer sup- ported diagnosis of the electrocardiograms of paced patients', J Electrophysiol, 2, 114.

Pan, J. and Tompkins, W. J. 1985. 'A real-time QRS detection algorithm', IEEE Trans Biomed Eng, BME-32, 230.

Parsonnet, V., Furman, S. and Smyth, N. P. D. 1981. 'A revised code for pacemaker identification', Pacing Clin Electrophys, 4, 400.

FLOMEKO 9-10 October 1989, DOsseldorf, FRGermany

The objectives of the International Conference are:

• to provide an up-to-date overview of the flow measur- ing field and look towards the next decade

• To bring together all the different methods of measur- ing volume and mass flow and to discuss the present state of this rapidly developing technology

• to provide guidelines on the most effective use of flowmeters in practical use and on applications of the new technologies to the industrial problems of the participants

• to provide information on calibration techniques and how to establish the criteria for the best calibration methods.

Topics to be covered will include:

• Conventional meters (Differential pressure devices, turbine meters, positive displacement meters, vari- able area flowmeters suspended body type)

• Main new meters (Massflow meters, electromagnetic meters, vortex shedding meters, ultrasonic meters, correlation methods)

• Other modern flowmeters (Fluid oscillation meters, tracer flowmeters, fluid velocity meters, velocity area methods)

• Proving devices and laboratories (Volumetric and gravimetric calibrators, other calibration systems)

• Supplementary instrumention (Techniques and in- struments for measuring pressure, temperature, dif- ferential pressure, density, etc, correction computers and microprocessors)

• System and installation effects (Flow steadiness, upstream flow conditions)

• Physical properties (Thermal expansion, mass den- sity correction, humidity of gases, compressibility)

• Special meter applications (Metering under difficult conditions, microprocessors in flow measurement)

• Analysis of accuracy (Treatment of uncertainties in the evaluation of measurement, correction, statistical analysis, assessment of uncertainty in the calibra- tion)

Conference languages will be English and German. Simultaneous translation will be provided.

Full information from: VDINDE-Gesellschaft MeS- und Automatisierungstechnik (GMA), PO Box 11 39, D-4000 Duesseldorf 1/FRG.

The FLOMEKO Conference will start at the same time as the INTERKAMA '89 trade fair for measurement and automation technology. This will be held in Duesseldorf from 9-14 October, 1989. FLOMEKO participants will have full access to this exhibition of measurement and control products of more than 600 manufacturers.

Measurement Vol 7 No 3, JuI-Sep 1989 125