Patent Publication Number: US-6671529-B2

Title: System and method for closed loop controlled inspired oxygen concentration

Description:
CROSS REFERENCE TO RELATED APPLICATIONS 
     This application is a division application of U.S. patent application Ser. No. 09/735,319 filed Dec. 12, 2000 now U.S. Pat. No. 6,512,938. 
    
    
     STATEMENT RE: FEDERALLY SPONSORED RESEARCH/DEVELOPMENT 
     (Not Applicable) 
     BACKGROUND OF THE INVENTION 
     The present invention relates generally to oxygen delivery systems and more particularly to a closed loop system and method for automatically delivering fractionally inspired oxygen (FiO 2 ). 
     Very low birth weight infants often present with episodes of hypoxemia. These episodes are detected by arterial oxygen saturation monitoring by pulse oximetry (SpO 2 ) and are usually assisted with a transient increase in the fraction of inspired oxygen (FiO 2 ). 
     Given the rapid onset and frequency at which most of these episodes of hypoxemia occur, maintaining SpO 2  within a normal range by manual FiO 2  adjustment during each episode is a difficult and time-consuming task. Nurses and respiratory therapists respond to high/low SpO 2  alarms. Under routine clinical conditions, the response time is variable and the FiO 2  adjustment is not well defined. This exposes the infants to periods of hypoxemia and hyperoxemia which may increase the risk of neonatal chronic lung disease and retinopathy of prematurity. 
     Thus, a need exists for a system that can automatically adjust FiO 2 . Prior art systems exist which automatically adjusts FiO 2 . Such systems have had positive results. However, existing systems fail to respond to rapid SpO 2  changes and require manual intervention. Thus, a need exists for an automated system for adjusting FiO 2  which will respond to rapid SpO 2  changes. The system should not require manual intervention, but should allow for manual intervention, if desired. The system should also allow for gradually weaning the FiO 2  as soon as an episode begins to resolve. 
     BRIEF SUMMARY OF THE INVENTION 
     In accordance with the present invention, a system is provided for delivering fractionally inspired oxygen (FiO 2 ) to a patient. The system includes a device, such as a pulse oximeter, for obtaining an arterial hemoglobin oxygen saturation signal (SpO 2 ). An algorithm uses the SpO 3  to determine the appropriate FiO 2  to deliver to the patient. The algorithm adjusts the FiO 2  level of an air-oxygen mixer of an oxygen delivery device, such as a mechanical ventilator. 
     In accordance with other aspects of the invention, SpO 2  levels, including a target (normoxemia) range, are defined. SpO 2  values above the normoxemia range are considered to be hyperoxemic and values below the normoxemia range are considered to be hypoxemic. 
     In accordance with further aspects of the invention, a determination is made as to whether the SpO 2  signal is a valid signal. If the SpO 2  signal is not a valid signal, the FiO 2  to be delivered to the patient is determined based on a backup value. If the SpO 2  signal is a valid signal and closed loop mode is not enabled, the FiO 2  to be delivered to the patient is determined based on a backup value. If the signal is valid and closed loop mode is enabled, the FiO 2  to be delivered to the patient is determined based on the current SpO 2  and the trend. The trend is determined by calculating a slope using previous SpO 2  values. The determined FiO 2  is then delivered to the patient, for example, using a ventilator or an air-oxygen gas mixer. 
     In accordance with still further aspects of the invention, a user interface is provided. The user interface displays status information. The user interface also displays alerts. The user interface can also be used to view and modify user settings/parameters. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     These, as well as other features of the present invention, will become more apparent upon reference to the drawings wherein: 
     FIG. 1 is a block diagram of a prior art system for manually adjusting the fraction of inspired oxygen (FiO 2 ); 
     FIG. 2 is a block diagram of a system for automatically adjusting FiO 2  in accordance with the present invention; 
     FIG. 3 is a flow diagram illustrating exemplary logic for automatically adjusting FiO 2  in accordance with the present invention; 
     FIG. 4 is a table of exemplary variables and defaults values used in the present invention; 
     FIG. 5 is a table of exemplary user settings and default values used in the present invention; 
     FIG. 6 is flow diagram illustrating exemplary logic for performing a control cycle as shown in FIG. 3; 
     FIG. 7 is a flow diagram illustrating exemplary logic for performing backup processing when a valid SpO 2  signal is not received as shown in FIG. 6; 
     FIGS. 8-20 are a flow diagram illustrating exemplary logic for processing a valid SpO 2  signal as shown in FIG. 6; and 
     FIG. 21 is an exemplary graphical user interface illustrating SpO 2  and FiO 2  values over a specified period of time. 
    
    
     DETAILED DESCRIPTION OF THE INVENTION 
     Traditionally, as shown in FIG. 1, a device, such as a pulse oximeter  50 , is used to determine arterial hemoglobin oxygen saturation of a patient  60 . A nurse  70  monitors the pulse oximeter  50 . The nurse  70  adjusts the fractionally inspired oxygen (FiO 2 ) delivered to the patient  60  using a mechanical ventilator or air-oxygen mixer  80 . Typically, ventilator device  80  mixes pure oxygen with air to give the patient a mixture of air having a percentage of oxygen. For example, a ventilator  80  may deliver a 90% oxygen/10% air mixture to the patient  60 . The exact mixture of air required varies among patients and can vary for a given patient over a period of time. When a patient receives too much oxygen, a condition known as hyperoxemia occurs and if a patient does not receive enough oxygen, a condition known as hypoxemia occurs. “Normoxemia” occurs if the proper amount of oxygen is delivered (i.e., neither hyperoxemia nor hypoxemia occurs). A traditional system, such as the one shown in FIG. 1, is an “open system” because it requires human intervention (e.g., by a nurse  70 ). 
     As shown in FIG. 2, the present invention is a “closed system” which uses an algorithm  90  (described in detail below) to deliver FiO 2  in response to receiving an arterial hemoglobin oxygen saturation signal (SpO 2 ). In exemplary embodiments of the invention, the algorithm acquires information on arterial oxygen-hemoglobin oxygen saturation (SpO 2 ) measured by a pulse oximeter  50  and uses this measurement as input to determine the adjustment required, if any, to the fractionally inspired oxygen concentration (FiO 2 ) delivered to a patient on a continuous basis via a ventilator  80 . It will be appreciated that the algorithm described herein can be applied to various modes of oxygen delivery, for example, mechanical ventilators, oxy-hood, nasal cannulas, and/or Continuous Positive Airway Pressure (CPAP) systems or incubators. The delay between the new FiO 2  setting and the actual oxygen concentration change is important. In most oxygen delivery modes the delay is relatively short (e.g., less than 15 seconds). However, there are significantly longer delays in large hoods or incubators. The closed-loop control system of the present invention is capable of changing the inspired gas concentration fast enough to follow rapid and frequent hypoxemic episodes. In exemplary embodiments of the present invention, SpO 2  is read from the analog output of a pulse oximeter. However, alternative embodiments allow for reading from other outputs, e.g., from any serial output. 
     Even though the invention does not require human intervention, manual adjustments and overrides can be performed. The system described herein is ideally suited for patients who are very low birth weight infants. However, it will be appreciated that the present invention is not so limited. The invention can be used for patients of all ages. 
     The present invention includes an algorithm  90  that continuously acquires the patient&#39;s SpO 2  information and adjusts the FiO 2  delivered to the patient (e.g., via a mechanical ventilator  80 ) to maintain SpO 2  within a specific range set by a user (e.g., a nurse). In exemplary embodiments, the algorithm  90  calculates and adjusts the FiO 2  once per second on a “closed loop” basis using a direct electronic interface between the algorithm  90  and the ventilator&#39;s air-oxygen blender control. 
     The algorithm  90  defines SpO 2  ranges based on a user-defined target range of normoxemia. Hyperoxemia is assumed to occur when SpO 2  exceeds the normoxemia target range and hypoxemia is assumed to occur when SpO 2  falls below the normoxemia target range. The differential control feedback functions are used to deal with the patient variability changes in FiO 2  which in combination with the algorithm&#39;s rules modulate the magnitude and timing of FiO 2  adjustments during periods of normoxemia or during a hypoxemic or hyperoxemic episode. The factors used to determine the adjustments are the current SpO 2  level, direction and rate of SpO 2  change, degree and duration of the hypoxemic or hyperoxemic episode, current FiO 2  setting, and the individual patient&#39;s basal FiO 2  requirement during normoxemia. 
     FiO 2  adjustments during hyperoxemia and normoxemia are of smaller magnitude and slower pace than those occurring during hypoxemia. However, the rules and control functions in the algorithm are designed to enable the algorithm to modify its responses to changing conditions, from slow and subtle SpO 2  changes during periods of stability to rapidly falling SpO 2  during an acute period of hypoxemia. 
     The algorithm  90  also has a backup function in the event that there is missing SpO 2  information. The backup function locks the FiO 2  after a short wait period at a back-up level preset by the user or at the current FiO 2  level, whichever is higher until SpO 2  information is available again. 
     In addition to the standard pulse oximeter alarms, the algorithm alerts the user when an episode of hyperoxemia or hypoxemia occurs, when it lasts for more than a specified period of time (e.g., two minutes) in spite of FiO 2  adjustments, and when the adjustments set the FiO 2  at certain levels for example, a low level of 0.21 (room air) and a high level of 1.0 (pure oxygen). The user is also alerted when SpO 2  signal is lost. These alerts are intended to notify the user (e.g., nurse) to verify proper function of the SpO 2  measurement, FiO 2  delivery and communication links. 
     FIG. 3 is a flow diagram illustrating exemplary logic performed by algorithm  90 . The algorithm classifies SpO 2  according to ranges set by the user. The user sets a target range for normoxemia (e.g., an exemplary default range is 88%-96%). An SpO 2  above the range for normoxemia (e.g., greater than 96%) is considered hyperoxemic. An SpO 2  below the range for normoxemia (e.g., less than 88%) is considered hypoxemic. Because of its importance, hypoxemia is further subdivided. In exemplary embodiments, hypoxemia is further subdivided into the following ranges: less than 75%; 75-85%; and 85% to the low limit of the target range, (for example, using the exemplary default range, 85%-88%). FiO 2  is adjusted based on the current SpO 2 , the SpO 2  trend and the time that SpO 2  has been within the range, as well as basal and current FiO 2  settings. 
     The logic of FIG. 3 moves from a start block to block  100  where system defaults are set. Various system defaults or parameters, such as those shown in the table of FIG. 4 are preset. The parameters (variables) in Table 4 are described in further detail later. These variables can be modified by the application and/or by the user. 
     After system defaults are set, the logic of FIG. 3 moves to block  102  where a user interface is displayed. An exemplary user interface is illustrated in FIG.  21  and described later. 
     The logic of FIG. 3 then moves to block  104  where user settings are read. User settings, such as those shown in FIG. 5, should be set prior to commencement of the closed loop execution (i.e., prior to entering the control cycle). Preferably, the settings can also be set or modified during execution of the algorithm. Preferably, a suitable user interface (such as the one shown in FIG. 21) is provided to allow the user to set/modify these values. Although the user can set/modify these values, preferably system defaults (such as those shown in FIG. 5) are provided. 
     In exemplary embodiments of the invention SpO 2  Target Range High Limit and SpO 2  Target Range Low Limit define the patient&#39;s desired target range. In the exemplary embodiment shown in FIG. 5, SpO 2  Target Range Low Limit must be in the range between 85%-94% and has a default value of 88% and SpO 2  Target Range High Limit must be in the range between 94%-100% and has a default value of 96%. Thus, the default target range is 88%-96%. 
     FiO 2  Base is the patient&#39;s basal oxygen requirement to maintain normal SpO 2 . FiO 2  Base can be kept fixed at the user setting or automatically adjusted by the algorithm to changes in the basal oxygen needs. FiO 2  Base is also the initial level for FiO 2  Set when closed loop is switched ON. The default setting for FiO 2  Base can alternatively be obtained from the user setting during manual (normal) mode used before closed loop is ON. In the exemplary embodiment shown in FIG. 5, FiO 2  Base must be in the range between 21%-60% and has a default value of 30%. 
     FiO 2  Backup is the default value for FiO 2  Set when the system is started, when SpO 2  Signal is OUT or when closed-loop switch is OFF. FiO 2  Backup should not be lower than the basal (FiO 2  Base). In the exemplary embodiment shown in FIG. 5, FiO 2  Backup must be in the range between 21%-100% and has a default value of 40%. 
     FiO 2  Min is the minimum level at which FiO 2  Set, FiO 2  Base and FiO 2  Backup can be set. In the exemplary embodiment shown in FIG. 5, FiO 2  Min has a default value of 21% (room air). 
     FiO 2  Max (not shown in FIG. 5) is a default parameter. For example, FiO 2  Max is initially set at a default of 100% (pure oxygen), but can be user selectable. 
     After the user settings are read, the logic of FIG. 3 proceeds to block  106  where a control cycle is performed as shown in FIG.  6  and described in detail next. The control cycle is initiated when the user switches closed-loop to ON. If closed-loop is set to OFF, the control cycle loop continues, but FiO 2  Set is returned to the FiO 2  Backup level. FiO 2  Set is the actual parameter set at the air-oxygen mixer. 
     FIG. 6 is a flow diagram illustrating exemplary logic for performing a control cycle in accordance with the present invention. The logic moves from a start block to block  200  where SpO 2  (e.g., SpO 2  output signal from pulse oximeter  50 ) is read. The SpO 2  that is read is stored as SpO 2  Read. Next, the logic moves to decision block  202  where a test is made to determine if SpO 2  Read is within the acceptable SpO 2  range. For example, as shown in FIG. 4, in exemplary embodiments, the default range is between 20 and 100%. If SpO 2  Read is not within the acceptable range (no in decision block  202 ), the logic moves to block  204  where SpO 2  signal OUT processing is performed as shown in FIG.  7  and described below. Most oximeters provide a 0% reading when signal is OUT when communication between the oximeter and algorithm is by means of the analog output of the pulse oximeter. Alternatively, if serial communication exists between the oximeter and the algorithm, SpO 2  information can be monitored by proper communication handshake. If SpO 2  is within the SpO 2  OK range (yes in decision block  202 ), the logic moves to block  206  where SpO 2  Signal OK processing is performed as shown in detail in FIG.  8  and described later. After SpO 2  signal OUT processing has been performed (block  204 ) or SpO 2  OK processing has been performed (block  206 ), the logic moves to block  208  to monitor whether user settings have been changed. Preferably, the user can change various settings at any time. If user settings have been changed, variables are updated accordingly. The logic then returns to block  200  where SpO 2  is read and processed again. In exemplary embodiments, SpO 2  is read and processed (e.g., FiO 2  adjusted accordingly) every second. Thus, the SpO 2  is continuously monitored every second until the system is shut off. 
     FIG. 7 illustrates exemplary logic for performing SpO 2  Signal OUT (e.g., backup mode) processing in accordance with the present invention. In backup mode processing, FiO 2  Set (i.e., the actual parameter set at the air-oxygen mixer) is locked at the FiO 2  Backup level, at the FiO 2  Base level or at the current level (whichever is higher) until feedback information is available again. 
     The logic of FIG. 7 moves from a start block to block  220  where the user is alerted and the cause is checked. There are various reason why a pulse oximeter may fail to provide information, for example, poor signal quality during motion or low perfusion (or both), a loose probe or a probe no longer in place, or a break on the communication link between the oximeter and the algorithm  90 . Next, the logic moves to block  222  where SpO 2  Out Counter is incremented. SpO 2  Out Counter is used to confirm that signal loss is not related to some type of temporary variability or error. Only after a minimum interval has passed is SpO 2  Signal OK Counter reset. This allows activities to resume normally if there was a short drop-out period. Next, the logic moves to decision block  224  where a test is made to determine if SpO 2  Out Counter is equal to SpO 2  Time to Zero Counters. If so, the logic moves to block  226  where SpO 2  OK Counter is set to zero. For example, in the exemplary embodiment shown in FIG. 4, the default value is ten seconds. Thus, if SpO 2  Out Counter is equal to ten, SpO 2  OK Counter will be reset to zero. The illustrated embodiment assumes that SpO 2  is read and processed once a second. However, it will be appreciated that the algorithm can be modified to accommodate reading and processing SpO 2  values at a different interval. 
     Next, the logic moves to decision block  228  where a test is made to determine if SpO 2  Out Counter has been set for the last five seconds (e.g., SpO 2  Out Counter is greater than or equal to five). While the logic illustrated is based on a lost SpO 2  signal for five consecutive seconds, it will be appreciated that other time periods can be used. Preferably, the default value can be modified by the user. A short wait will provide early additional oxygen if hypoxemia is accompanied by motion of the extremities (which is often observed), whereas a longer wait will generally apply to cases where hypoxemia is not frequent and signal loss is not accompanied by hypoxemia. If SpO 2  has not been set for the specified period of time (e.g., five seconds), the logic of FIG. 7 ends. 
     If, however, SpO 2  has been lost (OUT) for the last five seconds or other specified period of time (yes in decision block  228 ), the logic moves to block  230  where FiO 2  Set Last Before Signal Lost is set to FiO 2  Set. When FiO 2  is set to the backup level, the algorithm stores the last FiO 2  value in memory. This FiO 2  Set Last Before Signal Lost value is used under some conditions to set FiO 2  as soon as SpO 2  is available again. Next, the logic moves to decision block  232  where a test is made to determine if FiO 2  Backup is greater than or equal to FiO 2  Base. If so, the logic moves to decision block  234  where a test is made to determine if FiO 2  Set is less than FiO 2  Backup. If so, the logic moves to block  236  where FiO 2  Set is set to FiO 2  Backup. The logic of FIG. 7 then ends and processing returns to FIG.  6 . 
     If FiO 2  Backup is less than FiO 2  Base (no in decision block  232 ), the logic moves to decision block  238  where a test is made to determine if FiO 2  Set is less than FiO 2  Base. If so, the logic moves to block  240  where FiO 2  Set is set to FiO 2  Base. If not, FiO 2  set does not get changed. The logic of FIG. 7 then ends and processing returns to FIG.  6 . 
     FIG. 8 illustrates exemplary logic for performing SpO 2  Signal OK processing in accordance with the present invention. The counters of time spent with SpO 2  within each range are updated continuously. These counters are used to classify and confirm the actual SpO 2  level (normoxemia, hyperoxemia or hypoxemia) and discriminate against short variability. Only after a minimum time has elapsed since SpO 2  has reached any specific range is it considered to be a new SpO 2  level. In the exemplary embodiment illustrated in FIG. 4, the default time period before being considered a new level defaults to three seconds (SpO 2  Time in High Norm Low Range Min). This short interval can be affected by short variability, therefore, other counters for previous SpO 2  ranges are reset only after a longer interval (SpO 2  Time to Zero Counters, which defaults to ten seconds in the exemplary embodiment shown in FIG. 4) has elapsed. In this way, SpO 2  Read is confirmed to be out of any specific range only after the longer time period (e.g., ten seconds) SpO 2  Read is confirmed to be in the new range after three seconds (or whatever value SpO 2  Time in High Norm Low Range Min is set to) but it is confirmed to be out of the previous range only after ten seconds (or whatever value Time to Zero Counters is set to). In this way, if SpO 2  Read returns shortly after to the previous range, all activities in that range will resume immediately. 
     The logic of FIG. 8 moves from a start block to block  250  where SpO 2  OK Counter is incremented. Next, the logic moves to decision block  252  where a test is made to determine if SpO 2  OK Counter is equal to SpO 2  Time to Zero Counters. If so, the logic moves to block  254  where SpO 2  Out Counter is set to zero. Next, appropriate timing processing is performed based on SpO 2  Read. If SpO 2  Read is in the target range for normoxemia, for example, 88%-96%, (yes in decision block  256 ), the logic moves to block  258  where normoxemia timing is performed as shown in detail in FIG.  9  and described next. 
     FIG. 9 illustrates exemplary logic for performing normoxemia timing in accordance with the present invention. As shown in FIG. 9, and described below, normoxemia is considered the new SpO 2  level only after a specified period of time (e.g., three seconds) has elapsed since SpO 2  entered the target range, however, counters for other SpO 2  ranges are reset only after a longer interval (e.g., ten seconds) has elapsed. The logic of FIG. 9 moves from a start block to block  300  where SpO 2  Normoxemia Counter is incremented. Next, the logic moves to decision block  302  where a test is made to determine if SpO 2  Normoxemia Counter is greater than or equal to SpO 2  Min Time in Range (SpO 2  Time in High Norm Low Range, e.g., three seconds). If so, the logic moves to decision block  304  where a test is made to determine if SpO 2  Normoxemia Counter is equal to SpO 2  Min Time in Range. If so, the logic moves to block  306  where SpO 2  Previous Level is set to SpO 2  Level. Regardless of the outcome of decision block  304 , the logic proceeds to block  308  where SpO 2  Level is set to Normoxemia. Regardless of the outcome of decision block  302 , the logic moves to decision block  310  where a test is made to determine if SpO 2  Normoxemia Counter is greater than SpO 2  Time to Zero Counters. If so, the logic moves to block  312  where counters (SpO 2  Hyperoxemia Counter, SpO 2  Hypoxemia Counter, SpO 2  Hypoxemia 85-Low Limit Counter, SpO 2  Hypoxemia 75-85 Counter and SpO 2  Hypoxemia less than 75 Counter) are set to zero. The logic of FIG. 9 then ends and processing returns to FIG.  8 . 
     Returning to FIG. 8, if SpO 2  Read is greater than the target range (yes in decision block  260 ), the logic moves to block  262  where hyperoxemia timing is performed as shown in detail in FIG.  10  and described next. 
     FIG. 10 illustrates exemplary logic for performing hyperoxemia timing in accordance with the present invention. As shown in FIG.  10  and described below, hyperoxemia is considered the new SpO 2  level only after a specified period of time (e.g., three seconds) has elapsed since SpO 2  entered the hyperoxemia range, however, counters for other SpO 2  ranges are reset only after a longer interval (e.g., ten seconds) has elapsed. The logic of FIG. 10 moves from a start block to block  320  where SpO 2  Hyperoxemia Counter is incremented. Next, the logic moves to decision block  322  where a test is made to determine if SpO 2  Hyperoxemia Counter is greater than or equal to SpO 2  Min Time in Range. If so, the logic moves to decision block  324  where a test is made to determine if SpO 2  Hyperoxemia Counter is equal to the SpO 2  Min Time in Range. If so, the logic moves to block  326  where SpO 2  Previous Level is set to SpO 2  Level. Regardless of the outcome of decision block  324 , the logic proceeds to block  328  where SpO 2  Level is set to Hyperoxemia. Regardless of the outcome of decision block  322 , the logic moves to decision block  330  where a test is made to determine if SpO 2  Hyperoxemia Counter is greater than SpO 2  Time to Zero Counters. If so, the logic moves to block  332  where counters (SpO 2  Normoxemia Counter, SpO 2  Hypoxemia Counter, SpO 2  Hypoxemia 85-Low Limit Counter, SpO 2  Hypoxemia 75-85 Counter and SpO 2  Hypoxemia less than 75 Counter) are set to zero. The logic of FIG. 10 then ends and processing returns to FIG.  8 . 
     Returning to FIG. 8, if SpO 2  Read is less than the target range (yes in decision block  264 ), the logic moves to block  266  where hypoxemia timing is performed as shown in detail in FIG.  11  and described next. 
     FIG. 11 illustrates exemplary logic for performing hypoxemia timing in accordance with the present invention. As shown in FIG. 11, and described below, hypoxemia is considered the new SpO 2  level only after a specified period of time (e.g., three seconds) has elapsed since SpO 2  entered the hypoxemia range, however, counters for other SpO 2  ranges are reset only after a longer interval (e.g., ten seconds) has elapsed. The logic of FIG. 11 moves from a start block to block  340  where SpO 2  Hypoxemia Counter is incremented. Next, the logic moves to decision block  342  where a test is made to determine if SpO 2  Hypoxemia Counter is greater than or equal to SpO 2  Min Time in Range. If so, the logic moves to decision block  344  where a test is made to determine if SpO 2  Hypoxemia Counter is equal to SpO 2  Min Time in Range. If so, the logic moves to block  346  where SpO 2  Previous Level is set to SpO 2  Level. Regardless of the outcome of decision block  344 , the logic proceeds to block  348  where SpO 2  Level is set to Hypoxemia. Regardless of the outcome of decision block  342 , the logic of FIG. 11 proceeds to decision block  350  where a test is made to determine if SpO 2  Hypoxemia Counter is greater than SpO 2  Time to Zero Counters. If so, the logic moves to block  352  where counters (SpO 2  Normoxemia Counter and SpO 2  Hyperoxemia Counter) are set to zero. 
     As described above, hypoxemia is subdivided into ranges, for example, less than 75%, 75%-85% and 85% to the low limit for normoxemia. Hypoxemia counters for the various sub-ranges are set based on SpO 2  Read, as appropriate. If SpO 2  Read is between 85 and SpO 2  Target Range Low Limit, for example, using the exemplary default range, between 85%-88%, (yes in decision block  354 ), the logic moves to block  356  where SpO 2  Hypoxemia 85-Low Limit Counter is incremented. The logic then moves to decision block  358  where a test is made to determine if SpO 2  Hypoxemia 85-Low Limit Counter is greater than Time to Zero Counters. If so, the logic moves to block  360  where counters (SpO 2  Hypoxemia 75-85 Counter and SpO 2  Hypoxemia less than 75 Counter) are set to zero. If SpO 2  Read is between 75 and 85 (yes in decision block  362 ), the logic moves to block  364  where SpO 2  Hypoxemia 75-85 Counter is incremented. The logic then moves to decision block  366  where a test is made to determine if SpO 2  Hypoxemia 75-85 Counter is greater than SpO 2  Time to Zero Counters. If so, the logic moves to block  368  where counters (SpO 2  Hypoxemia 85-Low Limit Counter and SpO 2  Hypoxemia less than 75 Counter) are set to zero. If SpO 2  Read is less than 75 (yes in decision block  370 ), the logic moves to block  372  where SpO 2  Hypoxemia less than 75 Counter is incremented. The logic then proceeds to decision block  374  where a test is made to determine if SpO 2  Hypoxemia less than 75 Counter is greater than SpO 2  Time to Zero Counters. If so, the logic moves to block  376  where counters (SpO 2  Hypoxemia 85-Low Limit Counter and SpO 2  Hypoxemia 75-85 Counter) are set to zero. The logic of FIG. 11 then ends and processing returns to FIG.  8 . 
     Returning to FIG. 8, after appropriate timing processing has been performed (e.g., normoxemia timing in block  258 , hyperoxemia timing in block  262  or hypoxemia in block  266 ), the logic of FIG. 8 moves to block  268  where the SpO 2  slope calculation is performed as illustrated in detail in FIG.  12  and described next. 
     FIG. 12 illustrates exemplary logic for performing the SpO 2  slope calculation in accordance with the present invention. Since SpO 2  is read and processed every second, the slope is calculated every second. When a slope is calculated, it is calculated based on the current SpO 2  reading and the previous seven consecutive SpO 2  readings. It will be appreciated that a value other than seven may be used for the number of previous values to use when calculating the slope. All of the readings used in calculating the slope should be within the range where SpO 2  signal is considered OK. The slope is the average of the second-to-second SpO 2  change. The calculated slope is limited to a specified range. For example, in the illustrated embodiment shown in FIG. 4, the range defaults to +/−5% per second (SpO 2  Slope High Limit and SpO 2  Slope Low Limit). In various embodiments, multiple slopes can be calculated to track fast, medium, and slow changes simultaneously. The multiple slopes can then be used at different times within the FiO 2  Set Determination procedure (shown in FIG.  14 ). 
     The logic of FIG. 12 moves from a start block to decision block  380  where a test is made to determine if SpO 2  Signal OK Counter is greater than or equal to seven consecutive seconds. If not, the logic moves to block  382  where SpO 2  Slope is set to zero and the logic of FIG. 12 ends and processing returns to FIG.  8 . 
     If however, SpO 2  Signal OK Counter is greater than or equal to seven consecutive seconds (yes in decision block  380 ), the logic moves to block  384  where SpO 2  Slope is set to the average of the last seven second-to-second SpO 2  changes. Next, logic is performed to ensure that the slope is within the allowable limits. If in decision block  386  it is determined that SpO 2  Slope is greater then SpO 2  Slope High Limit (e.g., a change of more than 5%), the logic moves to block  388  where SpO 2  Slope is set to SpO 2  Slope High limit (e.g., SpO 2  Slope is set to +5%). If it is determined in decision block  390  that SpO 2  Slope is less than SpO 2  Slope Low Limit, the logic moves to block  392  where SpO 2  Slope is set to SpO 2  Slope Low Limit (e.g., SpO 2  Slope is set to −5%). The logic of FIG. 12 then ends and processing returns to FIG.  8 . 
     Returning to FIG. 8, after the slope has been calculated (block  268 ), the logic moves to block  270  where FiO 2  Max/Min timing is performed as illustrated in detail in FIG.  13  and described next. 
     The logic of FIG. 13 illustrates exemplary logic for performing FiO 2  Max/Min timing in accordance with the present invention. The algorithm monitors the actual value for FiO 2  Set by counting the time at the maximum and minimum FiO 2  limits. If FiO 2  has been continuously at the maximum limit longer that FiO 2  Max Alarm Interval, the user is alerted. The time in FiO 2  max and min is also used later for calculation of FiO 2  Base (FIG.  18 ). 
     The logic of FIG. 13 moves from a start block to decision block  400  where a test is made to determine if FiO 2  Set is equal to FiO 2  Min. If not, the logic moves to block  402  where FiO 2  Min Counter is set to zero. If so, the logic moves to block  404  where FiO 2  Min Counter is incremented. Next, the logic moves to decision block  406  where a test is made to determine if FiO 2  Set is equal to FiO 2  Max. If not, the logic moves to block  408  where FiO 2  Max Counter is set to zero and the logic of FIG. 13 ends and processing returns to FIG.  8 . 
     If, however, FiO 2  Set is not equal to FiO 2  Max, the logic moves from decision block  406  to block  410  where FiO 2  Max Counter is incremented. The logic then moves to block  412  where the user is alerted if it (FiO 2  Max Counter) is greater than 60 seconds. It will be appreciated that the time may be set to some value other than 60 seconds in various embodiments. The logic of FIG. 13 then ends and processing returns to FIG.  8 . 
     Returning to FIG. 8, after FiO 2  Max/Min timing has been performed, the logic moves to decision block  272  where a test is made to determine if closed-loop control is enabled. If so, the logic moves to block  273  where FiO 2  Set Determination is performed as illustrated in detail in FIG.  14  and described next. 
     The logic of FIG. 14 illustrates exemplary logic for performing FiO 2  Set Determination in accordance with the present invention. SpO 2  Read values are classified into SpO 2  levels: normoxemia, hyperoxemia and hypoxemia. The updated FiO 2  Set value is calculated in different ways according to the oxygenation range (SpO 2  level) that SpO 2  Read is currently in. The logic of FIG. 14 moves from a start block to decision block  450  where a test is made to determine the SpO 2  level. Appropriate processing is then performed based on the SpO 2  level. If the SpO 2  level indicates hypoxemia, the logic moves to block  452  where FiO 2  Set Determination in Hypoxemia is performed as illustrated in detail in FIG.  15  and described below. If the SpO 2  level indicates hyperoxemia, the logic moves to block  454  where FiO 2  Set Determination in Hyperoxemia is performed as illustrated in detail in FIG.  16  and described below. If the SpO 2  level indicates normoxemia, the logic moves to block  456  where FiO 2  Set Determination in Normoxemia is performed as illustrated in detail in FIG.  17  and described below. 
     FIG. 15 illustrates exemplary logic for performing FiO 2  Set Determination in Hypoxemia in accordance with the present invention. When hypoxemia occurs, the algorithm of the present invention determines an initial increase in FiO 2  Set of significant magnitude sufficient to offset the initial cascade effect of hypoxia as well as any lag time in changing the inspired O 2  concentration by the delivery mode. As soon as the SpO 2  Read value drops below the low limit of the target range set by the user and remains for the minimum required time (e.g., three seconds), the algorithm increases FiO 2  Set (occurring once for every time it drops to the hypoxemic range). Simultaneously, if the calculated SpO 2  slope is negative (trend is a decrease in SpO 2 ), FiO 2  Set is increased in direct proportion to the speed of change (e.g., every second). To prevent overshoot because of the system and intrinsic delays from the time inspired O 2  concentration changes until SpO 2  returns to normoxemia, FiO 2  Set is weaned down in steps proportional to the actual FiO 2  Set (e.g., every second) as soon as the SpO 2  shows signs of recovery (positive slope). Weaning (reduction) of the excess inspired oxygen concentration prevents arterial unnecessary supplemental oxygen exposure while oxygen saturation levels are in the normal range. FiO 2  is not weaned down below the basal level. Weaning is halted if the SpO 2  slope is flat or negative. If SpO 2  remains in the hypoxemia range and does not show signs of recovery (slope is flat or negative), successive increments of magnitude proportional to the difference between the target range and the SpO 2  Read are made. The intervals at which these steps occur vary in duration in inverse proportion to the degree of hypoxemia (a lower SpO 2  Read will cause larger increments at shorter intervals). 
     The logic of FIG. 15 moves from a start block to decision block  460  where a test is made to determine if conditions for initial FiO 2  increase are present. In exemplary embodiments, conditions for initial FiO 2  increase when SpO 2  has just dropped below range are: 
     SpO 2  signal lost and recovered in Hypoxemia 
     OR 
     SpO 2  in Hypoxemia 85-Low Limit and previously SpO 2  in Normoxemia 
     OR 
     SpO 2  in Hypoxemia 75-85% and previously SpO 2  in Normoxemia or SpO 2  in Hypoxemia 85-Low Limit 
     OR 
     SpO 2  in Hypoxemia less than 75% and previously SpO 2  in Normoxemia or SpO 2  in Hypoxemia 85-Low Limit or SpO 2  in Hypoxemia 75-85%. 
     If conditions for initial FiO 2  increase (such as those described above) are present, the logic moves to block  462  where FiO 2  Set is increased using the following equation: 
     
       
         FiO 2  Set=FiO 2  Set+6.0*(SpO 2  Low Limit−SpO 2  Read)*(FiO 2  Base/100)  (1)  
       
     
     Next, the logic moves to decision block  464  where a test is made to determine if the slope is negative. If so, the logic moves to block  466  where FiO 2  Set is increased in direct proportion to the speed of change using the following equation: 
     
       
         FiO 2  Set=FiO 2  Set+3.0*absolute (SpO 2  Slope)*(FiO 2  Base/100)  (2) 
       
     
     The logic then moves to decision block  468  where a test is made to determine whether conditions for FiO 2  weaning are present. In exemplary embodiments, conditions for FiO 2  weaning when SpO 2  begins to recover include: 
     SpO 2  Read&gt;75 
     AND 
     SpO 2  Slope&gt;0 
     AND 
     FiO 2  Set&gt;FiO 2  Base 
     AND 
     SpO 2  Signal OK Counter&gt;SpO 2  OK Time Min (e.g., five seconds). 
     If conditions for weaning are present, the logic moves to block  470  where FiO 2  Set is decreased using the following equation: 
     
       
         FiO 2  Set=FiO 2  Set−6.0*absolute (SpO 2  Slope)*(FiO 2  Set/100)  (3)  
       
     
     Next, the logic moves to decision block  472  where a test is made to determine if FiO 2  Set is less than FiO 2  Base. If so, the logic moves to block  474  where FiO 2  Set is set to FiO 2  Base. The logic then moves to block  476  where Hypoxemia Adjust Interval Counter (in seconds) is incremented and Hypoxemia Adjust Interval is calculated using the following equation: 
     
       
         Hypoxemia Adjust Interval=SpO 2  Read−65  (4)  
       
     
     The Hypoxemia Adjust Interval is limited to a specific range. The logic moves to decision block  478  where a test is made to determine if the Hypoxemia Adjust Interval is greater than the High Limit (SpO 2  Low Adjust Interval High Limit), for example, 40 seconds. If so, the logic moves to block  480  where the Hypoxemia Adjust Interval is set to the High Limit, e.g., 40 seconds. The logic proceeds to decision block  482  where a test is made to determine if the Hypoxemia Adjust Interval is less than the Low Limit (SpO 2  Low Adjust Interval Low Limit), for example,  5  seconds. If so, the logic moves to block  484  where the Hypoxemia Adjust Interval is set to the Low Limit, e.g., five seconds. 
     Next, a determination must be made as to whether it is time to adjust. The logic moves to decision block  486  where a test is made to determine if SpO 2  Slope is negative or zero and Hypoxemia Adjust Interval Counter is greater than or equal to Hypoxemia Adjust Interval. If so, the logic moves to block  488  where Hypoxemia Adjust Interval Counter is reset to zero and FiO 2  Set is increased using the following equation: 
     
       
         FiO 2  Set=FiO 2  Set+3.0*(SpO 2  Low Limit−SpO 2  Read)*(FiO 2  Base/100)  (5)  
       
     
     The logic of FIG. 15 then ends and processing returns to FIG.  14 . 
     FIG. 16 illustrates exemplary logic for performing FiO 2  Set Determination in Hyperoxemia in accordance with the present invention. When hyperoxemia occurs, the system determines an appropriate initial decrease of FiO 2  Set that is of significant magnitude. This reduction is smaller than that occurring initially with hypoxemia. As soon as SpO 2  Read exceeds the limit of the target range set by the user and remains for the minimum required time within each range (e.g., three seconds), the algorithm decreases FiO 2  Set (once each time it reaches the hyperoxemic range). If SpO 2  signal was lost (OUT) and when recovered shows values in hyperoxemia, the FiO 2  Set value is changed to the FiO 2  Set value that was last recorded when SpO 2  dropped out. The new FiO 2  Set value should not exceed the FiO 2  Base level. When SpO 2  Read values reach the hyperoxemic range, the algorithm allows for weaning of FiO 2  Set during a wean interval (e.g., 30 seconds) occurring every second only if the current FiO 2  Set value is above the FiO 2  Base level or the SpO 2  Slope is positive (more hyperoxemic). Under both circumstances the FiO 2  Set value is weaned down only to the FiO 2  Base level. Once SpO 2  Read values have been in the hyperoxemic range longer than the initial wean interval (e.g., 30 seconds), the current FiO 2  Set value is decreased in proportion to a positive SpO 2  Slope (every second, but smaller adjustments). FiO 2  Set value can be lowered below the FiO 2  Base level. After the initial wean interval (e.g., 30 seconds) has elapsed, FiO 2  Set value is decreased at steps of magnitude proportional to the difference between the hyperoxemic SpO 2  Read value and the target SpO 2  range and the FiO 2  Base level. These adjustments, however, are smaller than those observed during hypoxemia. The intervals at which these adjustments occur are in inverse proportion to the degree of hyperoxemia. Therefore, an SpO 2  reading average of 97% will result in a smaller reduction than a 99% reading and at longer intervals. These reductions can lower FiO 2  Set below FiO 2  Base level. 
     The logic of FIG. 16 moves from a start block to decision block  490  where a test is made to determine if conditions for initial FiO 2  decrease are present. In exemplary embodiments of the invention, conditions for initial FiO 2  decrease when SpO 2  has just crossed the high limit of the target range are: 
     SpO 2  Hyperoxemia Counter=Min Time in Range (e.g., three seconds) 
     AND 
     SpO 2  previously in Normoxemia OR SpO 2  Previously in Hypoxemia 
     AND 
     FiO 2  Set&gt;FiO 2  Base. 
     If conditions for initial FiO 2  decrease are present, the logic moves to block  492  where FiO 2  Set is decreased using the following equation: 
     
       
         FiO 2  Set=FiO 2  Set−3.0*(SpO 2  Read−SpO 2  High Limit)*(FiO 2  Base/100)  (6)  
       
     
     Next, the logic moves to decision block  494  where a test is made to determine if FiO 2  Set is less than FiO 2  Base. If so, the logic moves to block  496  where FiO 2  Set is set to FiO 2  Base. Next, the logic moves to decision block  498  where a test is made to determine if SpO 2  Signal was OUT and recovered in hyperoxemia. If so, the logic moves from decision block  498  to decision block  500  where a test is made to determine if FiO 2  Set is greater than FiO 2  Set Last Before Signal Lost. If the outcomes of decision blocks  498  and  500  are both true, the logic moves to block  502  where FiO 2  Set is set to FiO 2  Set Last Before Signal Lost. If the outcome of decision block  498  is true, the logic proceeds to decision block  504  where a test is made to determine if FiO 2  Set is greater than FiO 2  Base. If so, the logic moves to block  506  where FiO 2  Set is set to FiO 2  Base. 
     Regardless of the outcome of decision block  498 , the logic proceeds to decision block  508  where a test is made to determine if SpO 2  Hyperoxemia Counter is less than or equal to Wean Interval (e.g., 30 seconds). If so, the logic moves to decision block  510  where a test is made to determine if FiO 2  Set is greater than FiO 2  Base. If so, the logic moves to block  512  where FiO 2  Set is decreased according to the following equation: 
     
       
         FiO 2  Set=FiO 2  Set−6.0*(SpO 2  Read−SpO 2  High Limit)*(FiO 2  Set/100)  (7)  
       
     
     The logic proceeds to decision block  514  where a test is made to determine if SpO 2  Slope is positive (e.g., greater than zero). If SpO 2  Slope is positive, the logic moves to block  516  where FiO 2  is decreased using the following equation: 
     
       
         FiO 2  Set=FiO 2  Set−3.0*absolute (SpO 2  Slope)*(FiO 2  Set/100)  (8)  
       
     
     Regardless of the outcome of decision block  514 , the logic proceeds to decision block  518  where a test is made to determine if FiO 2  Set is less than FiO 2  Base. If so, the logic moves to block  520  where FiO 2  Set is set to FiO 2  Base. Regardless of the outcome of decision blocks  508 ,  510 ,  514  and  518 , the logic proceeds to decision block  522  where a test is made to determine if SpO 2  Hyperoxemia Counter is greater than Wean Interval (e.g., 30 seconds). If so, the logic moves to decision block  524  where a test is made to determine if SpO 2  Slope is positive. If so, the logic moves to block  526  where FiO 2  Set is decreased using the following equation: 
     
       
         FiO 2  Set=FiO 2  Set−absolute (SpO 2  Slope)*(FiO 2  Base/100)  (9)  
       
     
     Regardless of the outcome of decision block  524 , the logic proceeds to block  528  where Hyperoxemia Adjust Interval Counter is incremented and Hyperoxemia Adjust Interval is calculated using the following equation: 
     
       
         Hyperoxemia Adjust Interval=40.0−3.0*(SpO 2  Read−SpO 2  High Limit)  (10)  
       
     
     Hyperoxemia Adjust Interval is limited to a specific range. The logic proceeds to decision block  529  where a test is made to determine if Hyperoxemia Adjust Interval is greater than SpO 2  High Adjust Interval High Limit (e.g., 60 seconds). If so, the logic moves to block  530  where Hyperoxemia Adjust Interval is set to SpO 2  High Adjust Interval High Limit, (e.g., 60 seconds). Next, the logic moves to decision block  531  where a test is made to determine if Hyperoxemia Adjust Interval is less than SpO 2  High Adjust Interval Low Limit (e.g., 20 seconds). If so, the logic moves to block  532  where Hyperoxemia Adjust Interval is set to SpO 2  High Adjust Interval Low Limit (e.g., 20 seconds). The logic then moves to decision block  534  where a test is made to determine whether it is time to adjust (i.e., whether the Hyperoxemia Adjust Interval Counter is greater than or equal to Hyperoxemia Adjust Interval). If it is time to adjust, the logic moves to block  536  where SpO 2  High Adjust Level is calculated as the average of the SpO 2  over the Hyperoxemia Adjust Interval. Next, the logic moves to block  538  where Hyperoxemia Adjust Interval Counter is reset to zero and FiO 2  is decreased based on the following equation: 
     
       
         FiO 2  Set=FiO 2  Set−2.0*(SpO 2  High Adjust Level−SpO 2  High Limit)*(FiO 2  Base/100)  (11)  
       
     
     The logic of FIG. 16 then ends and processing returns to FIG.  14 . 
     FIG. 17 illustrates exemplary logic for performing FiO 2  Set Determination in Normoxemia in accordance with the present invention. If the SpO 2  signal was lost (OUT) and when recovered it shows values in normoxemia and FiO 2  Set is greater than the FiO 2  Set value that was last recorded when SpO 2  dropped out, the FiO 2  Set value is changed to that recorded value. This new FiO 2  Set value should not exceed the FiO 2  Base level. When SpO 2  Read values reach the normoxemic range after recovering from hypoxemia while the current FiO 2  Set value is above the FiO 2  Set Base level and the SpO 2  Slope does not show a decrease (is not negative), the algorithm decreases the FiO 2  Set value (one time). The FiO 2  Set value is not weaned down below the FiO 2  Base level. When SpO 2  Read values fall in the lower half of the normoxemic range (between the low limit of the target range of normoxemia and the default mid-value SpO 2  Base) and it shows signs of worsening (negative SpO 2  Slope), the FiO 2  Set value is increased in proportion to SpO 2  slope and the FiO 2  Base level. This is done to avert any onset of hypoxemia. When SpO 2  Read values reach the normoxemic range, the algorithm allows for weaning of FiO 2  Set every second during a wean interval (e.g., 45 seconds). This weaning occurs if the current FiO 2  Set value is above the FiO 2  Base level and the SpO 2  Slope is positive (towards hyperoxemia). The reduction is proportional to the slope. If the current FiO 2  Set value is above the FiO 2  Base level but the SpO 2  Slope is flat, the reduction is proportional only to the actual FiO 2  Set value. Under both conditions, the FiO 2  Set value is not weaned down below the FiO 2  Base level. 
     Once SpO 2  read values have been in the normoxemic range longer than initial wean interval (e.g., 45 seconds) and the current FiO 2  Set value is greater than the FiO 2  Base level and there is a positive SpO 2  Slope, the FiO 2  Set value is decreased (every second) in proportion to the slope and actual FiO 2  Set value. FiO 2  Set value is not weaned down below the FiO 2  Base level. After the initial wean interval (e.g., 45 seconds) has elapsed and the FiO 2  Set value is less than the FiO 2  Base level and there is a negative SpO 2  Slope and the FiO 2  Set value is increased in proportion to the SpO 2  Slope and the current FiO 2  Set level. This increase cannot cause the FiO 2  Set level to be above the FiO 2  Base level. 
     Once SpO 2  Read values have been in the normoxemic range longer than the initial wean interval (e.g., 45 seconds) or previous SpO 2  level was hyperoxemia or normoxemia and SpO 2  was lost and recovered (even before the initial wean interval of 45 seconds in both cases) the algorithm averages SpO 2  Read values. The duration of these averaging intervals is in proportion to the departure of SpO 2  Read from the mid-point of normoxemia (e.g., SpO 2  Base=94%). If the average SpO 2  adjust value exceeds the SpO 2  Base level (e.g., 94%) and FiO 2  Set value is greater than the FiO 2  Base level, FiO 2  Set value is decreased in proportion to the difference of averaged to base SpO 2  and FiO 2  Base level. If the averaged SpO 2  adjust value is below the SpO 2  Base level (e.g., 94%) and FiO 2  Set value is less than the FiO 2  Base level, FiO 2  Set value is increased in proportion to the difference of averaged to base SpO 2  and FiO 2  Base level. The magnitude of the FiO 2  Set change is larger when the average SpO 2  is above the mid SpO 2  Base and FiO 2  Set is above FiO 2  Base than when the average SpO 2  is below the mid SpO 2  Base and FiO 2  Set is below FiO 2  Base. The purpose of this difference is to allow lower O 2 , provided that SpO 2  is within normoxemia. 
     The logic of FIG. 17 moves from a start block to decision block  540  where a test is made to determine if SpO 2  Signal was OUT and recovered in Normoxemia. If so, the logic moves to decision block  542  where a test is made to determine if FiO 2  Set is greater than FiO 2  Before Signal Lost. If so, the logic moves to block  544  where FiO 2  Set is set to FiO 2  Before Signal Lost. Regardless of the outcome of decision block  542 , the logic proceeds to decision block  546  where a test is made to determine if FiO 2  Set is greater than FiO 2  Base. If so, the logic proceeds to block  548  where FiO 2  Set is set to FiO 2  Base. Regardless of the outcome of decision block  540 , the logic proceeds to decision block  550  where a test is made to determine if conditions for initial FiO 2  decrease are present. In exemplary embodiments of the invention, conditions for initial FiO 2  decrease when SpO 2  just crossed the low limit of the target range recovering from hypoxemia are: 
     SpO 2  Normoxemia Counter=Min Time in Range (e.g., 3 seconds) 
     AND 
     SpO 2  was previously in Hypoxemia 
     AND 
     FiO 2  Set&gt;FiO 2  Base 
     AND 
     SpO 2  Slope is flat (zero) or positive. 
     If conditions for initial FiO 2  decrease are present, the logic moves from decision block  550  to block  552  where FiO 2  Set is decreased using the following equation: 
     
       
         FiO 2  Set=FiO 2  Set−6.0*(SpO 2  Read−SpO 2  Low Limit)*(FiO 2  Set/100)  (12)  
       
     
     The logic then moves to decision block  554  where a test is made to determine if FiO 2  Set is less than FiO 2  Base. If so, the logic moves to block  556  where FiO 2  Set is set to FiO 2  Base. Regardless of the outcome of decision block  550 , the logic proceeds to decision block  558  where a test is made to determine if SpO 2  Read is less than SpO 2  Base and SpO 2  Slope is negative. If so, the logic moves to block  560  where FiO 2  Set is increased according to the following equation: 
     
       
         FiO 2  Set=FiO 2  Set+3.0*absolute (SpO 2  Slope)*(FiO 2  Base/100)  (13)  
       
     
     Regardless of the outcome of decision block  558 , the logic proceeds to decision block  562  where a test is made to determine if SpO 2  Normoxemia Counter is less than or equal to Wean interval (e.g., 45 seconds) If so, the logic moves to decision block  564  where a test is made to determine if FiO 2  Set is greater than FiO 2  Base. If so, FiO 2  may be decreased based on the slope. If SpO 2  Slope is positive (yes in decision block  566 ), the logic moves to block  568  where FiO 2  Set is decreased using the following equation: 
     
       
         FiO 2  Set=FiO 2  Set−3.0*absolute (SpO 2  Slope)*(FiO 2  Set/100)  (14)  
       
     
     If SpO 2  Slope is flat, i.e., zero (yes in decision block  570 ), the logic moves to block  572  where FiO 2  is decreased using the following equation: 
     
       
         FiO 2  Set=FiO 2  Set−3.0*(FiO 2  Set/100)  (15)  
       
     
     The logic then moves to decision block  574  where a test is made to determine if FiO 2  Set is less than FiO 2  Base. If so, the logic moves to block  576  where FiO 2  Set is set to FiO 2  Base. 
     Regardless of the outcome of decision block  562 , the logic proceeds to decision block  578  where a test is made to determine if SpO 2  Normoxemia Counter is greater than Wean Interval (e.g., 45 seconds). If so, the logic moves to decision block  580  where a test is made to determine if SpO 2  Slope is greater than zero and FiO 2  Set is greater than FiO 2  Base. If so, the logic moves to block  582  where FiO 2  Set is decreased using the following equation: 
     
       
         FiO 2  Set=FiO 2  Set−3.0*absolute (SpO 2  Slope)*(FiO 2  Set/100)  (16)  
       
     
     The logic then moves to decision block  584  where a test is made to determine if FiO 2  Set is less than FiO 2  Base. If so, the logic moves to block  586  where FiO 2  Set is set to FiO 2  Base. 
     Regardless of the outcome of decision block  578 , the logic proceeds to decision block  588  where a test is made to determine if SpO 2  Normoxemia Counter is greater than Wean Interval (e.g., 45 seconds). If so, the logic moves to decision block  590  where a test is made to determine if SpO 2  Slope is greater than zero and FiO 2  Set is less than FiO 2  Base. If so, the logic moves to block  592  where FiO 2  Set is increased using the following equation: 
     
       
         FiO 2  Set=FiO 2  Set+3.0*absolute (SpO 2  Slope)*(FiO 2  Set/100)  (17)  
       
     
     The logic then moves to decision block  594  where a test is made to determine if FiO 2  Set is greater than FiO 2  Base. If so, the logic moves to block  596  where FiO 2  Set is set to FiO 2  Base. 
     Regardless of the outcome of decision block  588 , the logic proceeds to decision block  598  where a test is made to determine if SpO 2  Counter is greater than Wean interval (e.g. 45 seconds) or if the previous level is Hyperoxemia or Normoxemia. If so, the logic moves to block  600  where Normoxemia Adjust Interval Counter is incremented and Normoxemia Adjust Level is calculated using the following equation: 
     
       
         Normoxemia Adjust Interval=60.0−4.0*absolute (SpO 2  Read−SpO 2  Base)  (18)  
       
     
     Normoxemia Adjust Interval is limited to a specific range. The logic moves to decision block  601  where a test is made to determine if Normoxemia Adjust Interval is greater than SpO 2  Normal Adjust Interval High Limit (e.g., 60 seconds). If so, the logic moves to block  602  where Normoxemia Adjust Interval is set to SpO 2  Normal Adjust Interval High Limit (e.g., 60 seconds). Next, the logic moves to decision block  604  where a test is made to determine if Normoxemia Adjust Interval is less than SpO 2  Normal Adjust Interval Low Limit (e.g., 20 seconds). If so, the logic moves to block  606  where Normoxemia Adjust Interval is set to SpO 2  Normal Adjust Interval Low Limit (e.g., 20 seconds). The logic then moves to decision block  608  where a test is made to determine if it is time to adjust (i.e., Normoxemia Adjust Interval Counter is greater than or equal to Normoxemia Adjust Interval). If so, the logic moves to block  610  where SpO 2  Normoxemia Adjust Level is calculated as the average of the SpO 2  over the Normoxemia Interval. Next, the logic moves to decision block  612  where a test is made to determine if SpO 2  Adjust Level is greater than SpO 2  Base AND SpO 2  Slope is greater than or equal to zero AND FiO 2  Set is greater than FiO 2  Base. If so, the logic moves to block  614  where Normoxemia Adjust Interval Counter is reset to zero and FiO 2  Set is decreased using the following equation: 
     
       
         FiO 2  Set=FiO 2  Set−2.0*(SpO 2  Adjust Level−SpO 2  Base)*(FiO 2  Base/100)  (19)  
       
     
     The logic then moves to decision block  616  where a test is made to determine if SpO 2  Adjust Level is less than SpO 2  Base AND SpO 2  Slope is less than or equal to zero AND FiO 2  Set is less than FiO 2  Base. If so, the logic moves to block  618  where FiO 2  Set is increased using the following equation: 
     
       
         FiO 2  Set=FiO 2  Set+(SpO 2  Base−SpO 2  Adjust Level)*(FiO 2  Base/100)  (20)  
       
     
     The logic of FIG. 17 then ends and processing returns to FIG.  14 . 
     Returning to FIG. 14, after the appropriate processing has been performed based on the SpO 2  level (hypoxemia in block  452 , hyperoxemia in block  454  or normoxemia in block  456 ), the logic of FIG. 14 ends and processing returns to FIG.  8 . 
     Returning to FIG. 8, if closed-loop control is not enabled (no in decision block  272 ), the logic moves to block  274  where FiO 2  Set is set to FiO 2  Backup. Next, the logic moves to block  276  where the user is alerted. Regardless of whether closed-loop control is enabled (decision block  272 ), the logic proceeds to decision block  278  where a test is made to determine if FiO 2  Base Calc is enabled. If so, the logic moves to block  280  where FiO 2  Base Determination is performed as shown in detail in FIG.  18  and described next. 
     FIG. 18 illustrates in detail exemplary logic for performing FiO 2  Base Determination in accordance with the present invention. When FiO 2  Base Calc is enabled, the algorithm automatically updates the basal oxygen when specific conditions are met as shown in FIG.  18 . In exemplary embodiments, when FiO 2  Base Calc is enabled by the user, the algorithm averages five minutes (not necessarily continuous) worth of FiO 2  Set values occurring during specific conditions. The calculated average for FiO 2  Base is limited to +/−10% of the current FiO 2  Base value. The newly calculated FiO 2  Base value is averaged with the current FiO 2 . Base value. The resulting value is the new FiO 2  Base value. The average interval duration is five minutes. This parameter can be modified according to the patient condition, either as a system default, by the user or automatically. 
     The logic of FIG. 18 moves from a start block to decision block  620  where a test is made to determine if there are conditions for FiO 2  Base. Exemplary conditions for inclusion of current FiO 2  Set value in FiO 2  base determination are: 
     SpO 2  in Normoxemia AND SpO 2  Normoxemia Counter&gt;SpO 2  Normoxemia Base Min (e.g., 30 sec) 
     OR 
     SpO 2  in Hyperoxemia AND FiO 2  Set=FiO 2  Min AND FiO 2  Min Counter&gt;FiO 2  Base Min (e.g., 30 sec) 
     OR 
     SpO 2  in Hypoxemia AND FiO 2  Set=FiO 2  Max AND FiO 2  Max Counter&gt;FiO 2  Base Max (e.g., 60 sec) 
     OR 
     SpO 2  in Hyperoxemia AND FiO 2  Set&lt;FiO 2  Base AND SpO 2  Hyperoxemia Counter&gt;SpO 2  High wean interval (e.g., 30 sec) 
     OR 
     SpO 2  in Hypoxemia AND FiO 2  Set&gt;FiO 2  Base AND SpO 2  Hypoxemia Counter&gt;SpO 2  Low Alarm Limit (e.g., 60 sec). 
     In exemplary embodiments, at least one of the following conditions must be met to include a specific FiO 2  value in the calculation of FiO 2  base: 
     (1) Current SpO 2  should be in normoxemia and SpO 2  has been in normoxemia for at last 30 seconds (base min); 
     (2) Current SpO 2  should be in hyperoxemia and FiO 2  is at the FiO 2  minimum level and FiO 2  has been at the minimum FiO 2  level for at least 30 seconds (base min); 
     (3) Current SpO 2  should be in hypoxemia and FiO 2  is at the FiO 2  max level and FiO 2  has been at the max FiO 2  level for at least 60 seconds (base max); 
     (4) Current SpO 2  in Hyperoxemia and current FiO 2  is below FiO 2  base and SpO 2  has been in hyperoxemia longer than 30 seconds; or 
     (5) Current SpO 2  in Hypoxemia and current FiO 2  is above FiO 2  Base and SpO 2  has been in hypoxemia longer than 60 seconds. 
     If conditions for FiO 2  base exist, the logic moves to block  622  where FiO 2  Base Counter is incremented using the following equation: 
     
       
         FiO 2  Base=FiO 2  Base+FiO 2  Set  (21)  
       
     
     Regardless of the outcome of decision block  620 , the logic proceeds to decision block  624  where a test is made to determine if there are 5 minutes (or whatever value is specified) of FiO 2  data. If so, the logic moves to block  626  where FiO 2  Base is averaged and set to be within the specified limit (e.g., +/−10%) of the current FiO 2  Base. FiO 2  Base Counter is reset to zero. The logic then moves to block  628  where the new and current FiO 2  Base values are averaged and set to be within the Max and Min settings. The logic of FIG. 18 then ends and processing returns to FIG.  8 . 
     Returning to FIG. 8, regardless of whether FiO 2  Base Calc is enabled (decision block  278 ), the logic proceeds to block  282  where FiO 2  Set checking is performed as shown in detail in FIG.  19  and described next. 
     FIG. 19 illustrates exemplary logic for performing FiO 2  Set checking in accordance with the present invention. The logic of FIG. 19 ensures that FiO 2  Set is within the allowable range. If it is determined in decision block  630  that FiO 2  Set is greater than FiO 2  Max, FiO 2  Set is set to FiO 2  Max in block  632 . If it is determined in decision block  634  that FiO 2  Set is less than FiO 2  Min, FiO 2  Set is set to FiO 2  Min in block  636 . The logic of FIG. 19 then ends and processing returns to FIG.  8 . 
     Returning to FIG. 8, the logic proceeds to block  284  where FiO 2  Base/Backup checking is performed as shown in detail in FIG.  20  and described next. 
     FIG. 20 illustrates exemplary logic for performing FiO 2  Base/Backup checking in accordance with the present invention. New FiO 2  Base and Backup values determined by the algorithm or set by the user are checked to ensure that they fall within the minimum and maximum ranges. If they don&#39;t, the user is alerted. In exemplary embodiments, if the value is not within acceptable limits, the value is set to an appropriate value. The logic of FIG. 20 alerts the user (block  642 ) if it is determined that FiO 2  Base is greater than 5% or if FiO 2  Base is equal to FiO 2  Max as determined in decision block  640 . 
     Similarly, if it is determined in decision block  644  that FiO 2  Backup is greater than 50% or FiO 2  Backup is equal to FiO 2  Max, the user is alerted in block  646 . The logic of FIG. 20 then ends and processing returns to FIG.  8 . 
     Returning to FIG. 8, the logic then proceeds to block  286  where FiO 2  Set Output Control to Mixer. Once the new FiO 2  value is confirmed, the updated FiO 2  Set value should be passed to the output routine that controls the air-oxygen blender. In exemplary embodiments, the output routine outputs a specific voltage to drive an external blender. In various embodiments, additional monitoring is provided to ensure correct mixing by monitoring data from a built-in FiO 2  analyzer. The logic of FIG. 8 then ends and processing returns to FIG.  6 . 
     FIG. 21 illustrates an exemplary graphical user interface  700 . The exemplary user interface  700  shown in FIG. 21 displays SpO 2  and FiO 2  parameters over a period of time. In an exemplary embodiment, the last five minutes and thirty minutes of data are displayed simultaneously. It will be appreciated that various other user displays are possible, for example in alternate embodiments, the user can select the time interval(s) for display data. The user interface also allows the user to interactively change various parameters. More specifically, the exemplary user interface  700  shown in FIG. 21 displays: 
     the current SpO 2  value read by the oximeter  702 ; 
     five minutes of tracing of SpO 2  at 60 second divisions  704 ; 
     the current FiO 2  set at the blender  706 ; 
     five minutes of tracing of FiO 2  Set values at 60 second divisions  708 ; 
     30 minutes of tracing of SpO 2  Read and FiO 2  Set values at five minute divisions  710 ; 
     the SpO 2  level (e.g., 0=normoxemia, 1=hypoxemia and 2=hyperoxemia)  712 ; 
     the previous SpO 2  level  714 ; 
     the calculated SpO 2  Slope  716 ; 
     the calculated SpO 2  trend based on SpO 2  slope magnitude  718 ; 
     an SpO 2  high counter (hyperoxemia)  720 ; 
     an SpO 2  normal counter (normoxemia)  722 ; 
     an SpO 2  low counter (hypoxemia)  724 ; 
     is an SpO 2  low counter for the range of 85%−the low SpO 2  limit  726 ; 
     an SpO 2  low counter for the range of 75%-85%  728 ; 
     an SpO 2  low counter for the range of less than 75%  730 ; 
     an SpO 2  High Limit of the target range  732 ; 
     an SpO 2  Low Limit of the target range  734 ; 
     an SpO 2  signal OK counter  736 ; 
     an SpO 2  signal OUT counter  738 ; 
     a control button  744  which is the main switch to start closed loop adjustments (i.e., when OFF, FiO 2  is at backup level); 
     a record button  746  which is used to record certain parameters (e.g., write to a file); 
     an FiO 2  Base Cal switch  750  which is switched on and off to calculate the basal oxygen requirement; 
     the FiO 2  Base value  752 ; 
     a FiO 2  Base counter  754  which is used when FiO 2  Base Calc is enabled; 
     an FiO 2  backup value  756 ; and 
     an FiO 2  Minimum level  758 . 
     As discussed earlier, the user can modify various parameters at any time. For example, in the exemplary embodiment shown in FIG. 21, the user can use the arrows to modify the values for the associated parameters. 
     Additional modifications and improvements of the present invention may also be apparent to those of ordinary skill in the art. Thus, the particular parts described and illustrated herein is intended to represent only one embodiment of the present invention, and is not intended to serve as limitations of alternative devices within the spirit and scope of the invention.