Login| Sign Up| Help| Contact|

Patent Searching and Data


Title:
METHOD, DEVICE AND SYSTEM CONCERNING HEART STIMULATION
Document Type and Number:
WIPO Patent Application WO/2006/025771
Kind Code:
A1
Abstract:
The invention concerns a method of determining a capture verification condition for a heart stimulating system. According to the method, a number of pacing pulses are delivered to a heart chamber (RA). Signals are sensed within a time window following after each pacing pulse. The sensed signals are stored and categorised as captured or non-captured. With the help of the stored signals a particular weight vector, which assigns different weights for different parts of each sensed signal within said time window, is determined. The particular weight vector is to be used for calculating a weighted area (AW) within said time window. The capture verification condition is determined as whether the weighted area (AW), calculated with said particular weight vector, of a sensed signal within said time window is above or below a certain value. The invention also concerns an implantable heart stimulating device (10) and a system including such a device.

Inventors:
BJOERLING ANDERS (SE)
Application Number:
PCT/SE2004/001252
Publication Date:
March 09, 2006
Filing Date:
August 31, 2004
Export Citation:
Click for automatic bibliography generation   Help
Assignee:
ST JUDE MEDICAL (SE)
BJOERLING ANDERS (SE)
International Classes:
A61N1/37; A61B5/0452; (IPC1-7): A61N1/37; A61B5/0452
Domestic Patent References:
WO2004078258A12004-09-16
Foreign References:
US5273049A1993-12-28
US20030083711A12003-05-01
Attorney, Agent or Firm:
ST. JUDE MEDICAL AB (Järfälla, SE)
Download PDF:
Claims:
Claims
1. A method of determining a capture verification condition for a heart stimulating system, the heart stimulating system comprising at least a control circuit (14), a first pacing electrode (25, 26) and a first sensing electrode (25, 26) wherein said first sensing electrode (25, 26) is identical with or not identical with said first pacing elec¬ trode (25, 26), wherein the control circuit (14) comprises first pacing means (16) connected to said first pacing electrode (25, 26) and first sensing means (18) connected said first sensing electrode (25, 26), said method comprising the following steps: positioning said first pacing electrode (25, 26) so that the first pacing electrode (25, 26) is able to deliver pacing pulses to a first heart chamber (RA), positioning said first sensing electrode (25, 26) so that the first sensing electrode (25, 26) is able to sense evoked responses in response to pacing pulses delivered by said first pacing electrode (25, 26), delivering a number of pacing pulses, via said first pacing electrode (25, 26), to said first heart chamber (RA), wherein said number of pacing pulses includes pulses which cause the first heart chamber (RA) to capture and pulses which do not cause the first heart chamber (RA) to capture, sensing signals from said first sensing electrode (25, 26) within a time window following after each of said number of deliv¬ ered pacing pulses and storing said sensed signals in a memory (19, 42), categorising the stored signals in a first group and a second group, wherein the first group represents captured cases and the second group represents noncaptured cases, based on the stored signals, determining a particular weight vector which assigns different weights for different parts of each sensed signal within said time window and which is to be used for calculating a weighted area (Aw) within said time window, wherein the particular weight vector is determined such that by using the particular weiαht vector when calculating weighted areas (Aw) for distinguished from the signals in said second group than if the sig¬ nals in said first and second groups were distinguished from each other by said area (A) without assigning different weights for differ¬ ent parts of the sensed signal within said time window, wherein said capture verification condition is determined as whether the weighted area (Aw), calculated with said particular weight vector, of a sensed signal within said time window is above or below a certain value.
2. The method according to claim 1 , wherein said weighted area (Aw) is an area determined by the sensed signal but modified with the different assigned weights in accordance with the weight vector.
3. The method according to claim 1 or 2, wherein the particular weight vector is determined such that by using the particular weight vector when calculating weighted areas (Aw) for the stored signals, the signals in said first group are distinguished as much as possi¬ ble, or at least to a high degree, from the signals in said second group.
4. The method according to any of the preceding claims, wherein said method includes a Vario test in order to determine a capture threshold, wherein the stored signals are categorised as belonging to said first or second group based on the result of said Vario test.
5. The method according to any of the preceding claims, wherein the determination of said particular weight vector involves an itera¬ tive process.
6. The method according to claim 5, wherein said iterative proc¬ ess involves assigning a weight vector and modifying said weight vector iteratively in order to arrive at said particular weight vector.
7. The method according to any of the preceding claims, wherein said determination of said particular weight vector involves maxi¬ mising, or at least increasing to a sufficient level, a measure of how distinguished the signals in said first group are from the signals in said second group.
8. The method according to any of the preceding claims, wherein said determination of said particular weight vector involves the use of a mathematical optimisation method.
9. The method according to any of the preceding claims, wherein the number of different parts of said signal within said time window, to which weights are assigned, is at least 8.
10. The method according to claim 9, wherein said first sensing means operates with a certain sampling frequency, and wherein the number of different parts of said signal within said time window, to which weights are assigned, corresponds to the sampling fre¬ quency.
11. The method according to any of the preceding claims, wherein said control circuit (14) and said first sensing electrode (25) are ar ranged for unipolar sensing.
12. The method according to any of the preceding claims, wherein said first heart chamber is an atrium (RA).
13. The method according to any of the preceding claims, wherein the heart stimulating system comprises an implantable heart stimu¬ lating device (10) in which said control circuit (14) is positioned, and wherein the calculations performed in order to determine said par¬ ticular weight vector are performed in said implantable heart stimu lating device (10).
14. The method according to any of the claims 112, wherein the heart stimulating system comprises an implantable heart stimulating device (10) in which said control circuit (14) is positioned, and wherein the calculations performed in order to determine said par¬ ticular weight vector are performed in a nonimplantable unit (40) that is separate from said implantable heart stimulating device (10).
15. An implantable heart stimulating device (10) including a con¬ trol circuit (14) comprising: first pacing means (16) adapted to be connected to a first pac ing electrode (25, 26) suited to be positioned in or at a first heart chamber (RA) so as to receive pacing pulses from said first pacing means (16) such that said first pacing means (16) is able to pace said first heart chamber (RA), first sensing means (18) adapted to be connected to a first sensing electrode (25, 26), wherein said first sensing electrode (25, 26) can be identical with or not identical with said first pacing elec¬ trode (25, 26), suited to be positioned in or at said first heart cham¬ ber (RA) so as to transfer signals to said first sensing means (18) such that said first sensing means (18) is able to sense said first heart chamber (RA), said control circuit (14) being arranged to be able to detect an evoked response to a pacing pulse delivered by said first pacing means (16) by sensing, with said first sensing means (18), within a time window that follows after a pacing pulse delivered by said first pacing means (16), wherein a sensed signal is categorised as a capture if one or more capture verification conditions are fulfilled, characterised in that the device (10) is set up to operate with at least one capture verification condition which is based on a calculated weighted area (Aw) within said time window, wherein the weighted area (Aw) is cal¬ culated by using a particular weight vector which assigns different weights for different parts of each sensed signal within said time window.
16. An implantable heart stimulating device (10) according to claim 15, wherein the device (10) is set up to operate such that said weighted area (Aw) is an area determined by the sensed signal but modified with the different assigned weights in accordance with the particular weight vector.
17. An implantable heart stimulating device (10) according to claim 15 or 16, wherein the particular weight vector has such a property that by using the particular weight vector when calculating weighted areas (Aw) for the sensed signals, signals representing capture are more easily distinguished from signals representing loss of capture than if the signals representing capture and loss of capture were distinguished from each other by said area (A) without assigning different weights for different parts of the sensed signal within said time window.
18. An implantable heart stimulating device (10) according to claim 17, wherein the particular weight vector is such that the dif¬ ferent weights assigned by the weight vector for different parts of each sensed signal within said time window are optimised for dis¬ tinguishing capture from loss of capture with the help of said weighted areas (Aw) for the sensed signals.
19. An implantable heart stimulating device (10) according to any of the claims 1518, wherein the device (10) is set up to operate such that the number of different parts of said signal within said time window, to which weights are assigned, is at least 8.
20. An implantable heart stimulating device (10) according to claim 19, wherein the device (10) is set up to operate such that said first sensing means (18) operates with a certain sampling fre¬ quency, and wherein the number of different parts of said signal within said time window, to which weights are assigned, corre¬ sponds to the sampling frequency.
21. An implantable heart stimulating device (10) according to any of the claims 1520, wherein the device (10) is set up to operate such that said control circuit (14) and said first sensing electrode (25) are arranged for unipolar sensing.
22. An implantable heart stimulating device (10) according to any of the claims 1521 , wherein the control circuit (14) is arranged such that said first pacing means (16) is suited to deliver pacing pulses to an atrium (RA) and such that said first sensing means (18) is suited to sense signals from an atrium (RA).
23. An implantable heart stimulating device (10) according to any of the claims 1522, wherein the control circuit (14) is arranged to be able to perform the necessary calculations for determining a capture verification condition in accordance with the method of any of the claims 114.
24. An implantable heart stimulating system comprising: an implantable heart stimulating device (10) according to any of the claims 1523, and a first lead (21 ) and said first pacing electrode (25, 26), wherein said first lead (21) is connected to said device (10) and said first pacing electrode (25, 26) is arranged on said first lead (21).
25. An implantable heart stimulating system according to claim 24, also comprising said first sensing electrode (25, 26).
Description:
Method, device and system concerning heart stimulation

BACKGROUND OF THE INVENTION

1. Field of the invention

The present invention relates to heart stimulating devices and sys- terns. In particular to such devices and systems that have the ability to detect evoked responses to stimulation pulses delivered to the heart of a patient. The invention also concerns a method of deter¬ mining a capture verification condition.

2. Description of the prior art

Several different devices for stimulating a heart are known. Such devices are able to deliver stimulation pulses to one or more of the different heart chambers: the left ventricle, the left atrium, the right ventricle and the right atrium. The devices can often be implanted in a patient. The devices are normally also able to sense the electrical activity of the heart.

In connection with such devices, it is known to detect the capture of the heart, i.e. to detect whether the heart actually reacts as in¬ tended to a delivered stimulation pulse. If the heart is not captured (i.e. loss of capture) it is possible to arrange the device to deliver a back-up pulse with a higher pulse energy than the first pulse. It is also possible to increase the pulse energy in future stimulation pulses if capture is not detected. In order to save battery it is impor¬ tant that the stimulation pulses are not delivered with an unneces¬ sarily high energy. By varying the energy of the stimulation pulses and by detecting the capture it is possible to find a threshold value for the stimulation pulse energy. Based on the threshold value, a suitable stimulation pulse energy can be determined. The detection of capture, i. e. the detection of an evoked response (ER), can be done in different manners. Normally an IEGM (in¬ tracardiac electrogram) signal is detected within a time window (ER window) following a delivered stimulation pulse. The determination whether the detected signal indicates a capture can be performed in different manners. It is for example known to use the maximum am¬ plitude of the detected signal within the ER window. It is also known to use a slope or derivative (usually the maximum slope) of the de¬ tected signal within the ER window. A third known possibility is to detect an area by integrating the detected signal in the ER window.

The detection of capture involves different problems. One problem is the electrode-polarisation. The electrode-polarisation is a residual voltage that appears at the electrode used for the stimulation. In particular if the same electrode is used for emitting the stimulation pulse and for sensing the evoked response, the electrode- polarisation can make the detection difficult.

It is also known to the person skilled in the art that the delivery of stimulation pulses and the detection of the IEGM can be done either with unipolar or bipolar stimulation and detection.

US 6,473,650 B1 describes an ER detector. The basis for the de¬ tection is the idea that the electrode polarisation depends on the stimulation pulse amplitude, while the ER signal does not depend on this amplitude. The sensed signal is sampled and the DC level determined before the delivery of the pulse is subtracted from each sample.

US 5,697,957 describes the suppression of electrode-polarisation components when detecting ER. The sensed cardiac signal is added to either a differentiated or autocorrelated sensed cardiac signal and a difference is formed between the original sensed car¬ diac signal and the autocorrelated or differentiated signal, thereby extracting an ER component from the sensed cardiac signal. US 2003/008371 1 A1 describes ER detection by comparing the de¬ tected signal with template wave forms. The ER is classified as rep¬ resenting a type of capture if the ER waveform highly correlates with a certain template waveform.

Also US 2003/0050671 A1 describes ER detection that involves the correlation between a sensed signal and a template waveform. The document describes in particular a method of identifying fusion beats.

SUMMARY OF THE INVENTION

An object of the invention is to find an improved method of deter- mining a capture verification condition for a heart stimulating sys¬ tem. A further object is that the method shall be such that the cap¬ ture verification condition obtained by the method can be used to distinguish capture from loss of capture with improved accuracy. Another object of the invention is to provide an implantable heart stimulating device including such an improved capture verification condition. Still another object is to provide a heart stimulating sys¬ tem including such a device.

The above objects concerning the method are achieved by a method of determining a capture verification condition for a heart stimulating system. The heart stimulating system comprises at least a control circuit, a first pacing electrode and a first sensing elec¬ trode, wherein said first sensing electrode is identical with or not identical with said first pacing electrode. The control circuit com- prises first pacing means connected to said first pacing electrode and first sensing means connected said first sensing electrode. The method comprises the following steps: positioning said first pacing electrode so that the first pacing electrode is able to deliver pacing pulses to a first heart chamber, positioning said first sensing electrode so that the first sens¬ ing electrode is able to sense evoked responses in response to pac¬ ing pulses delivered by said first pacing electrode, delivering a number of pacing pulses, via said first pacing electrode, to said first heart chamber, wherein said number of pac¬ ing pulses includes pulses which cause the first heart chamber to capture and pulses which do not cause the first heart chamber to capture, sensing signals from said first sensing electrode within a time window following after each of said number of delivered pacing pulses and storing said sensed signals in a memory, categorising the stored signals in a first group and a second group, wherein the first group represents captured cases and the second group represents non-captured cases, based on the stored signals, determining a particular weight vector which assigns different weights for different parts of each sensed signal within said time window and which is to be used for calculating a weighted area within said time window, wherein the particular weight vector is determined such that by using the par¬ ticular weight vector when calculating weighted areas for the stored signals, the signals of said first group is more easily distinguished from the signals in said second group than if the signals in said first and second groups were distinguished from each other by said area without assigning different weights for different parts of the sensed signal within said time window, wherein said capture verification condition is determined as whether the weighted area, calculated with said particular weight vector, of a sensed signal within said time window is above or be¬ low a certain value.

It can be noted that the mentioned time window can also be called the ER window. This window can for example start somewhere be- tween 0 ms and 30 ms after the delivery of a pacing pulse. The window can for example have a duration of between 10 ms and 120 ms, preferably between 20 ms and 50 ms.

It should also be noted that the concept "weight vector" used in this document should not be interpreted to literally mean that this con¬ cept by necessity must be a vector. However, the concept in ques- tion refers to an entity which assigns different weights to different parts of the sensed signal.

It can also be observed that the number of delivered pulses neces- sary for determining the capture verification condition may vary. However, the number of delivered pulses must be sufficient such that there is a sufficient number of stored signals in each of the mentioned first and second groups. For example, it ought to be at least five or, more preferred, at least ten or, even more preferred, at least 20 stored signals in each of said first and second groups.

It is clear from the above that the capture verification condition in this case relates to an area within the time window. As mentioned above, such an area can be obtained by integrating the detected signal within the time window. However, the inventor of the present invention has found that in a particular case some parts of the sensed signal within the time window can be more relevant than others for determining whether capture is the case. It has thus been found that by using a particular weight vector which assigns differ- ent weights to different parts of the sensed signal, an improved cap¬ ture detection is obtained. It has also been found that such a par¬ ticular weight vector can be determined on the basis of the signals stored in said first and second groups. The weight vector is thus chosen such that the signals in the first group is easily distin- guished from the signals in the second group.

The mentioned weighted area is thus preferably an area determined by the sensed signal (for example the integral or negative integral of the sensed signal in said time window) but modified with the dif- ferent assigned weights in accordance with the weight vector.

Preferably, the particular weight vector is determined such that by using the particular weight vector when calculating weighted areas for the stored signals, the signals in said first group are distin- guished as much as possible, or at least to a high degree, from the signals in said second group. The weight vector can thus be deter- mined such that the distinction between capture and loss of capture for a particular patient is as clear as possible.

According to one manner of carrying out the method, the method includes a Vario test in order to determine a capture threshold, wherein the stored signals are categorised as belonging to said first or second group based on the result of said Vario test. The Vario test is known to a person skilled in the art. This is a method of de¬ termining the capture threshold. The Vario test is normally done by causing the pulse generator to automatically step through all possi¬ ble pulse amplitude settings and by detecting (for example with the help of a surface electrocardiogram) at which amplitude the capture threshold is.

Preferably, the determination of said particular weight vector in¬ volves an iterative process. The iterative process can thereby in¬ volve assigning a weight vector and modifying said weight vector iteratively in order to arrive at said particular weight vector. By itera- tively modifying the weight vector it is possible to arrive at a suit- able or optimal weight vector in order to distinguish the signals in the first group from the signals in the second group.

The determination of said particular weight vector can be done by maximising, or at least increasing to a sufficient level, a measure of how distinguished the signals in said first group are from the signals in said second group. This can be obtained by using a mathematical optimisation method. Several different mathematical optimisation methods are known to a person skilled in the art. Examples of such methods will be given below.

According to one manner of carrying out the method, the number of different parts of said signal within said time window, to which weights are assigned, is at least 8. Preferably, said first sensing means operates with a certain sampling frequency, and the number of different parts of said signal within said time window, to which weights are assigned, thereby corresponds to the sampling fre¬ quency. By using a sufficiently high number of different parts within the time window, a weight vector can be determined that clearly dis¬ tinguishes the signals in the two groups from each other, i. e. a weight vector which is highly relevant for distinguishing capture from loss of capture.

According to one manner of carrying out the method, the control circuit and the first sensing electrode are arranged for unipolar sensing. It should however be noted that the invention of course also is applicable to bipolar sensing.

The mentioned first heart chamber can be an atrium. It is often diffi¬ cult to detect capture in an atrium. However, with the present inven¬ tion it has been found that it is possible to determine a capture veri¬ fication condition that can be used also for detecting capture in an atrium. The invention can of course also be used for detecting cap¬ ture in a ventricle.

The heart stimulating system can comprise an implantable heart stimulating device in which said control circuit is positioned, and the calculations performed in order to determine said particular weight vector can be performed in said implantable heart stimulat¬ ing device. Alternatively, the calculations performed in order to de¬ termine said particular weight vector can be performed in a non- implantable unit that is separate from said implantable heart stimu- lating device. The mentioned non-implantable unit can for example be a so-called programmer that communicates via telemetry with an implanted heart stimulating device.

An implantable heart stimulating device according to the invention includes a control circuit that comprises: first pacing means adapted to be connected to a first pacing electrode suited to be positioned in or at a first heart chamber so as to receive pacing pulses from said first pacing means such that said first pacing means is able to pace said first heart chamber, and first sensing means adapted to be connected to a first sensing electrode, wherein said first sensing electrode can be identical with or not identical with said first pacing electrode, suited to be posi- tioned in or at said first heart chamber so as to transfer signals to said first sensing means such that said first sensing means is able to sense said first heart chamber. The control circuit is arranged to be able to detect an evoked response to a pacing pulse delivered by said first pacing means by sensing, with said first sensing means, within a time window that follows after a pacing pulse deliv¬ ered by said first pacing means, wherein a sensed signal is catego¬ rised as a capture if one or more capture verification conditions are fulfilled. The device is characterised in that it is set up to operate with at least one capture verification condition which is based on a calculated weighted area within said time window, wherein the weighted area is calculated by using a particular weight vector which assigns different weights for different parts of each sensed signal within said time window.

Preferred embodiments of the heart stimulating device according to the invention are clear from the dependent claims relating to this device. These embodiments have advantages corresponding to those described above in connection with the method according to the invention.

An implantable heart stimulating device according to the invention can thus use a capture verification condition that has been deter¬ mined with the help of the method according to the invention. The particular weight vector used for calculating the weighted area can therefore be optimised for detecting capture in the particular patient in which the heart stimulating device has been implanted. With the implantable heart stimulating device according to the invention, capture can therefore be distinguished from loss of capture with high accuracy. The heart stimulating device can for example be used for detecting capture by unipolar sensing in an atrium. How¬ ever, the implantable heart stimulating device can of course be set up to operate in other manners, for example for bipolar sensing. The implantable heart stimulating device can be arranged to detect capture either in an atrium or in a ventricle or in both an atrium and a ventricle. The implantable heart stimulating device can also be used in connection with bi-ventricular pacing. An implantable heart stimulating system according to the invention comprises: an implantable heart stimulating device according to any of the above mentioned embodiments, and a first lead and said first pacing electrode, wherein said first lead is connected to said device and said first pacing electrode is arranged on said first lead.

According to a preferred embodiment of the system, the system also comprises said first sensing electrode.

The system according to the invention has advantages correspond¬ ing to those of the heart stimulating device according to the inven- tion.

Further features and advantages of the invention will be clear from the following description.

BRIEF DESCRIPTION OF THE DRAWINGS

Fig. 1 shows schematically a heart stimulating system with a heart stimulating device connected to leads with sensing and pacing electrodes positioned in a heart. The figure also indicates a separate unit.

Fig. 2 shows schematically an example of a sensed signal within an evoked response window.

Fig. 3 shows another example of a sensed signal within an evoked response window.

Fig. 4 shows schematically different areas measured for a number of signals representing captured and non- captured cases. Fig. 5 illustrates schematically different weight values of a weight vector for different parts of an evoked response window.

Fig. 6 shows schematically another example of weight values of a weight vector within the evoked response window.

Fig. 7 shows schematically a flow chart for a method according to the invention.

Fig 8 shows a flow chart of an iterative process that can be used in the method according to the invention

DESCRIPTION OF PREFERRED EMBODIMENTS

Fig. 1 shows schematically an embodiment of a heart stimulating system according to the invention. Fig. 1 also schematically shows a heart with a right ventricle RV, a left ventricle LV, a right atrium RA and a left atrium LA. The implantable heart stimulating system includes an implantable heart stimulating device 10 according to the invention and a first lead 21 , a second lead 22 and a third lead 23. The implantable heart stimulating device 10 has a casing 12. Inside the casing 12 a control circuit 14 is located. The leads 21 , 22, 23 are connected to the control circuit 14 via a connector portion 13 of the heart stimulating device 10. On the first lead 21 , a first pacing electrode 25, 26 is arranged. In this case, the first pacing electrode 25, 26 is a bipolar electrode comprising a tip electrode surface 25 and a ring electrode surface 26. The first pacing electrode 25, 26 can also function as a first sensing electrode 25, 26. In the shown embodiment, the first pacing and sensing electrode 25, 26 is lo¬ cated to pace and sense the right atrium RA.

In a corresponding manner, the second lead 22 has a second pac- ing and sensing electrode 28, 29. The second pacing and sensing electrode 28, 29 is in this case located in the right ventricle RV. The third lead 23 has a third pacing and sensing electrode 32, 33 ar- ranged to pace and sense the left ventricle LV. In the shown em¬ bodiment, the electrodes are bipolar electrodes. However, it is also possible to operate the device 10 with unipolar pacing and sensing. In this case it is not necessary to have bipolar electrodes. In this case it is therefore sufficient with one electrode surface on each lead. In case of unipolar sensing, normally the casing 12 of the de¬ vice 10 functions as a second electrode surface. As just described, the same electrode functions both for pacing and sensing. However, as is known to a person skilled in the art, it is also possible that dif- ferent electrodes (or electrode surfaces) are used for pacing and sensing.

The control circuit 14 has first pacing means 16 adapted to be con¬ nected, via the first lead 21 , to the first pacing electrode 25, 26 such that the first pacing means 16 is able to pace a first heart chamber, i. e. in this case the right atrium RA. The control circuit 14 also has first sensing means 18 adapted to be connected, via the first lead 21 , to the first sensing electrode 25, 26 such that the first sensing means 18 is able to sense a first heart chamber, in this case the right atrium RA. The first sensing means 18 is in particular arranged to be able to sense an evoked response ER. Since the person skilled in the art knows how such pacing means 16 and sensing means 18 are designed, these means will not be described in more detail in this document. The heart stimulating device 10 also includes a memory 19.

The control circuit 14 is thus able to detect an evoked response to a pacing pulse delivered by the first pacing means 16 by sensing, with the first sensing means 18, within a time window, i. e. the ER window, that follows after the delivery of a pacing pulse.

The control circuit 14 is also set up to categorise a sensed signal as an indication of a capture if one or more capture verification condi¬ tions are fulfilled. According to the present invention, at least one capture verification condition is based on a calculated weighted area A within the ER window. The weighted area A is calculated by using a particular weight vector which assigns different weights for different parts of the sensed signal within the ER window.

It can be noted that according to a preferred embodiment, the men- tioned capture verification condition is the only capture verification condition which is used in the device 10. However, alternatively it is possible that this is one of a plurality of conditions used for deciding whether a sensed signal indicates capture. The mentioned capture verification condition can thus for example be combined with a slope and/or amplitude detection. According to a preferred embodi¬ ment, the device 10 according to the invention does not include any capture verification condition based on templates as in some of the above described documents.

Fig. 1 also indicates a separate unit 40. This separate unit 40 can be a so-called programmer that can communicate in a wireless manner (so-called telemetry) with an implanted device 10. The separate unit 40 includes a memory 42.

The present invention also concerns a method of determining a capture verification condition. Before describing this method in de¬ tail, some ideas behind the invention will be described.

Fig. 2 shows schematically an ER window, marked as a rectangle, and a sensed signal 41. The vertical axis shows the amplitude and the horizontal axis shows the time. The signal 41 limits an area A in the ER window. The area A can for example be the negative inte¬ gral of the sensed signal 41. The area A in this case is the area be¬ tween 0 amplitude and the signal 41. However, it is possible to use alternative definitions of the area A. As already mentioned above, it is known that the area A can be used as a capture verification con¬ dition. For the sake of this discussion, we can assume that the sig¬ nal 41 indicates capture.

Fig. 3 is similar to Fig. 2 but shows another sensed signal 42. For the sake of this discussion, we can assume that the signal 42 indi¬ cates loss of capture. The area A in Fig. 3 is smaller than the area A in Fig. 2. As is mentioned above, the area A can be used as a capture verification condition. However, sometimes it is difficult to distinguish capture from loss of capture by using such an area method. According to the present invention an improved capture verification condition can be determined.

Fig. 7 shows a schematic flow chart of a method according to the invention. A first pacing electrode 25 is positioned such that it is a able to deliver pacing pulses to a first heart chamber, for example to the right atrium RA. A first sensing electrode 25 is positioned such that it is able to sense evoked responses in response to pac¬ ing pulses delivered by the first pacing electrode 25. The first pac¬ ing electrode 25 can be the same as the first sensing electrode 25. The electrodes can preferably be connected to an implantable heart stimulating device 10 as described above. The whole system can thus be implanted in a patient.

At the next step, a number of pacing pulses are delivered via said first pacing electrode 25 to the first heart chamber RA. The delivery of the pacing pulses can involve a Vario test as described above. The delivered pacing pulses thus include both pulses which cause the heart chamber to capture and pulses which do not cause the heart chamber to capture.

After each delivered pacing pulse, signals from the first sensing electrode 25 is sensed within the ER window. The sensed signals are stored in a memory 19, 42. Based on the Vario test, the sensed signals can be categorised in a first group and in a second group. The first group represents captured cases and the second group represents non-captured cases.

Based on the stored signals, a particular weight vector which as¬ signs different weights for different parts of each sensed signal within said ER window is determined. The weight vector is to be used for calculating a weighted area within the ER window. The par¬ ticular weight vector can be determined by an iterative process, for example as schematically illustrated in Fig. 7. First an initial weight vector is selected. The selected initial weight vector may for example be a weight vector that assigns the same weight to all the different parts of the signal within the ER window. Another example of an initial weight vector that can be used is a weight vector where the weight xt associated with a certain sample (or part of the ER window) / is selected as A$iC - AsiL, where AsiC is the average of the values of sample / for the captured cases, i.e. for the stored signals in the first group, and AsiL is the average of the values of sample i for the loss cases, i.e. for the stored signals in the second group.

The number of different parts of the ER window to which different weights can be assigned can for example correspond to the sam- pling frequency of the device. If for example the sampling frequency is 512 Hz and if the ER window is 50 ms long, the number of differ¬ ent parts within the ER window is about 25. The weighted area for a sensed signal can be calculated as follows.

N Aw = ∑xrs, <"=1

where Aw is the weighted area, xt is the weight associated with the sample /, st is the zth sample and N is the number of samples in the window (i.e. the number of different parts in the ER window to which different weights can be assigned). The weighted areas are calcu¬ lated for the stored signals with the help of the selected weight vec¬ tor.

Next a measure of how distinguished the signals in the first group are from the signals in the second group is calculated. For the sake of simplicity, this measure is below called "measure of distinction".

Reference is now made to Fig. 4. Fig. 4 shows the areas A calcu¬ lated with a particular weight vector for the different stored signals, indicated with small circles. The horizontal axis indicates the num¬ ber of different stored signals. According to this schematic example only 30 signals are stored. The first 15 stored signals represent non-captured beats and the following 15 stored signals represent captured beats. The first 15 signals are thus the mentioned second group of stored signals and the following 15 signals are the men- tioned first group of signals. In Fig. 4 the difference D represents the smallest difference in weighted area between the signals indi¬ cating non-capture and the signals indicating capture. The differ¬ ence T indicates the largest difference in weighted area between the signals indicating non-capture and the signals indicating cap- ture. The relationship D/T is one possible measure of how distin¬ guished the signals in the first group are from the signals in the second group. However, the relationship D/T is only one example of a measure of distinction. Another example of a measure of distinc¬ tion is the following:

where M is a measure of distinction, AC is the average of the calculated weighted areas for the captured beats, i.e. for the mentioned first group, AL is the average of the calculated weighted areas for the loss beats, i.e. for the mentioned second group, SC is the standard deviation for the calculated weighted areas for the captured beats, i.e. for the mentioned first group, NC is the number of capture beats, i.e. the number of stored signals in the first group, SL is the standard deviation for the calculated weighted areas for the loss beats, i.e. for the mentioned second group, and NL is the number of loss beats, i.e. the number of stored signals in the second group. Approximate levels for AC and AL are shown in Fig. 4. Returning to Fig. 7, the iteration continues by modifying the weight vector. Thereafter weighted areas are calculated for the stored sig¬ nals with the modified weight vector. The measure of distinction is calculated again. The iteration process continues until a suitable weight vector has been found. The iteration can for example con¬ tinue until a maximum has been found for the measure of distinc¬ tion, or until the measure of distinction is sufficient.

The particular weight vector has now been determined. The capture verification condition, based on this particular weight vector, is then determined.

It should be observed that Fig. 7 only very schematically shows an iterative process. The iterative process can be any well known suit- able mathematical optimisation method. One such method is Rosenbrock's method. Other methods can also be used, such as Powell's method, the Simplex method or a Fibonacci search.

Fig. 8 shows in some more detail than in Fig. 7 an example of an iterative process that can be used in order to determine the particu¬ lar weight vector. The process of Fig. 8 is a version of Rosenbrock's method applied to the present case. The following symbols are used in Fig. 8.

w is the weight vector (which contains N elements), wi is weight number i (the ith element in w), x is a set of search directions, xi is search direction i, di is the step size in search direction i, f(w) is a "measure of distinction" (for example D/T or M) for the weight vector w, alpha is a constant, wherein alpha >1 , beta is a constant, wherein -1 < beta < 0, gamma is a constant that implicitly controls the number of itera- tions. As can be seen in Fig. 8, first a search direction is initialised. The process is such that all search directions will be searched until a move in any direction would generate a lower value of distinction. Then i is set to be equal to 1. Next f is calculated for a modified w (modified in search direction xi), i.e. f(w+xi*di) is calculated. If the calculated f(w+xi*di) > f(w), then the move to the modified w is considered to be successful, wi is then set to be equal to wi*di and di is set to di*alpha. The process then continues to the next step below in Fig. 8. On the other hand, if it is not the case that f(w+xi*di) > f(w), then the move is considered to be unsuccessful and the search direction di is changed to di*beta.

At the step below it is checked whether the last N moves were con¬ sidered unsuccessful. If this is not the case, then, if i is not equal to N, i is increased to i+1 and the process continues as shown by the arrows. If i is equal to N, then i is set to be equal to 1 before the process continues.

If, instead, it is found that the last N moves were unsuccessful, it is at the next step checked whether the improvement (i.e. the increase in f(w)) is less than gamma. Gamma can be a predetermined small value. If he improvement is under this predetermined value, it is as¬ sumed that further iterations will not lead to any significant im¬ provement. The particular weight vector is thus determined as the w that is obtained through the iteration.

If instead that improvement is not less than gamma, the iteration continues as shown in Fig. 8.

By the iterative process described in connection with Fig. 7 and 8 a particular weight vector is thus determined. The particular weight vector is such that by using the particular weight vector and calcu¬ lating weighted areas for the stored signals, the signals in the first group are distinguished as much as possible, or at least to a high degree, from the signals in the second group. The capture verifica¬ tion condition is thus determined as whether the weighted area, cal¬ culated with the particular weight vector that has been found by the iterative process, of a sense signal within an ER window is above or below a certain value.

Fig. 5 illustrates schematically the weights w of a weight vector for different parts of the ER window. For the sake of simplicity, it is as¬ sumed that different weights are assigned only to 10 different parts of a sensed signal within the ER window. As a comparison, Fig. 6 shows schematically the weights of a weight vector that does not assign different weights to different parts of the signal within the ER window. In this case the weight of each of the ten parts of the signal within the ER window is thus equal to 0.1 (1/N in the above equa¬ tion). A weight vector of the kind shown in Fig. 6 thus corresponds to the normal integration method according to the prior art that does not assign different weights to different parts of the signal.

With the particular weight vector determined in accordance with the present invention, the signals of the first group are thus more easily distinguished from the signals in the second group than if the sig¬ nals in the first and second groups were distinguished from each other by the area method without assigning different weights to dif¬ ferent parts of the sensed signal within the ER window. By finding an optimised weight vector, the ratio D/T or M (or another measure of distinction) thus increases. When later using the determined cap¬ ture verification condition in a heart stimulating device 10, capture can be detected with higher accuracy than before.

The calculations necessary in order to determine the particular weight vector is preferably done in a non-implantable unit 40 that is separate from the implantable heart stimulating device 10. The cal- culations can thus be done in a so-called programmer 40. Alterna¬ tively, it is possible to perform the calculation in the implantable heart stimulating device 10 itself. The capture verification condition can be determined directly after implant of the heart stimulating de¬ vice 10 in a patient. Alternatively, or additionally, the capture verifi- cation condition can be determined when the heart stimulating de¬ vice 10 has been implanted for a certain time. It is also possible to determine a capture verification condition for an implanted heart stimulating device 10 several times, since it is possible that for ex¬ ample the polarisation conditions for the electrodes 25, 26 may change over time. It can therefore be beneficial to at a later time determine a new capture verification condition with the method ac- cording to the invention in order to optimise the capture verification of the implanted heart stimulating device 10.

A heart stimulating device 10 according to the invention thus uses a particular weight vector for calculating a weighted area in an ER signal. The weight vector used in the device 10 is such that the dif¬ ferent weights assigned by the weight vector for different parts of the sensed signal within the ER window are optimised for distin¬ guishing capture from loss of capture with the help of the weighted areas. Although above it has been exemplified that the device ac- cording to the invention is used for unipolar sensing of an atrium, the device can also be used for sensing any other chamber of the heart and also for bipolar sensing.

The invention is not limited to the described embodiments but may be varied and modified within the scope of the following claims. In can also be noted that for the sake of simplicity, in the claims only the reference sign RA is used for a heart chamber and only the ref¬ erence signs 25, 26 are used for the electrodes. However, as ex¬ plained above, the present invention is applicable to any of the chambers of the heart.