a flow diagram of an algorithm for detecting various types of cardiac arrhythmias is shown in fig1 and is discussed below . the detection algorithm of the present invention has the ability to detect and treat ventricular rhythm disorders and withhold treatment for supraventricular arrhythmias such as af . in certain embodiments , the detection algorithm of the present invention can be employed by a subcutaneous implantable cardioverter - defibrillator ( s - icd ) or a unitary subcutaneous implantable cardioverter - defibrillator ( us - icd ), such as those described in us patent applications titled subcutaneous only implantable cardioverter - defibrillator and optical pacer , having ser . no . 09 / 663 , 607 , now u . s . pat . no . 6 , 721 , 597 ; and unitary subcutaneous only implantable cardioverter - defibrillator and optional pacer , having ser . no . 09 / 663 , 606 , now u . s . pat . no . 6 , 647 , 292 ; of which both applications were filed sep . 18 , 2000 , and the disclosures of both are hereby incorporated by reference . although the algorithm is intended for the detection and therapy of life - threatening rhythm disorders like fast vt and vf , it may also be adapted for use in the treatment of af ( or other rhythm disorders ) by accepting , rather than rejecting , for therapy the diagnosis of af . one feature of s - icd and us - icd devices that facilitates cardiac rhythm monitoring is the size and location of the lead . far field cardiac signals are more easily detected by use of larger electrodes . the s - icd and us - icd devices typically use electrode size much larger than that used in standard icd electrode systems for sensing vt / vf and thus are more appropriate for far field ecg sensing . in addition , the location in the 3 . sup . rd to 12 . sup . th rib space ( such as between the 4 . sup . th to 6 . sup . th rib space in one example ), provides a sufficient signal for detection of the cardiac rhythm with use of a subcutaneous - only icd location . examples of such s - icd devices and electrodes that provide proper shapes , sizes and locations for the devices and electrodes are described in us patent applications titled subcutaneous implantable cardioverter - defibrillator employing a telescoping lead , u . s . ser . no . 10 / 011 , 941 , now u . s . pat . no . 7 , 043 , 299 ; and subcutaneous electrode with improved contact shape for transthoracic conduction , u . s . ser . no . 10 / 013 , 980 , now u . s . pat . no . 7 , 065 , 410 ; of which both applications were filed nov . 5 , 2001 , and the disclosures of both are hereby incorporated by reference . in addition , s - icd and us - icd devices typically provide an electrode that is inward facing toward the heart to facilitate improved arrhythmia detection and rhythm monitoring . this design of the electrode compensates for not being directly in contact with the heart , like the sensing electrodes of the common transvenous icd . the compensating features of this type of lead electrode for the s - icd allow better rhythm detection by facing the myocardium and simultaneously avoiding or minimizing exposure to surface artifacts and noise that may be easily detected by subcutaneous sensing electrodes . in addition , the s - icd and the us - icd devices have two or more electrodes that provide a far - field view of cardiac electrical activity that includes the ability to record the p - wave of the electrocardiogram as well as the qrs . in one embodiment of the present invention , the detection algorithm can detect the onset of af by referencing to the p - wave recorded during normal sinus rhythm and monitoring for its change in rate , morphology , amplitude and frequency content as well as its timing and polarity relationship to the qrs . for example , a well - defined p - wave that abruptly disappears and is replaced by a low - amplitude , variable morphology signal would be a strong indication of the absence of sinus rhythm and the onset of af . in an alternative embodiment of the detection algorithm , the ventricular detection rate could be monitored for stability of the r - r coupling interval . in the examination of the r - r interval sequence , af can be recognized by providing irregularly spaced r - r intervals due to variable conduction of atrial beats to the ventricles through the atrioventricular node . an r - r interval plot during af appears “ cloudlike ” in appearance when many r - r intervals are plotted over time and compared to sinus rhythm or other supraventricular arrhythmias . moreover , a distinguishing feature of af when compared to ventricular fibrillation is that the qrs morphology is similar on a beat - by - beat basis during af despite the irregularity in the r - r coupling interval . in yet another embodiment , af may be detected by seeking to compare the timing and amplitude relationship of the detected p - wave of the electrocardiogram to the detected qrs ( r - wave ) of the electrocardiogram . normal sinus rhythm has a fixed relationship that can be placed into a template - matching algorithm that can be used as a reference point should the relationship change . in other aspects of the af detection process , one may include alternative electrodes that may be brought to bear in the s - icd or us - icd systems either by placing them in the detection algorithm circuitry through a programming maneuver or by manually adding such additional electrode systems to the s - icd or us - icd at the time of implant or at the time of follow - up evaluation . one may also use electrodes for the detection of af that may or may not also be used for the detection of ventricular arrhythmias , given the different anatomic locations of the atria and ventricles with respect to the s - icd or us - icd housing and surgical implant sites . once af is detected , therapy can be withheld since af is relatively benign or the arrhythmia can be treated by delivery of a synchronized shock using energy levels up to the maximum output of the device therapy for terminating af or for terminating other supraventricular arrhythmias . synchronization can be conducted by detecting the onset of the qrs signal and delivering the atrial cardioversion shock during the synchronized time period . the s - icd or us - icd electrode system can be used to treat both atrial and ventricular arrhythmias not only with shock therapy but also with pacing therapy . in a further embodiment of the treatment of af or other atrial arrhythmias , one may be able to use different electrode systems than what is used to treat ventricular arrhythmias . another embodiment would be to allow for different types of therapies ( amplitude , waveform , capacitance , etc .) for atrial arrhythmias compared to ventricular arrhythmias . an algorithm for detecting various types of cardiac arrhythmias with an s - icd or a us - icd will be described below with respect to fig1 . it should be noted that although the following description refers to an s - icd that employs the detection algorithm , the description also applies to a us - icd . as described above , the s - icd may be positioned between the third rib and the twelfth rib of a patient and uses a lead system that does not directly contact the patient &# 39 ; s heart or reside in the intrathoracic blood vessels of the patient . it is also known that while s - icd and us - icd devices are able to pace , the devices are not intended for long - term pacing . typically , the s - icd provides short - term pacing in the order of a few hours as an emergency therapy so that the patient can consult with a physician or other care - giver . as a result , some of the energy that would be used for pacing is available for better processing and sophisticated analysis of the sensed cardiac signals . accordingly , the s - icd has energy available to achieve cmrr values of approximately 70 db to 100 db , in one example . as noted above , s - icds use signals gathered from far field electrodes as opposed to electrodes that are in contact with the heart of a patient . as a result , a more sophisticated set of features can be used to make a device with higher specificity performance characteristics . a variety of detection schemes are possible with both the information available by the electrode placement as well as with the processing power available . in addition to the use of the sense circuitry for detection of atrial and ventricular information , sense circuitry can check for the presence or the absence of respiration . the respiration rate and / or minute volume can be detected by monitoring the impedance across the thorax using subthreshold currents delivered across the active can and the high voltage subcutaneous lead electrode ( or the 2 canister electrodes in one us - icd embodiment ) and monitoring the frequency in undulation in the waveform that results from the undulations of transthoracic impedance during the respiratory cycle . if there is no undulation , then the patent is not respiring and this lack of respiration can be used to confirm the qrs findings of cardiac arrest . the impedance measurement using the s - icd and us - icd electrodes can also be used to extract stroke volume , ejection fraction or cardiac output measures providing a hemodynamic sensor input that can be combined with rate , qrs signal frequency content , qrs morphology , and stability measures of these parameters to further refine the shock / no - shock decision - making process . the activity level of the patient can also be detected using miniature 1 - d , 2 - d or 3 - d accelerometer . piezo - electric crystals can also be used as a sensor to determine the activity level of the patient . activity level of the patient can be another input parameter used by the detection algorithm to further refine the shock / no - shock decision - making process . even the patient &# 39 ; s position can be detected by using a miniature mercury switch that is actuated when the patient is horizontal . the patient &# 39 ; s position can be used as another input parameter to the detection algorithm to further refine the shock / no - shock decision - making process . referring now to fig1 , a block diagram of a cardiac arrhythmia detection scheme according to an embodiment of the present invention is illustrated . the scheme uses elements comprising an electrocardiogram input 12 , an amplifier 14 , a narrow - band filter 16 , a wide - band filter 18 , a qrs detector 20 , an analog - to - digital ( a / d ) converter 22 , an r - r interval detector 24 , a qrs width detector 26 , a peak amplitude detector 28 , a slew rate detector 30 , an r - r interval stability detector 32 , a qrs width stability detector 34 , a peak amplitude stability detector 36 , a slew - rate stability detector 38 , additional post processor 40 , and a parameter integrator 42 . electrocardiogram ( ecg ) 12 comprises cardiac signal information sensed by the far field electrodes placed subcutaneously . in an embodiment , the signal information is sent to amplifier 14 , which has a cmrr value of at least approximately 80 db . the signal information is then sent from amplifier 14 to narrow - band filter 16 and wide - band filter 18 . in an example , narrow - band filter 16 has corners set at approximately 10 hz and 30 hz , and wide - band filter 18 has corners set at approximately 1 hz and 50 hz . in an embodiment , from the narrow - band filter 16 , the filtered signal information is presented to qrs detector 20 for purposes of identifying the timing of the qrs complex . from the wide - band filter 18 , the filtered signal information is presented to a / d converter 22 for converting the signal information to a digital format . from qrs detector 20 , the signal information is presented to r - r interval detector 24 , qrs width detector 26 , peak amplitude detector 28 and / or slew rate detector 30 . r - r interval detector 24 measures the time interval between each successive qrs complex . the signal information from r - r interval rate detector 24 can be further presented to r - r interval stability detector 32 , which analyzes the variability between each successive qrs complex . qrs width detector 26 measures the time interval of the sampled qrs complex . the signal information from qrs width detector 26 can be further presented to qrs width stability detector 34 , which analyzed the variability between the width of each successive qrs complex . peak amplitude detector 28 measures the maximum amplitude of the sampled qrs complex . the signal information from peak amplitude detector 28 can be further presented to peak amplitude stability detector 36 , which analyzes the variability between the peak amplitudes of each successive qrs complex . slew rate detector 30 measures the slew rate of the sampled qrs complex . the signal information from slew rate detector 30 can be further presented to slew rate stability detector 38 , which analyzes the variability between the slew rates of each successive qrs complex . in an embodiment , after processing by r - r interval detector 24 , r - r interval stability detector 32 , qrs width detector 26 , qrs width stability detector 34 , peak amplitude detector 28 , peak amplitude stability detector 36 , slew rate detector 30 and / or the slew rate stability detector 38 , the signal information can be presented to additional post processing 40 for further processing such as first derivative processing , second derivative processing , etc . in an embodiment , from nd converter 22 , the digitized cardiac signal information is further analyzed with respect to parameters including qrs complex width by qrs width detector 26 , qrs peak amplitude by peak amplitude detector 28 , and / or rising edge slew rate of the qrs complex by slew rate detector 30 . from the qrs width detector 26 , the peak amplitude detector 28 , and the slew rate detector 30 , the signal information can be further processed by additional post processors 40 . examples of additional processing may include adaptive filtering to avoid the slow - term effects that drugs or other substrate changes may have on the parameters , x out of y filtering to avoid decisions based on single events , moving average filters , etc . in addition , first derivative processing , second derivative processing , etc ., may also be accomplished . in one embodiment of the detection algorithm , rate is measured on a continuous basis . other parameters may have registers associated for fine tuning by a programmer and / or determined periodically or continually on a beat - by - beat basis during normal sinus rhythm ( nsr ) and used to enhance the detection algorithms effectiveness by compensating for the relatively slow - changing effects many of the input parameters may have due to body positional changes , substrate changes and drug effects . for example , short - term or long - term nsr averages of qrs width and r - wave amplitude would help compute the variability of these parameters with greater insensitivity to cardiac substrate changes . it is also envisaged that many if not all of these parameters will be stored on a beat - by - beat basis in a circular buffer , allowing more sophisticated algorithms to scan back in time and take into account the past behavior of the system . in addition , to conserve power consumption , a predetermined threshold will be used to enable the advanced analysis when multiple input variables are evaluated . several parameters such as rate , cardiac qrs pulse width , cardiac qrs slew rate , and the various measures of signal stability are , in one embodiment , measured on a continuous basis . in another embodiment , the non - rate measures may be turned on only when the rate exceeds a predetermined limit . the range of this predetermined limit could be 50 - 240 bpm . in one embodiment , the limit for activation of the non - rate detection measures would be 140 bpm . in another embodiment , the predetermined threshold that allows advanced analysis may be a measure other than rate , for example , qrs width or some other measure . in any case , each of these parameters has associated registers for fine tuning or modifying the parameters on either a periodic basis or a more dynamic basis such as that associated with body positional changes . fig2 is a diagram showing various heart rate zones for a cardiac arrhythmia detection scheme according to an embodiment of the present invention . fig3 is a flow diagram illustrating the interrelation of the detection scheme of fig1 and the heart rate zones of fig2 according to an embodiment of the present invention . in one embodiment of the detection algorithm , rate is used as a first criterion in the detection algorithm . as shown in fig2 and fig3 , four rate zones are defined , two of which can overlap each other . the first zone , defined as rates faster than rate 1 , define the fast vt and vf zone . rates greater than rate 1 will result in charging of the capacitors and immediate shock therapy . rates between rate 1 and rate 2 are defined as a sustained vt / vf zone . rates in this zone will only be treated if they persist for a pre - determined period , ( for example , 20 seconds ), even if the output of the parameter integration block 42 might indicate treatment should be withheld . the sustained rate zone can be disabled by effectively setting rate 1 and rate 2 equal . rates between rate 1 and rate 3 define an svt discrimination zone . rates within the svt discrimination zone enable further processing by the parameter integration block 42 shown in fig1 . the desired output of the parameter integration block 42 is a decision to apply shock treatment or withhold shock treatment due to non - shockable rhythms such as svts like af . finally , rates below rate 3 are defined as the nsr zone . in an embodiment , these rates are not treated . the parameter integration block 42 combines n - parameters to distinguish shockable rhythms from non - shockable rhythms . numerous methods are well known in the art to process such n - parameters and to determine a desired sensitivity and specificity based on patient testing data . some of these methods include statistical classifiers , fuzzy logic , artificial neural networks and rule - based systems . in operation , each of these methods constructs an integration block which can distinguish shockable and non - shockable rhythms from n parameters , or n dimensions . in one example , a statistical classifier can describe the decision boundary using only rate and qrs width stability criteria . these metrics or features are used to calculate scalar numbers or vectors that summarize the characteristics of the signals . fig4 is a diagram showing a shock / no - shock boundary for a cardiac arrhythmia detection scheme according to a two - dimensional embodiment of the present invention . more specifically , fig4 shows two different classes of data from a graph relating qrs width stability to rate . one class of data identifies an svt condition that should not be shocked . the other class identifies a vt / vf condition that should be shocked . as shown in fig4 , the two classes of data are separated by a decision boundary line . the decision boundary line can be drawn empirically , or determined analytically by computing the distance each feature vector lies with respect to the mean , weighted by the standard deviations of the class mean . these distances are known as the mahanalobis distances . the decision boundary line can then be determined as the line equidistant from the means or centroids of the two classes in an attempt to separate the two classes of rhythms with the least misclassification error . in three dimensions , different classes can represent multiple clusters . again , either a plane or surface plot can be determined empirically or analytically by computing mahanalobis distances of the different classes using set of patient testing data . the decision to shock or not - shock is then determined by observing on which side of the boundary the feature vector lays . in another embodiment , the decision to shock / no - shock can be performed with as few as one parameter . for example , a single scalar value can be set using qrs width . beats with a qrs width wider than a threshold are classified as ventricular tachycardia . the threshold maximum may be fixed or may be adjusted based on nrs computed measures or other calculations to account for long - term cardiac substrate changes . in another embodiment , a single parameter , such as rate , can be monitored such that once it reaches a threshold , the detection algorithm can then analyze other parameters to determine the shock / no - shock decision , thus conserving battery power . in another embodiment , the decision to shock / no - shock can be performed with three parameters . for example , in three dimensions , one axis represents qrs stability , another axis represents qrs slew - rate and the third axis represents rate . the decision boundary can then be represented as a surface , which can be a simple plane or a more complex three - dimensional surface . the decision boundary surface can be computed analytically or empirically to determine the shock / no - shock decision . such a surface could also be updated and changed according to a continuous or semi - continuous or periodic measurement of reference values for that patient . while a two - dimensional embodiment of the detection algorithm is shown , other embodiments are possible such as an n - dimensional embodiment that employs n different input parameters . artificial neural networks can also be used to determine the shock / no - shock decision boundary by emulating the observed properties of biological nervous systems and drawing on the analogies of adaptive biological learning . the principal feature of artificial neural networks is a structure of highly interconnected processing elements that are analogous to neurons and are tied together with weighted connections that are analogous to synapses . learning involves the changes that occur to the synaptic connections between neurons . neural networks are well suited to process n - dimensional input parameters and can be trained to produce a shock / no - shock decision often with imprecise or noisy data . many different neural structures are possible . for example , one structure comprises a multilayer perceptron that is trained with a backpropagation of error algorithm , although numerous other structures and training algorithms could also be effective . numerous characteristics and advantages of the invention covered by this document have been set forth in the foregoing description . it will be understood , however , that this disclosure is , in many aspects , only illustrative . changes may be made in details , particularly in matters of shape , size and arrangement of parts without exceeding the scope of the invention . the invention &# 39 ; s scope is defined , of course , in the language in which the appended claims are expressed .
in a subcutaneous implantable cardioverter / defibrillator , cardiac arrhythmias are detected to determine necessary therapeutic action . cardiac signal information is sensed from far field electrodes implanted in a patient . the sensed cardiac signal information is then amplified and filtered . parameters such as rate , qrs pulse width , cardiac qrs slew rate , amplitude and stability measures of these parameters from the filtered cardiac signal information are measured , processed and integrated to determine if the cardioverter / defibrillator needs to initiate therapeutic action .