in the discussion hereinbelow of the preferred embodiments , the following abbreviations and symbols are used : also , as used herein , the term qt or qt signal , embraces both the qrs ( depolarization ) portion and t wave ( repolarization ) portion of the ventricular signal , either spontaneous or evoked by pacing . thus , the term qt signal also includes the interval between the qrs and t wave portions , as well as other parameters including slope , integral of the signal , time derivative , etc . the term “ recent ” is used in reference to stored data representative of collected qt properties , e . g ., as in histogram form illustrated by the preferred embodiment . the term “ long qt syndrome ” is used in the same manner as the literature on the subject , and refers to conditions which generate into rapid arrhythmias such as tdp and other ventricular arrhythmias . referring now to fig1 there is shown a block diagram illustrating the primary components of a pacemaker system in accordance with this invention . a ventricular pulse generator 15 is controlled under control block 20 to generate ventricular pacing pulses , which are delivered to the patient &# 39 ; s heart through lead 16 l through to ventricular electrodes 16 e . likewise , for a dual chamber pacemaker , atrial pulse generator 18 also is controlled by block 20 , and generates atrial pace pulses which are delivered through lead 19 l to atrial electrodes 19 e . the signals sensed at the ventricular electrodes are amplified at qrs circuitry 24 and t wave sense circuitry 26 , respecctively , the outputs of which are connected to signal processing block 27 , and then transferred to control block 20 . likewise , signals sensed in the atrium by atrial electrode or electrodes 19 e are amplified at p wave sense circuitry 25 processed at block 27 , and connected back to control block 20 . as discussed further below , block 27 preferably is dedicated dsp hardware . control block 20 , in the preferred embodiment , contains a microprocessor , and is in two - way connection with suitable memory 21 . as discussed hereinbelow , the logic steps taken in the practice of this invention are preferably handled by software . also shown in fig1 is a sensor or sensors 28 , which can be used for rate control in a known manner ; the qt interval obtained from the signals outputted by sense circuits 24 and 26 can also be used for rate control . a program receiver ( and transmitter ) 29 is used to receive program instructions from an external programmer , which are downloaded through control block 20 . in the context of this invention , the analysis of qt data , discussed in detail hereinbelow , can be changed by downloading one or more replacement routines . this may be desirable , e . g ., in a case where experience has shown that for the patient involved , one or another of the qt parameters should be weighted differently . referring now to fig2 there is shown a flow diagram which illustrates the “ long qt ” routine together with other functions carried out cyclically in sensing and a pacing . in a preferred embodiment , decision rates are determined cyclically , as shown at 35 . these include phys_rate ( which is a measure of the patient &# 39 ; s natural rate ), and the dynamic pacing limit ( dpl ), which is coupled to phys_rate and sets the normal escape interval for pacing . see u . s . pat . no . 5 , 247 , 930 , incorporated herein by reference . long qt routine 39 is represented by blocks 50 - 53 set forth in fig3 and is the overall routine for analyzing qt and ves data and determining whether intervention pacing is called for , and if so , how to adjust the intervention rate . as is observed in the discussion below of the details of the routine for determining intervention therapy , the routine may call for intervention therapy based on determination of a long qt interval as such , but may also call for such therapy where the qt interval is not necessarily deemed “ long ”, but other changes in the qt signal are observed . the remainder of fig2 represents cyclical event detection and response , i . e ., handling by the pacemaker in response to a given event . in the event of an atrial sense ( as ) at block 40 , the pacemaker goes to the as - handling routine 45 , where the sense signal is analyzed for determination of the next step , whether the atrial signal can be tracked . the values of aa_int ( which represents current rate ) and va_int are saved at 36 . following this , the routine goes back to event detection block 40 and awaits a ventricular event . if the atrial escape interval has timed out , the pacemaker goes to routine 46 ( ap_handling ) where an atrial pace pulse is delivered . if a ventricular sense has been detected , the pacemaker goes to block 43 and handles the vs . likewise , if the ventricular escape interval ( v_esc ) has timed out , the pacemaker goes to block 41 and delivers a ventricular pace pulse ( vp ). following either ventricular event , at 37 values of vv_int and av_int are saved . when a t - wave is sensed , the pacemaker does ts_handling at 44 , and t_wave processing at 47 . the processing is suitably done by dsp , and results in storage of qt signal data from which the analysis carried out in the long qt routine is done . this data includes qt_int data and t - wave data . referring now to fig3 there is shown a flow diagram which represents the four main routines of the long qt routine 39 . at time of implant , the pacemaker is in an acute state , as seen at 49 . consequently , the acute learning phase is entered at 50 . during the acute learning phase 50 , the pacemaker accumulates data concerning the qt signal , which is used to build up profiles for subsequent use in monitoring for a malignant arrhythmia . there is insufficient time for a long learning period , and consequently the “ acute learning phase ” is carried out only for acute measuring of the normal or standard properties of the qt signal parameters that are used , which is done preferably in - hospital tests . when the pacemaker is ready to proceed from the acute phase , it may be programmed to go directly to the learning phase 51 each cycle . referring to block 51 , this routine is run cyclically to update qt data . thus , the properties of the preselected parameters of the qt signal which are used for detecting tdp , are continuously adapted , so that changes can be detected . following this , at routine 52 , the pacemaker determines whether tdp preventive pacing therapy is indicated , and if so , how to adjust the intervention pacing rate . at routine 53 , the determined intervention rate is checked to make sure that it is within appropriate limits . after this , the pacemaker leaves the long qt overall routine and goes to perform the sense - pace functions as discussed above in fig2 . referring now to fig4 a , 4 b , 4 c and 4 d , there are shown flow diagrams representing details of the learning phase routine 51 . fig4 a is a top level flow diagram of routine 51 . at 60 the recently acquired qt data is utilized to update a rate - qt histogram . as seen in fig4 b , the first step is to determine the appropriate rate_bin . thus , in accumulating histogram data , the data is compiled in respective bins representing respective rate ranges . when updating the rate - qt histogram , the first step undertaken at 64 is to determine the appropriate rate bin , corresponding to the rate as was stored at block 48 . then , at 65 , the routine examines the current value of qt_int , compared to the mean value for the rate_bin that is being examined . if the absolute value of this difference is greater than two times the standard deviation ( sd ), the measures are not used to update the bins , and the routine exits . if this difference is less than or equal to 2 * sd , the routine goes to 66 , where the pacemaker calculates and updates the value of the mean qt_int for the rate_bin which is involved . then , at 67 , the sd qt_int is calculated and updated for the rate_bin . referring back to routine 61 of fig4 a , the pacemaker updates the rate - qt dispersion histogram . this involves updating histogram data which compiles values of qt dispersion for different rate bins . qt dispersion , or qtd , is measured to reflect the difference between local maxima and minima values of the qt interval , and is associated with increased risk of ventricular tachycardia and sudden cardiac death . qt dispersion is a reflection of refractory dispersion . qt dispersion is suitably obtained by obtaining templates of the qrs ( depolarization ) and t wave ( repolarization ) portions of the qrs signal . in obtaining such templates , the wave signal data is suitably placed in the digital form in block 27 ; obtaining wave form templates is well known in the art and any suitable hardware or software arrangement can be used in this invention . differences of the respective wave form amplitudes along successive time increments are determined by subtraction of the wave form amplitude values , and the differences are integrated over the time domain . in a preferred embodiment , the template generation and template difference calculations are performed by dedicated hardware . see the further discussion below of template generation in connection with fig7 . however , any combination of hardware and software can be utilized . after determination of qt dispersion , at 71 the appropriate rate bin is determined , and then at 72 the absolute difference of the current value of qt dispersion and the mean value for the selected rate_bin is compared to 2 * sd . if this value is greater than 2 * sd , the routine exits . if the difference value is less than or equal to 2 * sd , the routine goes to 73 and updates the mean qt dispersion for the current rate_bin ; and at 74 the sd qt dispersion is updated for the rate bin . returning to block 62 of fig4 a , the pacemaker updates the 2qt / 2t histogram . the specific steps of this histogram updating are set forth in fig4 d . the current value of 2qt / 2t is determined at 80 , and the appropriate qt_bin is determined at 81 . the same steps are carried out mutatis mutandis , at 82 , 83 and 84 . it is to be noted that other properties , e . g ., t - wave amplitude , can be processed in the same manner . referring now to fig5 a , there is shown a detailed flow diagram for determining preventive pacing therapy . at 100 , the variable “ intervention_δ ” is set equal to 0 . this variable is computed each cycle , following updating of the data in the learning phase to provide a basis for determining whether intervention pacing is to be carried out . next , at blocks 101 , 102 and 104 , incremental rate - qtδ ; qt - dispersionδ ; and 2qt / 2t ) are determined , as shown in fig5 b , 5 c and 5 d respectively . in fig5 b , rate - qt ) is entered at 120 . at 121 , the current rate bin is determined , and at 122 the absolute value of qt_int - rate_bin_mean is compared to 2 * sd . if the difference value is not greater than 2 * sd , the routine exits . if it is greater , it goes to 123 where the pacemaker determines whether qt_int has been greater than qt_int_mean by more than 2 * sd during x a cycles out of the last y a cycles . if yes , then at 124 intervention_δ is incremented by a predetermined value ir a . if the answer at 123 is no , the intervention_δ is not increased , meaning that the qt_int as a property does not yet contribute to a possible intervention . referring to fig5 c , the same steps mutatis mutandis are taken at blocks 125 , 126 , 127 , 128 and 129 , resulting in possible further increase in intervention_δ by the predetermined value ir b , if the conditions at 127 and 128 are met . thus , if the change in dispersion corresponding to the applicable rate bin has been sufficient to meet the criteria , then the value of intervention_δ is increased by the value of ir b . referring now to fig5 d , the same steps are taken mutatis mutandis for the property 2qt / 2t at blocks 130 - 134 . thus , if the difference between mqt / mt and the prior mean value of the appropriate qt bin is greater than 2 * sd ( at 132 ) and this has been the case for x c out of y c prior cycles ( at 133 ), then intervention_δ is incremented by the predetermined value ir c . it is noted that the values ir a , ir b , and ir c can be programmed in accordance with observed characteristics of the patient , so as to give each optimum weighting . referring back to fig5 a , following determination of the changes to intervention_δ , at 105 it is determined whether there has been a ves . if no , the routine exits with intervention_ ) unchanged . however , if there has been a ves , at 106 it is determined whether this is the only ves out of the last y d cycles . if yes , the routine goes to 107 and it determines whether intervention_δ is already greater than 0 . if yes , the routine goes to 113 and doubles the value of intervention_δ , to reflect the significance of a ves occurrence . if the answer at 106 is no , indicating that there have been other ves events during the last y d cycles , the routine goes to 110 and determines whether intervention_δ is greater than a predetermined threshold . if no , then at 111 intervention_ ) is set to a minimum value ; if yes , the routine skips to 112 and determines whether there have been ves events in more than a predetermined number x e out of the last y e cycles . if no , the routine goes to 113 and doubles the value of intervention_δ . however , if yes , the routine goes to 114 and sets intervention_δ to a maximum value . referring now to fig6 there is shown a routine for determining rate limits for the intervention rate . at 140 , it is determined whether the current intervention rate is greater than the phys_rate . if yes , the routine goes to block 141 and determines whether the intervention_δ is greater than 0 . if no , suggesting an absence of an indication of indication of tdp , at 142 intervention rate is decremented by predetermined drift factor . however , if yes at 141 , the routine goes to 143 and increments intervention rate by the determined value of intervention_δ . going back to block 140 , if intervention rate is equal to or less than phys_rate , the routine branches to 145 and determines whether intervention_δ is greater than 0 . if no , intervention rate is set at the current pacing rate , or dynamic pacing rate ( dpl ). however , if intervention_δ is greater than 0 , the routine goes to 148 and sets the intervention rate to phys_rate + intervention_δ . thus , the intervention rate is adjusted depending upon where it currently is with respect to the patient &# 39 ; s physiological rate , and depending upon the qt signal analysis carried out in tdp pacing therapy routine . still referring to fig6 at 150 it is determined whether the calculated intervention_rate is greater than the upper pacing limit ( upl ). if yes , it is limited to upl at 151 . at 152 , the escape rate is set to correspond to the intervention_rate . at 154 , it is determined whether the escape interval is less than qt_int + 40 . the reason for this is that if a large rate jump is required , qt interval may still be so large that the intervention pace pulse may be delivered during the t wave . for this reason , the esc_int is limited to the value of qt_int plus a predetermined value , e . g ., 40 ms . it is to be noted that when the qt interval shortens because of the intervention_rate increase , then the escape rate can be increased further accordingly . there is thus disclosed a pacemaker system and method for systematically analyzing signal data so as to determine if there has been a ves , and if the qt signal has properties indicative of changing conditions which suggest tdp or another dangerous ventricular arrhythmia . the preferred embodiment has been illustrated wherein three such qt properties are utilized , along with ves . however , it is within the scope of this invention to incorporate n routines for analysis of n properties of the qt signal , and a determination of an intervention rate based upon appropriate weighting of each of the n properties . as noted , t - wave amplitude data can be processed and used in the determination . it is to be noticed further that in the illustrated preferred embodiment , the occurrence of a ves event is utilized to increment the intervention rate ; and the frequency of recent ves events is used in determining the amount of change in intervention rate . referring now to fig7 there is shown a flow diagram of steps taken in accordance with a vt prevention feature of this invention . the vt prevention feature is directed to detecting conditions during patient awakening that suggest the onset of vt . this feature can be incorporated instead of the long qt syndrome feature , or in addition . at 240 , a routine is run for determining the patient awakening period . any criteria can be used for determining “ awakening ”; reference is made to u . s . pat . no . 5 , 861 , 011 , and incorporated herein by reference . at 241 the pacemaker determines whether the patient is in fact in the awakening period . if no , at 244 the intervention state is deactivated , and at 245 the pacemaker goes into the learning phase , the details of which are set forth in the connection with fig8 . if the patient is in the awakening period , the pacemaker goes on to process current information concerning the depolarization ( qrs ) and repolarization ( t wave ) waveforms . at 247 , the pacemaker obtains the depolarization template for the current cycle , and compares it to the depolarization template which was generated during the learning phase . the difference is computed and stored as δ 1 . likewise , at step 248 , the pacemaker gets the current repolarization template and compares it with the stored repolarization template from the learning phase , and generates a δ 2 , which is representative of the difference . then , at block 249 , the pacemaker goes through a ves analysis , to obtain a measure ( ) δ 3 ) of whether there has been a ventricular extra systole , and how close the coupling interval was to the patient &# 39 ; s mean qt interval . the ves analysis is set forth in particular detail in fig9 . following this , the pacemaker goes to block 250 , and determines whether intervention is indicated , based upon data gathered and generated at blocks 247 , 248 , and 249 above . the determine intervention routine is set forth in detail at fig1 . still referring to fig7 at block 254 , the pacemaker determines whether intervention has been activated . if no , the routine exits , and the pacemaker continues to set the pacing escape intervals in a normal way . however , if yes , the routine branches to block 255 , and determines whether the variable d is equal to or greater than a predetermined threshold . d is calculated in the determine intervention routine 250 , and represents a summation of the respective δ values calculated at blocks 247 , 248 , which are representative of refractoriness dispersion ; and also the δ value calculated at 249 , which represents the presence of a dangerous ves . the calculation of d is discussed in more detail in connection with fig1 . if d is equal to or greater than threshold , at 257 the pacemaker determines whether the intervention rate remains less than the maximum intervention rate . if yes , intervention rate is incremented at 258 ; if no , intervention rate is at its maximum allowable value and the routine exits . if , at 255 , d is not up to threshold , then at 260 it is determined whether the intervention rate is higher than the minimum intervention rate . if yes , at 261 intervention rate is decremented by subtracting a programmable drift value ; if no , the intervention rate is as low as is allowed , and the routine exits . referring now to fig8 there is shown a flow diagram of the learning phase routine 245 , in accordance with this invention . as discussed in connection with fig7 this phase is entered when the patient is not in the awakening period . at 262 , the pacemaker calculates a variables δ 1 which constitutes the depolarization template then stored in memory , minus the current depolarization template for the just detected r wave . in obtaining a template , the wave signal data is placed into digital form by an a - d converter , which is part of the function provided by signal processor block 27 . obtaining waveform templates is well known in the art , and any suitable hardware or software arrangement can be used in this invention . in a preferred embodiment , digital samples are obtained representing the waveform amplitude along successive time increments , from the beginning of the wave to the end , and are stored . in determining the δ difference , the respective waveform amplitude values are subtracted , and the difference is integrated over the time domain . in a preferred embodiment , the template generation and template difference calculations are performed by dedicated hardware , as shown at 27 . however , any combination of hardware and software can be utilized . next , at 264 , it is determined whether the ) 1 value is small . the reason for making this determination is that large variations during the learning phase suggest that the signal is not stable enough to be a reference during the awakening period . consequently , if the deviation found at 264 is statistically small ( indicating stability ), at 266 a weighting factor w 1 is increased ; if the deviation is not statistically small , then at 268 the w 1 is decreased . these weighting factors are utilized in the subsequent determination of intervention in routine 250 . next , at block 270 , the depolarization template is adapted so as to be changed toward the most recently detected depolarization template . this can be done , e . g ., by matching the minimum values and slopes of the depolarization template and the new qrs wave , and adjusting each sample of the template incrementally toward the samples of the new qrs . the functions are suitably carried out by the microprocessor of block 20 . still referring to fig8 blocks 271 , 272 and 274 - 276 represent corresponding steps for the repolarization template , which reflects the sensed t wave . at 271 , the deviation δ 2 is determined , by subtracting the just obtained repolarization wave from the stored repolarization template . at 272 , it is determined whether the deviation is small , representing a stable signal . if yes , weighting factor w 2 is increased at 274 ; if no , w 2 is decreased at 275 . the repolarization template is then adapted and stored at 276 . referring now to fig9 there is shown a flow diagram of the routine 249 for carrying out ves analysis . this is done because vt is often initiated or preceded by one or more ventricular extra - systoles if the patient heart rate is low enough and the coupling interval is critical , i . e ., ves occurs near or in the vulnerable phase . in this situation likewise , intervention may be indicated , so the pacemaker of this invention collects ves data which is included in the determine intervention routine . at block 282 , it is determined whether there has been a ves . if no , the routine branches to block 283 , and sets δ 3 ( the deviation value corresponding to ves analysis ) to zero . however , if there has been a ves , then it has to be determined how critical the ves is deemed . at 285 , the pacemaker compares the coupling interval ( the interval from the prior r wave to the δves to the current qt interval . if the coupling interval minus the current qt interval is less than or equal to a stored critical phase value , then the ves is deemed very critical , and at 290 δ 3 is given a weighted very_critical value . however , if the answer at 285 is no , then the routine goes to 286 and determines whether there have been a predetermined number n ves occurrences in the last m intervals , where n and m are programmable numbers . if yes , the ves occurrence is deemed critical , and at block 287 δ 3 is given a weighted critical value which is somewhat less than the very_critical value . if the answer at 286 is no , at 288 δ 3 is given a low_critical weighting . at routine 249 , the values assigned to δ 3 include the weighting factor , such that the stored deviation is assumed to be accompanied by a weighting factor of 1 for the calculation which is carried out at block 277 . referring now to fig1 , there is shown a flow diagram of the determined intervention routine 250 . at step 277 , the pacemaker determines the total deviation d , which is calculated by taking the sum of all the separate deviations , each multiplied by its respective weighting factor w . in the preferred embodiment as illustrated , there are three different deviations determined , so the summation is from i = 1 to i = 3 . thus , each cycle the summation constitutes δ 1 multiplied by the current value of w 1 ; δ 2 multiplied by the current value of w 2 , and the determined value of δ 3 , where the weighting factor is 1 since the value of δ 3 has already been calculated to reflect appropriate weighting . at 278 , it is determined whether the current value d is greater than or equal to threshold . if no , intervention is not indicated and the routine exits . however , if d is greater than or equal to the programmed threshold , then intervention is activated at step 280 , suitably by setting a flag to store the fact that intervention has been activated . as seen in fig7 once intervention has been activated , it is not deactivated until the awakening period is over , at which time the pacemaker proceeds to block 244 and deactivates intervention . as per the above discussion of fig7 if d drops below threshold when intervention is activated , the intervention rate is decremented toward a lower limit . recapitulating with respect to the vt prevention routine which is carried out during awakening , and referring to fig7 it is seen that during normal periods outside of the awakening period , both daytime and nighttime , the pacemaker is continually adapting the depolarization and repolarization templates in the learning phase . when the patient is in the awakening period , data represented by deviation values δ 1 , δ 2 and δ 3 are obtained at blocks 247 , 248 and 249 respectively . whenever , during the awakening period , the cumulative sum of the deviations exceeds a predetermined threshold , intervention is activated , and the intervention mode is maintained throughout the awakening period . of course , if the deviation values , which represent refractory dispersion , become small , then the intervention rate drifts down to a lower rate limit , such that there effectively is no overdrive intervention . however , as long as the wave variability remains high , the intervention rate will be maintained so as to provide overdrive pacing calculated to prevent ventricular tachycardia . it is noted that while three separate deviation measurements are illustrated in the preferred embodiments , additional data can be collected , and weighted accordingly . additionally , each weighting factor can be programmed to vary within predetermined limits , so that weighting can be adapted in terms of known patient history . there have been disclosed several embodiments for prevention of ventricular arrhythmias , in particular , by detecting long qt syndrome and by determining when the patient is vulnerable to vt during awakening . the embodiments of this invention use ves data , qt data , or ves and qt data for determining the onset of a dangerous arrhythmia , and for determining overdrive pacing rate .
there is provided a pacemaker system which includes intervention for overdriving the patient &# 39 ; s natural heart rate in the event of a sensed incipient ventricular arrhythmia condition , and particularly torsades de pointes . the pacemaker continually acquires qt signals and analyzes them for respective properties , updating statistical information relating to the properties . in a preferred embodiment , the pacemaker analyzes qt interval , qt dispersion , time derivative of the qt interval , and / or t - wave amplitude and determines an intervention for pacing therapy based upon changes to these properties . the pacemaker also monitors premature ventricular beats and generates data representative of such occurrences , which data is used alone or in combination with qt data in determining whether intervention is indicated , for adjusting the intervention pacing rate . there is thus provided a systematic approach for monitoring relevant data so as to reliably determine when intervention pacing therapy is needed , and for adjusting the intervention pacing rate .