Abstract:
A device and method for sensing breathing disorders, irregularities or insufficiencies is provided. One aspect includes sensing a precursor to an onset of a breathing disorder or episode of a breathing disorder and responding to sensing the precursor. Another aspect includes responding to treat the breathing disorder before manifestation of the disorder. Another aspect includes identifying a likelihood of a breathing disorder and responding using the likelihood and other information indicating onset or occurrence of a breathing disorder.

Description:
RELATED APPLICATION DATA  
       [0001]     This application is a continuation-in-part of U.S. application Ser. No. 10/686,891 filed Oct. 15, 2003, fully incorporated herein by reference. 
     
    
     FIELD OF THE INVENTION  
       [0002]     The invention relates to a device and method for detection, diagnosis and treatment of breathing disorders and to the management of pulmonary or cardiac rhythms. The invention further relates to treating breathing disorders in response to detecting and/or predicting at least one precursor of such breathing disorder. In particular the invention relates to preventing or reducing breathing disorders by detecting and/or predicting a precursor and treating a subject by controlling breathing in response to detecting or predicting the precursor. In addition the invention relates to treating cardiac related disorders by detecting a precursor to a breathing disorder and in response, controlling breathing.  
       BACKGROUND OF THE INVENTION  
       [0003]     Breathing insufficiencies, irregularities and other disorders may occur in conjunction with or as a result of a variety health related disorders and may further cause or exacerbate health disorders.  
         [0004]     Disordered breathing may contribute to a number of adverse cardiovascular outcomes such as hypertension, stroke, congestive heart failure, and myocardial infarction. Sleep-related breathing disorders, especially central sleep apnea, have been found to have a relatively high prevalence in patients with congestive heart failure and may have a causative or influencing effect on such heart failure. In about 50% of patients with stable congestive heart failure, there is an associated sleep disordered breathing, predominantly central sleep apnea, with a minority having obstructive sleep apnea. Furthermore, sleep related breathing disorders are believed to be physiologically linked with congestive heart failure. Central sleep apnea is a known risk factor for diminished life expectancy in patients who suffer from congestive heart failure. It is also believed that in view of this link, treatment aimed at relieving sleep related breathing disorders may improve cardiovascular outcomes in patients with congestive heart failure.  
         [0005]     Pulmonary edema, a condition in which there is excess fluid in the lungs and often found in heart failure patients, is believed in some circumstances to lead to hyperventilation and hyperoxia or apnea. Most heart failure patients with central sleep apnea, when lying flat, tend to have central fluid accumulation and pulmonary congestion, which may stimulate vagal irritant receptors in the lungs to cause reflex hyperventilation.  
         [0006]     Breathing disorders may include, for example, hyperventilation, hypoventilation, apnea, and other related breathing disorders. Hyperventilation, which results in hyperoxia, is a condition in which the respiratory rate is pathologically high or is above a desired rate. Hyperventilation may occur due to pulmonary edema or excess fluid built up in the lungs and may ultimately result in apnea episodes. Hypoventilation is a condition in which the respiratory rate is pathologically low or below a desired rate. Apnea (absence of breathing) is a breathing disorder most typically occurring during sleep that can result from a variety of conditions.  
         [0007]     Sleep breathing disorders include two types of sleep apnea: obstructive sleep apnea (partial apnea or obstructive apnea) and central sleep apnea. Obstructive sleep apneas result from narrowing of the pharynx with out-of-phase breathing in an effort to create airflow, whereas central sleep apnea arises from reductions or other abnormalities in central respiratory drive. Partial apnea may be a condition in which central respiratory drive is reduced and in which there is an obstruction or narrowing of the airway. During obstructive sleep apnea, respiratory effort increases. Complete apnea or central apnea is defined as a condition where there is no effective EMG signal or phrenic nerve signal, i.e. where there is no effective or significant physiological response. In central sleep apnea, respiratory movements are absent or attenuated but in phase with normal breathing. Sleep apnea typically results in some sort of arousal or wakefulness following cessation of breathing.  
         [0008]     Central Sleep Apneas usually are initiated by reduction in PCO 2  resulting from an increase in ventilation. When PCO 2  falls below the threshold level required to stimulate breathing, the central drive to respiratory muscles and airflow cease or diminish significantly and apnea (or attenuated breathing) ensues until the PCO 2  rises again above the threshold required to stimulate ventilation. Often spontaneous arousal occurs with apnea.  
         [0009]     Prior to central sleep apnea and some partial apneas, a respiration pattern or breathing disorder called Cheyne-Stokes, frequently occurs. A Cheyne-Stokes respiration pattern of breathing is also frequently associated with congestive heart failure, pulmonary edema, as well as with both obstructive and central apneas. The Cheyrie-Stokes respiration pattern comprises a cyclical and often repeating pattern of a period of hyperventilation typically followed by a period of apnea. The hyperventilation portion of a Cheyne-Stokes respiration pattern has a morphology of a gradually increasing breathing pattern in depth and frequency followed by a gradually decreasing pattern in depth and frequency. The period of characteristic hyperventilation is followed by a period of apnea or hypopnea. It is believed that the onset of Cheyne-Stokes in CHF and pulmonary edema patients is caused by low blood oxygen saturation (SaO 2 ) levels resulting from cardiac, pulmonary insufficiencies, or circulatory delay. The SaO 2  receptors associated with the carotid artery are believed to perceive a drop in SaO 2  where there is a time lag in receiving oxygenated blood due to cardiac insufficiencies.  
         [0010]     To compensate for drop in SaO2, hyperventilation typically ensues. And, after a period, this hyperventilation pattern increasing in depth and frequency, the PCO 2  levels begin to drop below the chemoreceptor threshold, resulting in apnea.  
         [0011]     Currently a number of methods are used to treat sleep apnea. For example, supplemental oxygen supplied through a nasal ventilator has been used to relieve symptoms of sleep apnea. Non-invasive airway pressure including continuous positive airway pressure (CPAP), bivalve and adaptive pressure support servo-ventilation have been used to treat central sleep apnea and obstructive sleep apnea with varying results. Another method to treat central sleep apnea is using aggressive diuresis to lower cardiac filling and beta-blocker and angiotensin-converting enzymes. However, this treatment is often not optimal since excessive use of diuretics leads to renal complications and patient discomfort.  
         [0012]     A method and apparatus for treatment of obstructive sleep apnea and central sleep apnea has been proposed where an implantable pulse generator stimulates a nerve in the upper airway tract of a patient and a stimulator stimulates the diaphragm. The upper airway tract stimulation opens the airway tract to permit breathing in response to detecting a pressure differential across the upper airway passage indicating obstructive sleep apnea. The diaphragm stimulation treats central sleep apnea in response to sensing central sleep apnea.  
         [0013]     Phrenic nerve stimulation has been used to stimulate the diaphragm throughout an overnight period to treat patients with Central Congenital Hyperventilation at night. The device used was turned on at night to stimulate the nerve continuously and then turned off during the day. However, this device was not adapted for situations where patients would breathe spontaneously. It also does not adjust for a patient&#39;s varying needs during the night.  
         [0014]     While some methods have been proposed to determine when sleep apnea has occurred and to attempt to induce breathing when apnea occurs, they do not prevent an apnea episode. They also do not predict an apnea episode and therefore can only deliver treatment based on sensed rather than predicted conditions or events.  
         [0015]     U.S. Pat. No. 6,641,542 discloses a method and apparatus to detect and treat sleep respiratory events. A processor extracts an average cycle length and frequency of at least one of a Cheyne-Stokes respiration and periodic breathing based upon the physiological data, and determines whether therapy is required based on the average cycle length and the frequency. The specific therapy disclosed was either pacing the heart to increase the heart rate or stimulating the hypoglossal nerve to cause contralateral extension of the patient&#39;s tongue or an increase in volume of the patient&#39;s oropharynx in accordance with U.S. Pat. No. 5,591,216. While according to the disclosure, the severity of Cheyne-Stokes is used to determine whether or not to stimulate, it is not believed to be used to determine or predict the likelihood of an apnea event subsequently occurring.  
         [0016]     Accordingly it would be desirable to provide a method and apparatus for to prevent a breathing disorder episode. It would also be desirable to provide a method an apparatus for identifying a likelihood of a disordered breathing episode occurring.  
       SUMMARY OF THE INVENTION  
       [0017]     The present invention provides a method and apparatus for sensing a precursor to or predicting a likelihood of a breathing disorder event or episode. “Sensing” as used herein may include but is not limited to, sensing with a sensor and/or detecting or recognizing various parameters, breathing patterns, etc. The present invention further provides a device and method for treating a subject by controlling breathing to avoid or prevent the breathing disorder event after sensing a precursor or determining a likelihood of the breathing disorder. According to one variation, the breathing disorder event is apnea or the onset of an episode of apnea. According to another variation, the breathing disorder event is an episode of Cheyne-Stokes respiration. According to another aspect, a sensor senses a precursor and an analyzer recognizes a respiratory pattern corresponding to a likelihood of a subsequent breathing disorder occurrence. Analyzer as used herein may comprise software, hardware or a combination thereof.  
         [0018]     The precursor may be one or more of several indicators of a possibility or likelihood of a breathing disorder event occurring in the near or foreseeable future. Such indicators may include a particular breathing pattern such as a periodic breathing pattern, hyperventilation or occurrence of a Cheyne-Stokes pattern of hyperventilation prior to an apnea event, or other breathing rhythm or pattern that leads to a disorder. Immediately preceding Cheyne-Stokes, in some patients, there is a long deep breath which may be detected as a precursor. The EMG waveform or diaphragm movement morphology, rate, and amplitude, for example may be used to identify a precursor breathing disorder pointing to an event.  
         [0019]     A number of other indicators may be used as precursors whether occurring immediately or a longer time period before a breathing disorder event. Biochemical changes prior to breathing disorders may be detected. For example, sensed SaO 2  and PCO 2  levels in the blood change prior to a Cheyne-Stokes hyperventilation event, and prior to apnea respectively may be detected. The SaO 2  level drops due to insufficiencies of the heart&#39;s and/or lungs&#39; functioning, which is believed to cause the initiation of Cheyne-Stokes respiration. The increased breathing in the Cheyne-Stokes leads to a drop in PCO 2  which is believed to cause the initiation of apnea. These changes in blood gas concentrations may be predictors or precursors of the breathing disorder of Cheyne-Stokes and apnea respectively.  
         [0020]     In addition, heart rhythm may be monitored and certain patterns in heart rhythm may indicate or predict the onset of Cheyne-Stokes or of Apnea. For example, if the duration of a QRS (the series of deflections in an electrocardiogram that represent electrical activity generated by ventricular depolarization prior to contraction of the ventricles) interval is longer than a specified period for a particular patient (i.e. &gt;120 ms), then there is a likelihood in cardiac output reduction further increasing probability of circulatory delay and resultant Cheyne-Stokes respiration. Changes in heart rate and detection of any arrhythmias may also be indicative of the heart condition further increasing the possibility of increased circulatory delay and thus, a resulting Cheyne-Stokes respiration.  
         [0021]     In addition, a blood velocity monitor may be used to determine particular blood flow characteristics, for example, changes in cerebral blood flow velocity. Cerebral blood flow changes may be precursors related to changes in blood gas volume. For example, an increase or decrease in velocity may relate to a change in cardiac output.  
         [0022]     Such breathing pattern or other precursors may be different on a per patient basis. For example, the device may sense, record and analyze a plurality of breathing sequences or other precursors that precede breathing disorder events for a particular individual. The device may then devise a predictive model based on the precursor breathing patterns to earlier breathing disorder events. Such model may include a determination of a likelihood of the next event occurring in a particular individual. For example, the device may monitor breathing for a plurality of consecutive nights to learn about the pattern and morphology of breathing prior to a disorder such as, e.g., Cheyne-Stokes or apnea.  
         [0023]     In observing, recording and analyzing prior events, the device may observe precursors occurring a period of time prior to the event, e.g., seconds, or minutes before, or during a day before a breathing disorder event occurring at night. A baseline or normal level of one or more indicators may be identified. The device will record such indicator for a period of time prior to an event occurring. The baseline can be compared to a pre-event recorded indicator. A pattern is identified using predictive algorithms and digital signal processing techniques. Future indicators are then observed and compared to a predictive model or pattern to determine the likelihood or probability of an event occurring in the future. Such detection may also include, for example, tracking or counting episodes or frequency of episode occurrence to determine a likelihood of an event occurring. The frequency and number of events during a daytime period may also be used to calculate a likelihood of a breathing disorder occurring during a nighttime period. A percentage of time in which disordered or periodic breathing occurs may also be used as a threshold for predicting a later occurring breathing disorder. The predictive model may also be determined on a patient by patient basis. The apnea event or other breathing disorder has a likelihood of following a precursor but does not always follow.  
         [0024]     A precursor may be an event, a series of events or patterns of events, existence of a condition, a series of conditions or a pattern of conditions that precede an apnea event or other breathing disorder, and that indicate a likelihood of an apnea event or other breathing disorder, occurring. A combination of the precursors described above may be used to make a likelihood determination.  
         [0025]     As an example of a precursor, rapid, periodic, or shallow breathing during the day when there is no corresponding increase in activity level indicates a possibility of a nighttime breathing disorder occurring. A low activity level in combination with a higher rate of breathing provides information regarding the status of a patient&#39;s pulmonary edema. This information can be correlated to a likelihood or possibility of sleep disordered breathing occurring during the night (e.g. Cheyne-Stokes respiration or sleep apnea). Alternatively, a patient&#39;s edema status, where severe, may be used to turn off stimulation if such stimulation is believed to be ineffective under the circumstances.  
         [0026]     A precursor may also be an event or condition that usually occurs prior to a Cheyne-Stokes event and particularly in congestive heart failure patient. Such precursor may be, for example, a decrease in SaO 2  or a particular heart rate, blood pressure, blood velocity or a particular breathing pattern or morphology as determined, e.g., by an EMG of the diaphragm. The device or method may comprise a detector configured to detect a portion or a characteristic of such Cheyne-Stokes pattern of hyperventilation. Cheyne-Stokes may be detected by detecting sensing and or analyzing a portion of a Cheyne-Stokes respiration pattern. The general envelope or portion of an envelope of such pattern may be detected. Increasing or decreasing hyperventilation amplitude and/or frequency may also be used to detect Cheyne-Stokes hyperventilation.  
         [0027]     In addition when hyperventilation occurs, there may be a threshold peak amplitude that is detected above which apnea most likely will occur. When this amplitude is detected, stimulation is provided to control breathing. The threshold may be determined on a patient by patient basis by observing peak values of hyperventilation and the subsequent occurrence of apnea. Also a peak may be identified as a predetermined percentage of a baseline breathing amplitude.  
         [0028]     One aspect of the invention provides a responsive device configured to treat a subject prior to the occurrence of a likely breathing disorder or to avoid or reduce symptoms of a breathing disorder. In response to identifying a precursor, the treatment, for example, may comprise controlling breathing by electrically stimulating the phrenic nerve or diaphragm to control breathing. Breathing rate or inspiration morphology may be controlled to avoid or reduce the breathing disorder episode. For example, breathing may be stimulated to influence or manipulate PCO 2  and maintain SaO 2  levels, for example, by causing shallow and long inspiratory cycles. Examples of influencing PCO 2  and SaO 2  are described in copending application entitled: “ System And Method For Diaphragm Stimulation ” incorporated herein by reference.  
         [0029]     In one variation, the device will sense or recognize when an event is about to occur and will take over control of breathing and thereby prevent the onset of the breathing disorder. For example, when predicting a disorder and/or after sensing or recognizing a hyperventilation portion of the Cheyne-Stokes respiration pattern, a breathing stimulation is initiated to control and regulate breathing and to interrupt the hyperventilation pattern. For example, stimulation to control breathing and increase SaO 2  may be initiated upon detecting the first few breaths of a Cheyne-Stokes hyperventilation. Alternatively, stimulation to control breathing and increase PCO 2  may be initiated upon detecting the end of the envelope or patterns of a Cheyne-Stokes hyperventilation event. As such, the stimulation may prevent the apnea from occurring.  
         [0030]     The response to sensing a precursor prior to an event, may be to arm a device so that a disorder recognizing device is on a higher level of alert for recognizing a breathing disorder or for sensing another precursor. A responsive device may adjust the sensitivity of an apnea or other breathing disorder monitor when the likelihood of an event occurring changes.  
         [0031]     Certain sensing, detection or analysis functions or sensors may be enabled, or armed when a likelihood of an event occurring is determined. For example, where certain precursors were sensed during the daytime period, the system may be armed for the following nighttime period. Alternatively, the device may just take over breathing to prevent any disorder after it has been determined that a sufficient likelihood exists for a breathing disorder to occur. For example, the device may determine a likelihood of an event occurring based on events during the daytime. In response to the likelihood exceeding a predetermined threshold, the device will control breathing at night, either continuously or on an intermittent basis.  
         [0032]     The method and apparatus provide stimulation to the diaphragm to elicit diaphragm movement or to an associated body organ or tissue to control movement of the diaphragm and thus manage or control respiration when desired. Alternatively, the phrenic nerve may be directly accessed and stimulated.  
         [0033]     One embodiment is a device comprising: one or more sensors (e.g. EMG, ECG, diaphragm movement, or activity sensors, blood gas sensors, blood pressure sensors, blood velocity sensors) for sensing information corresponding to respiration of the diaphragm and/or a precursor to a breathing disorder. A processor is provided for processing the sensed information to identify a precursor, and delivering electrical stimulating pulses to the associated body organ or tissue to control breathing or prevent occurrence of an episode of a breathing disorder. The processor may further determine stimulation parameters or time the stimulation response based at least in part on sensed information. A number of different parameters may be programmed into the processor to determine when and how to stimulate respiration based at least in part on presence or absence of a detected precursor. Other information may also be sensed and used to determine if to stimulate, and when to stop or modify stimulation. Also, the processor may determine when to cease stimulation by determining when the body resumes normal respiratory function, when respiration has been captured or is being controlled by the stimulation, or when the breathing disorder has been prevented or treated.  
         [0034]     The respiratory effort or respiration may be sensed, for example, by sensing the phrenic nerve activity and/or the EMG of the diaphragm, or by detecting movement of the diaphragm or chest. Respiration by the diaphragm may be stimulated by electrically stimulating the phrenic nerve and/or by stimulating the diaphragm muscle.  
         [0035]     Phrenic nerve or EMG activity sensed may include, for example, amplitude, frequency, and waveform to determine central respiratory efforts, the absence, a decrease in amplitude, abnormalities in frequency and/or amplitude, or waveform morphology of which may indicate a likelihood of the onset of apnea, hyperventilation, or hypoventilation or other breathing disorders. The nerve activity may be compared to predetermined activity levels or patient historical activity. A period of abnormal activity or similar pattern during an earlier period may be used to determine the likelihood of sleep apnea occurring later during sleep.  
         [0036]     An awake sinus zone may be defined as a respiratory rate or range of rates or patterns programmed into the device for a specific patient when awake, where the respiratory rate is considered normal and intrinsic. A preprogrammed EMG amplitude or range may define a normal range or pattern in this state. An abnormal pattern type may also be programmed in for use in detecting a precursor breathing pattern. Such patterns may be observed by a device and saved in memory and used to detect when a similar precursor pattern occurs. Or, such patterns may be preprogrammed in the device for recognition. A sleep sinus may be defined as a respiratory rate or range of rates or pattern programmed into the device for a specific patient when asleep where the respiratory rate or pattern is considered normal and intrinsic. A preprogrammed EMG amplitude or range may define a normal range in this state. The device may be programmed to match the EMG rate and amplitude when stimulating to a normal rate and amplitude by auto adjusting the pace output.  
         [0037]     In addition, position sensors may be used to determine degree of patient reclining or standing, e.g., in increments of degrees. Information from the position sensor may be used as a tool to match respiratory activities and patterns to the position of the patient. Accelerometer information may be used to determine information regarding patient&#39;s physical activity, e.g., to match/compare to the respiratory patterns and activities and collect data on related patient activities, respiratory activities.  
         [0038]     Alternatively or in addition, accelerometer sensors may also be used to determine information regarding movement pattern of the diaphragm muscles, intercostal muscles, and rib movement and thus determine overall respiratory activity and patterns. These sensors may also be used to observe response to stimulation.  
         [0039]     According to an embodiment, a stimulator includes an implantable controller coupled through leads to electrodes to be implanted on the diaphragm in the vicinity of the phrenic nerve branches. The electrodes may sense either nerve activity or EMG signals of the diaphragm. The stimulator may further include a pulse generator configured to deliver stimulating pulses, either to the same electrodes used for sensing or to additional stimulation electrodes. The stimulation electrodes may also be placed adjacent the phrenic nerve at some point along its length to provide stimulation pulse to the nerves, which in turn innervate the diaphragm muscle causing contractions and resulting respiration. Alternatively the electrodes may be placed on the phrenic nerve for both sensing and stimulation.  
         [0040]     Stimulation of respiration may be initiated during a detected precursor event or at a given time after detection of onset of the precursor event. The time period may be pre-programmed for a specific patient by the physician, as otherwise preset, or as determined a program in the treatment device.  
         [0041]     Breathing stimulation may start at given intervals. In one embodiment the interval time is initially about 10 seconds. The interval is slowly increased from 11 seconds to about 15 seconds. If breathing is brought back within a normal range, the stimulation may be terminated until another precursor is detected. If breathing is not controlled as desired, the pacing begins again at 10-second intervals and this is repeated (loop). Alternatively the stimulator may be held at the longest duration of the cycle until breathing resumes (hold). If the patient&#39;s breathing is normalized and they are breathing on their own, typically where the SaO 2  and PCO 2  levels are normalized and the brain resumes sending nerve stimulation. The system then returns to the mode where it is sensing to detect a precursor. Alternatively the stimulator may be turned on for a set period of time where a likelihood exists for an occurrence of a breathing disorder. After the period of time, the progressively increasing periods (hysteresis) between stimulation may be made until intrinsic breathing resumes with a loop or hold pattern.  
         [0042]     An additional feature of the invention may include a patient self-management module configured to communicate with the patient or provider. Such module is described, for example, in application Ser. No. 10/686,891 entitled “Breathing Disorder Detection and Therapy Delivery Device and Method” incorporated in its entirety herein by reference.  
         [0043]     This device may also measure and monitor heart rate and activity by sensing ECG. This information may be used to provide breathing stimulation to induce desired breathing patters to reduce the clinical impact of an abnormal heart function. If a patient is a CHF patient or suffers other heart disease, breathing can be controlled to increase SaO 2  thereby reducing the load on the heart (e.g., reducing heart rate and pumping activity and consequently myocardial contractibility). Reducing the load can lead to positive remodeling of the myocardium.  
     
    
     DETAILED DESCRIPTION OF THE DRAWINGS  
       [0044]      FIG. 1  is a schematic of a sleep breathing and heart disorder treatment device in accordance with the invention placed on the diaphragm.  
         [0045]      FIG. 2  illustrates a processor unit of a sleep breathing and heart disorder treatment device in accordance with the invention.  
         [0046]      FIG. 3A  is a schematic of a signal processor of the processor unit in accordance with the invention.  
         [0047]      FIG. 3B  is an example of a waveform of an integrated signal processed by the signal processor of  FIG. 3A .  
         [0048]      FIG. 4  is a schematic of an external device of a stimulator in accordance with the invention.  
         [0049]      FIGS. 5A-5B  are an illustration of a variety of stimulation bursts with different parameters ( FIG. 6B ) corresponding to different resulting EMG signals.  
         [0050]      FIG. 6A  is an exemplary graph of SaO 2  values as precursors to or during breathing disorder episodes as shown in  FIG. 6B .  
         [0051]      FIG. 6B  is an exemplary graph of diaphragm EMG prior to and during a Cheyne-Stokes hyperventilation episode and prior to, during and subsequent to apnea episodes.  
         [0052]      FIG. 6C  is an exemplary graph of PCO 2  values corresponding to the diaphragm EMG illustrated in  FIG. 6B .  
         [0053]      FIG. 7  is a schematic of a Cheyne-Stokes breathing pattern.  
         [0054]      FIG. 8  is an exemplary graph of a precursor detection and treatment response in accordance with the invention.  
         [0055]      FIG. 9  is an exemplary graph of a precursor detection and treatment response in accordance with the invention.  
         [0056]      FIGS. 10A and 10B  is an exemplary graphs of various exemplary breathing disorder precursor patterns.  
         [0057]      FIG. 11  is an exemplary graph of a Cheyne-Stokes detection and treatment response in accordance with the invention.  
         [0058]      FIG. 12  is a precursor detection and treatment scheme in accordance with the invention.  
         [0059]      FIG. 13  is a precursor detection and treatment scheme in accordance with the invention. 
     
    
     DETAILED DESCRIPTION OF THE INVENTION  
       [0060]      FIG. 1  illustrates a stimulator  20  comprising electrode assemblies  21 ,  22 , each comprising a plurality of electrodes  21   a - d  and  22   a - d  respectively. The electrode assemblies  21 ,  22  are implanted on or in the diaphragm muscle so that one or more of electrodes  21   a - d  and of electrodes  22   a - d  are approximately adjacent to one or more junctions of the phrenic nerves  15 ,  16 , respectively, with the diaphragm  18  muscle. Mapping techniques for identifying optimal electrode placement is described in contemporaneously filed application entitled “System And Method For Mapping Diaphragm Electrode Sites”, fully incorporated herein by reference. The electrode assemblies may be in a variety of configurations including loops or other flexible configurations, including but not limited to, those described in parent application Ser. No. 10/686,891, incorporated herein by reference.  
         [0061]     The electrode assemblies  21 ,  22  sense and stimulate at the diaphragm muscle. They may sense diaphragm movement with movement sensors (e.g. with movement detectors  25 ,  26 ) and may also sense EMG and ECG. They are implanted laparoscopically through the abdomen and on the surface of the diaphragm or into the muscle of the diaphragm  18  with needles or other similar devices. The electrode assemblies  21 ,  22  may be anchored with sutures, staples, or other anchoring mechanisms typically used with implantable EMG electrodes. The leads  23 ,  24  coupling the electrode assemblies  21 ,  22  to the control unit  100  are then routed subcutaneously to the side of the abdomen where a subcutaneous pocket is created for the control unit  100 . The electrode assemblies  21 ,  22  are each flexible members with electrodes  21   a - d , assembled about 5-20 mm apart from one another and electrodes  22   a - d  assembled about 5-20 mm apart from one another. Any number of desired electrodes may be used on the assemblies  21 ,  22 . The electrode assemblies  21 ,  22  are coupled via leads  23 ,  24  to control unit  100 . The control unit  100  is configured to receive and process signals corresponding to sensed nerve activity, and/or EMG of the diaphragm  18 , to determine the respiratory parameters and/or patterns of the diaphragm  18  as described in more detail herein. The control unit is also configured to process the sensed signal to determine ECG information. The electrodes assemblies  21 ,  22  are coupled via leads  23 ,  24  to input/output terminals  101 ,  102  of a control unit  100 . The leads  23 ,  24  comprise a plurality of electrical connectors and corresponding lead wires, each coupled individually to one of the electrodes  21   a - d ,  22   a - d . The control unit  100  is implanted subcutaneously within the patient, for example in the chest or abdominal region on top of the pectoral muscle (depending on the position of the electrodes, e.g. on the diaphragm or elsewhere along phrenic nerve). The control unit  100  is configured to receive sensed nerve electrical activity from the electrode assemblies  21 ,  22 , corresponding to respiratory effort of a patient. The control unit  100  includes a processor  105  ( FIG. 2 ) that delivers stimulation to the nerves  15 , 16  or diaphragm  18  in response to a sensed precursor effort as determined and processed by the processor  105  and control unit  100 .  
         [0062]     The stimulator  20  also comprises movement detectors  25 ,  26 , included with the electrode assemblies  21 ,  22  respectively and electrically connected through leads  23 ,  24  to the control unit  100 . A number of different movement detectors may be used, for example an accelerometer, strain gauges, piezo electric devices, and variable resistive devices. They may be coupled or in communication with the control unit  100  (or alternatively, the external device  140 ). The movement detectors  25 ,  26  detect movement of the diaphragm  18  and thus the respiratory effort exerted by the diaphragm  18 , the respiratory waveform, respiratory rate or other respiratory parameters. The movement detectors  25 ,  26  sense mechanical movement and deliver a corresponding electrical signal to the control unit  100  where the information is processed by the processor  105 . The movement may be used to qualify the electrical phrenic nerve or EMG signal sensed by the device to confirm inspiration or exhalation is occurring, e.g., by matching mechanical and electrical activities of the diaphragm. Movement may be used in a variety of ways to provide information on the condition of a patient. For example, it may be used as feedback system to mimic natural diaphragm movement when stimulating or as part of auto-adjustable therapy.  
         [0063]     Another sensor  29  may be implanted in, attached or coupled to the body in a direct or indirect communication with the control unit  100  or external device  140 , e.g. telemetrically or through lead wires. The sensor  29  may include one or more sensors positioned at one or more locations and used to sense information relating to precursors to breathing disorders. Such sensor(s) may include, for example, SaO 2  or PCO 2  blood gas monitors, heart rate monitors, blood velocity monitors or blood pressure monitors. An ECG sensor may be included as well. For example, ECG information may be filtered out of a signal from electrodes  21 ,  22 .  
         [0064]     The movement detectors or other sensors may be positioned on the electrode assembly, may be separately positioned on the diaphragm or elsewhere in or on the body. The movement sensor on the lead positioned on the diaphragm may monitor diaphragm movement as well as other movement information. The movement sensor located inside the electronics housing may be used to monitor patient activity as well as other movement information.  
         [0065]     Electrodes may be selected from the plurality of electrodes  21   a - d  and  22   a - d  once implanted, to form electrode pairs or groups that optimize the stimulation response. They may also form selectable monopolar stimulation electrodes with a remote return electrode. Such desired response may include tidal volume, breathing rate and the slopes of the inhalation and exhalation curves. For example, a timed series of pulses may be used to create a desired respiratory inhalation and/or exhalation period. Optimal electrode location may be identified using a mapping system as described in copending application entitled “System And Method For Mapping Diaphragm Electrode Sites” filed on even date herewith and incorporated herein by reference. Alternatively, electrodes may be selected as described in the U.S. application Ser. No. 10/686,891.  
         [0066]     As an alternative to placing electrodes on the diaphragm, sensing and/or stimulating electrodes may be placed on the phrenic nerve, for example at a location in the neck or thorax or at a combination of various locations.  
         [0067]      FIG. 2  illustrates an implantable control unit  100 . The control unit  100  includes electronic circuitry capable of generating and/or delivering electrical stimulation pulses to the electrodes of electrode assemblies  21 ,  22 , through leads  23 ,  24 , to cause a diaphragm respiratory response in the patient. For purposes of illustration, in  FIG. 2 , the control unit  100  is shown coupled through leads  23 ,  24  to electrode assemblies  21 ,  22  respectively. Electrodes from electrode assemblies  21 ,  22  may also act to sense EMG and thus respiration parameters. As such they may be used periodically as breathing characteristically occurring prior to breathing disorder or to sense a precursor, e.g. a breathing pattern such as periodic breathing characteristically occurring prior to a breathing disorder, or hyperventilation portion of a Cheyne-Stokes respiration. The electrode assemblies may also sense ECG signals which may be processed using known signal processing techniques.  
         [0068]      FIG. 2  illustrates an implantable control unit  100 . The control unit  100  includes electronic circuitry capable of generating and/or delivering electrical stimulation pulses to the electrodes of electrode assemblies  21 ,  22 , through leads  23 ,  24 , to cause a diaphragm respiratory response in the patient. For purposes of illustration, in  FIG. 2 , the control unit  100  is shown coupled through leads  23 ,  24  to electrode assemblies  21 ,  22  respectively. Electrodes from electrode assemblies  21 ,  22  may also act to sense EMG and thus respiration parameters. As such they may be used periodically as breathing characteristically occurring prior to breathing disorder or to sense a precursor, e.g. a breathing pattern such as periodic breathing characteristically occurring prior to a breathing disorder, or hyperventilation portion of a Cheyne-Stokes respiration.  
         [0069]     The electrode assemblies may also sense ECG signals which may be processed using known signal processing techniques.  
         [0070]     The control unit  100  comprises a processor  105  for controlling the operations of the control unit  100 . The processor  105  and other electrical components of the control unit are coordinated by an internal clock  110  and a power source  111 , such as, for example, a battery source or an inductive coupling component configured to receive power from an inductively coupled external power source. The processor  105  is coupled to a telemetry circuit  106  that includes a telemetry coil  107 , a receiver circuit  108  for receiving and processing a telemetry signal that is converted to a digital signal and communicated to the processor  105 , and a transmitter circuit  109  for processing and delivering a signal from the processor  105  to the telemetry coil  107 . The telemetry coil  107  is an RF coil or alternatively may be a magnetic coil. The telemetry circuit  106  is configured to receive externally transmitted signals, e.g., containing programming or other instructions or information, programmed stimulation rates and pulse widths, electrode configurations, and other device performance or function details. The telemetry circuit  106  may also receive sensed information transmitted from sensor  29  which may also include a telemetry circuit. The telemetry circuit is also configured to transmit telemetry signals that may contain, e.g., modulated sensed and/or accumulated data such as sensed EMG or ECG activity, sensed nerve activity, sensed responses to stimulation, sensed position information, sensed movement information, sensed blood gas information, sensed blood velocity or pressure information, and episode counts or recordings.  
         [0071]     The leads  23 ,  24  are coupled to inputs  101 ,  102  respectively, of the control unit  100 , with each lead  23 ,  24  comprising a plurality of electrical conductors each corresponding to one of the electrodes or sensors (e.g., strain gauge) of the electrode assemblies  23 ,  24 . Thus the inputs  101 ,  102  comprise a plurality of inputs, each input corresponding to one of the electrodes or sensors. The signals sensed by the electrode assemblies  21 ,  22  are input into the control unit  100  through the inputs  101 ,  102 . Each of the inputs are coupled to a separate input of a signal processing circuit  116  (schematically illustrated in  FIG. 2  as one input) where the signals are then amplified, filtered, and further processed, and where processed data is converted into a digital signal and input into the processor  105 . Each signal from each input is separately processed in the signal processing circuit  116 . The signal processing circuit  116  is coupled to the processor  105  which receives input from the signal processor  116 . The processor processes the data in accordance with a program in RAM  120  and other stored data in RAM  119  to identify or detect a precursor breathing pattern or patterns. In response to such determination according to a program stored in RAM  120 , the processor  105  controls stimulation of the diaphragm through electrode assemblies  21 ,  22 .  
         [0072]     The EMG/Phrenic nerve sensing has a dual channel sensor. One corresponding to each lung/diaphragm side. However, sensing can be accomplished using a single channel as the brain sends signals to the right and left diaphragm simultaneously. Alternatively, the EMG or phrenic nerve collective may be sensed using a single channel. Either a dual channel or single channel setting may be used and programmed. The typical pulse width parameter will range from 0.5 ms to 10 ms in increments of 50 μs. The pulse amplitude is from about 0.1 v to 5 volts in increments of 100 μV if the stimulation source is a voltage source. If the stimulation source is the constant current source, the stimulation intensity&#39;s range is about 1 mA-24 mA in increments of 0.5 mA, monophasic or biphasic waveforms, and pulse width(s) of about 50-200 microseconds. The amplitude and frequency may vary pulse by pulse within the same burst of pulses for a single inspiration waveform. The refractory period is 1 to 10 seconds in increments of 1 second. The system may adjust the pace, pulse, frequency and amplitude to induce or control rate of the various portions of a respiratory cycle, e.g. slope of inspiration, inspiration depth, inspiration length and tidal volume. The system may also adjust the rate of the respiratory cycle.  
         [0073]     The system EMG &amp; ECG memory is programmable to pre-trigger and post trigger lengths of storage for sleep apnea or other breathing disorder episodes. The pre-trigger events are the waveform signals and other sensed information observed prior to or in transitioning to an event. Post-trigger events are the waveforms and other sensed information observed after an event and/or after treatment following precursor detection, to observe how the device operated. Post-trigger recordings can confirm if the episode was successfully treated. The pre-trigger and post-trigger time periods can be preprogrammed into the control unit  100 . Pretrigger events may be used in subsequent cycles as precursors for identifying a breathing disorder event likelihood.  
         [0074]     The control unit  100  includes a position sensor  121  configured to sense a relative position of the patient, e.g. angular position, and provide a digital signal corresponding to the sensed position to the processor  105 . The control unit  100  also includes an accelerometer  122  configured to sense acceleration and movement of the patient and to provide a digital signal corresponding to the sensed movement to the processor  105 . In addition, an accelerometer  122  is positioned within the control unit  100 . The accelerometer  122  measures the activity levels of the patient and provides the signal to the processor  105  for use in further analysis. Using an accelerometer in the implanted device indicates the activity level of the patient in conjunction with breathing and/or cardiac rate. Using the activity (accelerometer) sensor value and respiratory and/or cardiac information, the health of the respiratory system may be analyzed, evaluated and monitored. For example, if a patient&#39;s respiratory rate increases with an increase in activity and decreases with a decrease in activity, within a normal range, the patient&#39;s system will be considered functioning normally. If the patient&#39;s respiratory rate is out of range or too high while the activity sensor indicates at rest or low, then the patient may be hyperventilating. The hyperventilation breathing pattern may also be analyzed to determine if it is following a Cheyne-Stokes respirator. The control unit  100  includes a position sensor  121  configured to sense a relative position of the patient, e.g. angular position, and provide a digital signal corresponding to the sensed position to the processor  105 .  
         [0075]     Also, if the patient&#39;s respiratory rate is out of range or too high while the activity sensor indicates at rest or low, then the patient may be suffering from pulmonary edema. A determination of the severity of a patient&#39;s edema may be used to determine whether or not to treat a patient in accordance with the methods described herein.  
         [0076]     For example, the determination may indicate that a patient should not be stimulated if it is determined to be inefficient to do so. Alternatively, information concerning pulmonary edema may indicate stimulation is desired and may also indicate specific parameters to stimulate breathing for that night. For example, if pulmonary edema is at severe level, the system may not stimulate that night. If pulmonary edema is at mid-range level, stimulate may be set to a lower amplitude and longer inspiration cycle. If pulmonary edema is at mild level, stimulation may be set to a higher amplitude and to cycles similar to intrinsic breathing.  
         [0077]     A position sensor  121  is also located within the control unit  100  and has an output coupled to the processor  105 . The position sensor senses the relative angle of the patients&#39; position. The position sensor is used to detect a patient&#39;s relative position, e.g., horizontal, supine, or standing. An available position sensor is the Spectrol  601 - 1045  smart position sensor, self-contained device that provides an analog output over a full range of 360 degrees without requiring external components.  
         [0078]     The control unit  100  further includes a ROM memory  118  coupled to the processor  105  by way of a data bus. The ROM memory  118  provides program instructions to the control unit  100  that direct the operation of the stimulator  40 . The control unit  100  further comprises a first RAM memory  119  coupled via a data bus to the processor  105 . The first RAM memory  119  may be programmed to provide certain stimulation parameters such as pulse or burst morphology; frequency, pulse width, pulse amplitude, duration and a threshold or trigger to determine when to stimulate. A second RAM memory  120  (event memory) is provided to store sensed data sensed, e.g., by the electrodes  21   a - d    22   a - d , (EMG, nerve activity or ECG), position sensor  121 , movement sensors  25 ,  26 , the accelerometer  122 , blood gas sensors (e.g. pulse oximeter), blood velocity sensors, or blood pressure monitors (e.g. sensor  29  may include one or more of these sensors). These signals may be processed or analyzed and used by the control unit  100  as programmed to determine if and when to stimulate or provide other feedback to the patient or clinician. Also stored in RAM memory  120  may be the sensed waveforms for a given interval, and a count of the number of events or episodes over a given time as counted by the processor  105 . The system&#39;s memory will be programmable to store: number of breathing episodes per period of time or during a time of day; pacing stimulation and length of time; the systemic auto-correction (i.e., how stimulus was adjusted, e.g., in amplitude frequency phase or waveform, to reach a desired or intrinsic level response); body resumption of breathing; the number of disorder episodes with specific durations and averages or trending information; periodic breathing events; hyperventilation episodes during supine position; number of hyperventilation episodes during sleep position; number of hyperventilation episodes during vertical position; detection of SaO2 levels, pCO2 levels, ECG information, and blood velocity or blood pressure information. These signals and information may also be compiled in the memory and downloaded telemetrically to an external device  140  when prompted by the external device  140 .  
         [0079]     A variety of signal processing techniques may be used to process the various sensed signals including those as are known to one of skill in the art. An example of the circuits of the signal processing circuit  116  corresponding to one of the EMG inputs for one of the electrodes or pairs of electrodes of the assemblies  21 ,  22  is illustrated schematically in  FIG. 3A . An EMG signal is input into an amplifier  130  that amplifies the signal. The signal is then filtered to remove noise by filter  131 . The amplified signal is rectified by a rectifier  132 , is converted by an A/D converter  133  and then is integrated by integrator  134  to result in an integrated signal from which respiratory information can be ascertained. The signal output of the integrator  134  is then coupled to the processor  105  and provides a digital signal corresponding to the integrated waveform to the processor  105 . The signal output of the integrator  134  is also coupled to a peak detector  135  that determines when the inspiration period of a respiratory cycle has ended and an expiration cycle has begun. The signal output of the integrator  134  is further coupled to a plurality of comparators  136 ,  137 ,  138 ,  139 . The first comparator  136  determines when respiration (EMG signal or phrenic nerve signal) has been detected based on when an integrated signal waveform amplitude has been detected that is greater than a percentage value of the peak of an intrinsic respiratory cycle or another predetermined amount (comp 1), for example between 1-25% of the intrinsic signal. In this example, the comparator is set at a value that is 10% of the waveform of an intrinsic respiratory cycle. The second comparator  137  determines a value of the waveform amplitude (comp 2) when an integrated signal waveform amplitude has been detected that is at a predetermined percentage value of the peak of an intrinsic respiratory cycle or another predetermined amount, for example between 75%-100% of the intrinsic signal. In this example, the comparator is set at a value that is 90% of the waveform of an intrinsic respiratory cycle. From this value and the comp 1 value, the slope of the inspiration period (between 10% and 90% in this example) may be determined. This slope may provide valuable diagnostic information as it shows how quickly a patient inhales. After (or when) the peak detector detects the end of an inhalation period and the beginning of an exhalation period, the third comparator  138  determines an upper value for the waveform amplitude during active exhalation period, for example between 100% and 75% of the peak value detected by the peak detector  135 . Then a lower value (comp 4) of the waveform during the exhalation period is determined by the fourth comparator  139 , which compares the measured amplitude to a predetermined value, e.g. a percentage value of the peak amplitude. In this example the value is selected to be 10% of the peak value. In one embodiment this value is selected to roughly coincide with the end of a fast exhalation period. From comp 3 and comp 4 values, the slope of the exhalation period (between 10% and 90% in this example) may be determined. This slope may provide valuable diagnostic information as it shows how quickly a patient exhales. Similar processing techniques may be used with input from movement sensors  25 ,  26 .  
         [0080]      FIG. 3B  illustrates two sequential integrated waveforms of exemplary integrated signals corresponding to two serial respiratory cycles. The waveform  170  has a baseline  170   b , inspiration cycle  171 , a measured inspiration cycle  172 , a point of 10% of peak inspiration  173  (comp 1), a point of 90% of peak of inspiration  174  (comp 2), a peak  175  where inspiration ends and exhalation begins, and exhalation cycle  176  a fast exhalation portion  177  of the exhalation cycle  176 , a 90% of peak exhalation point  178  (comp 3), a 10% of peak exhalation point  179  (comp 4), an actual respiratory cycle  180  and a measured respiratory cycle  181 . The second waveform  182  is similarly shaped. The 10% inspiration  183  of the second waveform  182  marks the end of the measured respiratory cycle  181 , while the 10% point  173  of the waveform  170  marks the beginning of the measured respiratory cycle  181 .  
         [0081]     The system may adjust the pace, pulse, frequency and amplitude to induce slow and elongated inspiration period; and fast and short inspiration period. The system may match the intrinsic sleep or awake time tidal volume by adjusting the output energy while sensing the EMG or nerve amplitude. This may be done gradually by frequently sensing and incrementally adjusting. The system may deliver elongated inspiration period while shortening the expiration period to control and manipulate the SaO 2  and PCO 2  levels in the blood to overcome and treat apnea. The system may deliver time and amplitude modulation output for control of inspiration and exhalation periods. To increase the inspiration period, the system may deliver fewer bursts at lower amplitudes and higher frequencies. To create a fast, short inspiration cycle, the system may deliver more of bursts at higher amplitudes. The system may deliver sequential low energy pacing output either from one or multiple electrodes to control and manage the pulmonary stretch receptor threshold levels to avoid or prevent the collapse of the upper airways.  FIGS. 5A-5B  illustrate a variety of exemplary stimulation bursts and resulting effective EMG/flow/tidal volume that may be used to control the various phases of the respiratory cycle including, e.g., slope of inspiration, fast exhalation, tidal volume, peak value, and rate of respiration. Other mechanisms for controlling PCO 2  or SaO 2  are described in U.S. Application entitled: “System and Method For Diaphragm Stimulation” filed on even date herewith and incorporated herein by reference.  
         [0082]     Referring to  FIGS. 5A-5B , a first intrinsic EMG waveform  550  is illustrated in  FIG. 5A . A subsequent EMG waveform  551  ( FIG. 6A ) in response to a burst of pulses  561  ( FIG. 6B ) of symmetric amplitude, frequency and pulse width. A subsequent waveform  552  is illustrated ( FIG. 5A ) in response to burst of pulses  562  ( FIG. 5B ). The resulting waveform  552  ( FIG. 5A ) has a flatter inspiration slope and expiration slope and relatively lower peak amplitude. This particular effect may be desirable to control breathing and create a slower more gradual inspiration. The burst  562  ( FIG. 5B ) comprises a series of pulses increasing in amplitude and of a higher frequency that burst  561  (greater number of pulses). The subsequent EMG waveform  553  ( FIG. 5A ) has fewer pulses (3) and higher amplitude pulses. The effect of this burst  563  is to increase inspiration rate. The subsequent EMG waveform  554  ( FIG. 5A ) has a relatively slow inspiration cycle as a result of a burst  564  ( FIG. 5B ) with both increasing amplitudes and longer pulse widths (and greater pulse duration). These are a few examples of a multitude of possible variations of burst pulses that can be modified to control the inspiration, expiration, tidal volume (area under waveform curve) and other parameters of the respiratory cycle by modifying frequency, amplitude, pulse width of the pulses within the burst and the duration of the burst to get a desired effect. These bursts can be modified and programmed into a stimulator and may vary from patient to patient.  
         [0083]     In  FIG. 4 a  circuit for an external device  140  is illustrated. The external device  140  comprises a processor  145  for controlling the operations of the external device. The processor  145  and other electrical components of the external device  140  are coordinated by an internal clock  150  and a power source  151 . The processor  145  is coupled to a telemetry circuit  146  that includes a telemetry coil  147 , a receiver circuit  148  for receiving and processing a telemetry signal that is converted to a digital signal and communicated to the processor  145 , and a transmitter circuit  149  for processing and delivering a signal from the processor  145  to the telemetry coil  146 . The telemetry coil  147  is an RF coil or alternatively may be a magnetic coil depending on what type of coil the telemetry coil  107  of the implanted control unit  100  is. The telemetry circuit  146  is configured to transmit signals to the implanted control unit  100  containing, e.g., programming or other instructions or information, programmed stimulation rates and pulse widths, electrode configurations, and other device performance details. The telemetry circuit  146  is also configured to receive telemetry signals from the control unit  100  that may contain, e.g., sensed and/or accumulated data such as sensed EMG activity, sensed nerve activity, sensed responses to stimulation, sensed position information, sensed movement information, sensed heart rate, blood pressure, blood velocity, ECG, blood gas concentration or saturation information. Other information such as frequency and time of breathing disorders, number of disorder events detected in a time interval or during a sleep cycle, parameter relating to pulmonary edema such as frequency of hyperventilation including time, patient position, and other precursor information. This information may be stored in RAM event memory  158  or may be uploaded and through an external port  153  to a computer, or processor, either directly or through a phone line or other communication device that may be coupled to the processor  145  through the external port  153 . The external device  140  also includes ROM memory  157  for storing and providing operating instructions to the external device  140  and processor  145 . The external device also includes RAM event memory  158  for storing uploaded event information such as sensed information and data from the control unit, and RAM program memory  159  for system operations and future upgrades. The external device also includes a buffer  154  coupled to or that can be coupled through a port to a user-operated device  155  such as a keypad input or other operation devices. Such user operation may include patient input or interaction as well as health care provider input or interaction Finally, the external device  140  includes a display device  156  (or a port where such device can be connected), e.g., for display visual, audible or tactile information, alarms or pages.  
         [0084]     The external device  140  may take or operate in, one of several forms, e.g. for patient use, compliance or monitoring; and for health care provider use, monitoring, diagnostic or treatment modification purposes. The information may be downloaded and analyzed by a patient home unit device such as a wearable unit like a pager, wristwatch or palm sized computer. It may also alert the patient when the health care provider should be contacted, for example if there is malfunctioning of the device or worsening of the patient&#39;s condition.  
         [0085]     The device is used to provide information to the clinicians through various communications mechanisms.  
         [0086]      FIGS. 6A-6C  and  7  illustrate exemplary precursors to breathing disorders.  
         [0087]      FIG. 6A  illustrates exemplary blood oxygen saturation levels at times  0 - n  through  300 - n  where n is a time equal to the time lag between a drop in SaO2 levels and a corresponding onset of Cheyne-Stokes hyperventilation as illustrated in  FIG. 6B . As SaO2 decreases, the Cheyne stokes respiration begins and grows in amplitude and frequency. It is believed that respiration response lags the changes in SaO2. Thus, a drop in SaO2 level may be sensed, e.g., with an oximeter, as a precursor to the onset of Cheyne-Stokes respiration.  
         [0088]     Similarly, as illustrated in  FIG. 6C , as Cheyne-Stokes hyperventilation proceeds, the PCO 2  levels rise. It is believed that at time  120 - m , the PCO 2  changes just before it is perceived in the medulla at which time it is believed that the Cheyne Stokes hyperventilation phase ends at time t 1  ( FIG. 6B ), where m is the time lag between the increase in PCO2 and the onset of apnea. Thus an increase in PCO2 may be sensed, as a precursor to the onset of apnea, e.g., with a PCO2 sensor placed adjacent an airway.  
         [0089]      FIG. 7  is a schematic of what is known as a Cheyne-Stokes breathing pattern. From time t 0  to t 1  a characteristic hyperventilation pattern precedes a period of apnea from time t 1  to t 2 . After a period of time (t 1  to t 2 ), the hyperventilation pattern resumes from time t 2  to t 3 , and again, a period of apnea begins. This pattern may repeat itself a number of times. The Cheyne-Stokes characteristic hyperventilation pattern is one where the amplitude and frequency of breaths increases and then decreases. From t 0  to t 1  and from t 2  to t 3 , this pattern is illustrated and forms an envelope  200 . The patterns of breathing from t 0  to t 1  and from t 2  to t 3 , are precursors to episodes of apnea (e.g., t 1  to t 2 ).  
         [0090]     The Cheyne-Stokes pattern illustrated in  FIG. 7  may be sensed using the signal processor and waveform analysis described with respect to  FIGS. 3A-3B . The analysis may also be done in a number of ways using a variety of other signal processing techniques. For example, the envelope or a portion of the envelope may be detected and compared to a characteristic envelope. If the envelope correlates to a sufficient degree to a characteristic envelope as programmed into the processor, then a Cheyne-Stokes pattern is identified. Such signal comparison and correlation techniques as are known to one of skill in the art may be used to sense and determine when a Cheyne-Stokes hyperventilation pattern is most probably present.  
         [0091]     According to one embodiment of the invention, a series of inspiration waveforms are analyzed as described with reference to  FIGS. 3A-3B  to determine if a breathing pattern is a precursor to a breathing disorder, in this particular example, to identify if Cheyne-Stokes hyperventilation as a precursor to apnea is occurring.  
         [0092]     The pattern of the amplitude changes may be used to verify a Cheyne-Stokes respiration pattern. Additionally or alternatively, frequency changes may be used to verify a Cheyne-Stokes respiration pattern.  
         [0093]     The peak value  175  of the inspiration cycle indicates the depth of the breath. The measured peak value is stored for a plurality of cycles. The trend of the peak value may be calculated by a processor. If the trend is increasing then begins decreasing, a Cheyne-Stokes like pattern may be identified.  
         [0094]     The calculated slope of the inspiration cycle, the slope of the exhalation cycle, the measured respiratory cycle, and/or the measured exhalation period correlate to the frequency of breathing. A plurality of one or more of these parameters may be stored for a plurality of cycles. If the frequency and/or amplitude of breathing increases and decreases according to a preset range of values, a Cheyne-Stokes pattern may be identified.  
         [0095]     The controller  100  detects a precursor event sensed by electrodes on assemblies  21 ,  22 . Similarly, the controller  100  detects a precursor event to Cheyne-Stokes sensed by SaO 2  or PCO 2  sensors (sensor  29 ). The controller responds to the detection according to a program in RAM  120 .  
         [0096]     In one variation, the response is to stimulate the diaphragm to capture or control the breathing rate by stimulating the diaphragm. The stimulation may be initiated during the sensed precursor. For example, the stimulation may be initiated during the Cheyne-Stokes hyperventilation portion. Thus the Cheyne-Stokes hyperventilation breathing is arrested, a specific breathing pattern in induced, and apnea is prevented. Alternatively, the diaphragm stimulator may be initiated at the end of Cheyne-Stokes at the onset of apnea to control breathing. The stimulation may also be initiated at another time prior to the expected onset of the breathing disorder.  
         [0097]      FIG. 8  illustrates an example of a sensing of Cheyne-Stokes hyperventilation as a precursor to apnea and treatment to prevent apnea by stimulating breathing. At time ta 0 , diaphragm breathing is observed at a baseline normal level. At time ta 1  Cheyne-Stokes respiration is initiated. At time ta 2  the Cheyne-Stokes respiration has reached a peak value that is at least as high as threshold amplitude A 1 . The threshold amplitude A 1  is the amplitude threshold at or above which an episode of apnea will very likely occur. This threshold amplitude A 1  may be set at an absolute value or at a percentage of the baseline value. The value may be determined on a patient by patient basis after observing one or more Cheyne-Stokes respirations with and/or without subsequent apneas. At time ta 3 , the end portion of the Cheyne-Stokes respiration is sensed, for example when the peak value for the respiration is at or below threshold amplitude A 1 . The end portion of Cheyne-Stokes may be determined, for example, by sensing a drop in amplitude to the threshold amplitude A 1 , by sensing a drop in frequency, by identifying a point on the respiration envelope using previous recorded Cheyne-Stokes patterns or using a model, or by sensing a drop in PCO 2  just prior to the onset of apnea. At time ta 3 , the stimulator according to the invention stimulates to control the diaphragm and breathing until time ta 4  when the resumption of normal breathing is confirmed.  
         [0098]      FIG. 9  illustrates an example of treatment of Cheyne-Stokes hyperventilation by stimulating breathing shortly before, during or after the onset of Cheyne-Stokes hyperventilation. At time tb 0 , diaphragm breathing is observed at a baseline normal level. At time tb 1  just before the onset of Cheyne-Stokes hyperventilation, the SaO 2  levels may have been sensed as falling indicating Cheyne-Stokes respiration will be initiated. Stimulation may occur at this time in response to sensing the drop in SaO2 as a precursor to Cheyne-Stokes. If not stimulated prior to such time, then at time tb 2  Cheyne Stokes hyperventilation begins. At time tb 3  Cheynes-Stokes respiration has been sensed, for example by detecting an increase in amplitude and or frequency or respiration to a preset threshold A 3 , by identifying a point on the respiration envelope using previous recorded Cheyne-Stokes patterns or using a model. At time tb 3 , the stimulator according to the invention stimulates to control the diaphragm and breathing until time tb 4  when the resumption of normal breathing is confirmed.  
         [0099]      FIG. 10A  or  10 B are examples of periodic breathing patterns that may precede Cheyne-Stokes and/or apnea events. The pattern may be an EMG signal that has been processed. This periodic breathing may occur, for example, during periods of wakefulness and/or during the day prior to an evening where there is a likelihood of Cheyne-Stokes and/or apnea. Or, this breathing pattern may occur just prior to a Cheyne-Stokes and/or apnea event or events. One or more precursor events such as the periodic breathing over a period of time, is sensed and stored in RAM  119 , the processor determines a likelihood of a breathing disorder occurring according to a program stored in RAM  120 . The RAM program may do one of a number of things. The sensitivity or detection threshold for detecting a breathing disorder, may be increased, for example by lowering a threshold. Also after determining periodic breathing, the system may be armed to look for a particular pattern such as the initiation of Cheyne-Stokes hyperventilation ( FIG. 9 ) or the slowing of the Cheyne-Stokes hyperventilation ( FIG. 8 ). Alternatively, the RAM program may automatically turn on breathing control (for stimulation continuously or at intervals) for a given period of time and/or at a particular time of day, e.g. when sleep is occurring.  
         [0100]      FIG. 11  illustrates an example of a sensing of Cheyne-Stokes hyperventilation as a precursor to apnea and treatment of apnea by stimulating breathing. At time tc 0 , diaphragm breathing is observed at a baseline normal level. At time tc 1  Cheyne-Stokes respiration is initiated. At time tc 2 , the end of the Cheyne-Stokes respiration is sensed, for example: by sensing a drop in amplitude and or frequency to a preset threshold; by identifying a point on the respiration envelope using previous recorded Cheyne-Stokes patterns or using a model; or by sensing the end of Cheyne-Stokes hyperventilation. At time tc 2 , the stimulator according to the invention stimulates to control the diaphragm and breathing until time tc 3  when the resumption of normal breathing is confirmed.  
         [0101]      FIG. 12  illustrates the operation of a precursor sensor and breathing treatment device according to one variation. The diaphragm EMG is sensed during the day  400 . Characteristic precursor breathing is observed  401 , such as, for example, the periodic breathing illustrated in  FIG. 10 . The system is armed  402  and set to control breathing during the nighttime. Breathing is controlled at nighttime  403 , for example, by continuously or intermittently stimulating breathing to elicit a desired breathing morphology. Night time may be identified by detecting when sleeping is occurring or by a real time clock.  
         [0102]      FIG. 13  illustrates the operation of another variation of a precursor sensor and breathing treatment device. A pre-disorder EMG is sensed and stored  500 , e.g. in RAM  120 . A breathing disorder is detected  501 , e.g. Cheyne-Stokes respiration or apnea. The pre-disorder EMG is flagged and saved  502 . The steps  500 - 502  may be repeated a number of times, for example a plurality of nighttimes in sequence or until a breathing disorder has been detected at a plurality of times, e.g. different nighttimes. A model of the pre-disorder EMG is then created  503 , for example, using statistical or probabilistic modeling. Probabilistic sensing is set using the model  504  to sense a subsequent characteristic precursor pre-disorder EMG. The EMG is then monitored  505 . A pre-disorder characteristic precursor EMG is sensed  506 . The stimulator then controls breathing to prevent the disorder  507 .  
         [0103]     Stimulation of breathing may be set to control blood gases and thereby treat breathing disorders. The PCO 2  may be controlled by controlling the minute ventilation (Minute ventilation is the product of respiratory rate and tidal volume). For example, PCO 2  is increased if minute ventilation is decreased.  
         [0104]     Safety mechanisms may be incorporated into any stimulation device in accordance with the invention. The safety feature disables the device under certain conditions. Such safety features may include a patient or provider operated switch, e.g. a magnetic switch. In addition a safety mechanism may be included that determines when patient intervention is being provided. For example, the device will turn off if there is diaphragm movement sensed without an EMG as the case would be where a ventilator is being used.  
         [0105]     While the invention has been described with reference to particular embodiments, it will be understood to one skilled in the art that variations and modifications may be made in form and detail without departing from the spirit and scope of the invention.