Abstract:
An improved software control system for a positive pressure ventilator that implements the controller that regulates the ventilator solenoid as a finite state machine. The use of a state machine implementation provides multiple degrees of freedom to the designer and provides for a modular, fail safe design.

Description:
BACKGROUND OF THE INVENTION 
     1. Field of Invention 
     The present invention relates generally to positive pressure ventilators, particularly infant ventilators. 
     SUMMARY OF THE INVENTION 
     Historically, ventilators have been designed to be operated in a limited number of modes, with limited degrees of freedom for designers to update the ventilators to be more feature rich and user friendly. Accordingly, an aspect of the present invention is to provide for a software controlled, interrupt driven, finite-state machine driven infant ventilator system that gives a designer more degrees of freedom in designing ventilators and provides for a plurality of improved features, such as providing for a safe, modular design. 
     Broadly, a state machine, also called a finite state machine, is defined as a computing device designed with the operational states required to solve a specific problem. The circuits are minimized, specialized and optimized for the application in question. For example, chips in audio, video and imaging controllers are often designed as state machines, because they can provide faster performance at lower cost than a general-purpose CPU. 
     Traditionally, such finite state machines were hardwired, not programmable, or, if programmable, were programmed in a low-level assembly language. Such a design approach is not unreasonable, as it does not compromise safety, since it is known in the art that the higher the level of language, the more likely software errors will be latent in the software. The cost of having a hardwired or hard coded system, however, is that it is inflexible to future design changes and has less degrees of freedom for designers to rapidly implement and change features in response to market conditions. 
     The present invention discloses a finite state machine implementation of a software controlled, interrupt driven controller (control microprocessor) in an infant ventilator that uses a higher level language, such as C or C++, to implement the finite state machine design, that gives multiple operating modes and multiple degrees of freedom to a designer, but at the same time has numerous fail-safe modes and safety features that make the ventilator as safe or safer than more traditional designs. 
    
    
     The above described and many other features and attendant advantages of the present invention will become apparent from a consideration of the following detailed description when considered in conjunction with the accompanying drawings. 
     BRIEF DESCRIPTION OF THE DRAWINGS 
     Detailed description of preferred embodiments of the invention will be made with reference to the accompanying drawings. 
     FIG. 1 is a block diagram of the infant ventilator of the present invention. 
     FIG. 2 is a type interaction context diagram of the ventilator system used in the present invention. 
     FIG. 3 (labeled over 3 sheets as FIGS. 3-1, 3-2, and 3--3) is a Mealy/Moore type finite state machine diagram of the portion of the ventilator that controls respiration that is the subject matter of this invention. 
    
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS 
     Disclosed herein is a detailed description of a best presently known mode of carrying out the invention. This description is not to be taken in a limiting sense, but is made merely for the purpose of illustrating the general principles of the invention. 
     FIG. 1 discloses a block diagram of the overall system of the present invention, comprising a dual microprocessor system 10, having a first microprocessor, control micro 12, preferably a Motorola 68HC11F1 microcontroller, for controlling a switch 14 that controls a exhalation or respiratory solenoid 16 (also termed a &#34;delivery breath&#34; solenoid) for a electro-pneumatic, continuous flow, time cycled, pressure limited, positive-pressure ventilator 20, that delivers respiratory gas such as air and oxygen to a patient (e.g., both neonatal and pediatric patients) for external respiration. The system 10 has one or more pressure transducers, a trigger pressure transducer 22, which has high resolution and attempts to sense a patient&#39;s efforts to breathe (patients pressure differential) and a proximal pressure transducer 24, which has a lower resolution and senses a patient&#39;s proximal pressure profiles. Both pressure transducers 22, 24 are software driven and ultimately may use the same hardware to sense raw pressures, in analog format, converted to digital format with a A/D converter (ADC), as part of the system 10 for sensing the breathing pressure fed to or sensed by the patient, either at the Y-adapter of the ventilator, or at the patient&#39;s trachea. A second microprocessor, an interface micro 30 (interface microprocessor) also preferably a Motorola 68HC11F1 microcontroller, communicates with the first controller microprocessor 12, for controlling the patient information gathered by the first microprocessor 12 and displays it on a display control console 40, which is preferably an LCD screen and membrane touch screen I/O console. The present invention is concerned with the software architecture for the first microprocessor 12, the control micro 12 (control microprocessor system). Control microprocessor system 12 of the apparatus is a finite state machine that controls the solenoid to delivers a &#34;breath&#34; from the ventilator to the patient. The software architecture that controls the micro 12 preferably resides in RAM accessed by the control micro 12 (and optionally may be stored in PROM, EEPROM or EPROM as firmware), is in the form of a finite state machine representation. Note when the ventilator is &#34;exhaling&#34; respiratory gas the patient is &#34;inhaling&#34;, and vice versa. Details concerning the second, display-oriented microprocessor 30, the console 40, and the hardware associated with the solenoid are not part of the present invention. Details concerning the respirator hardware are the subject matter of the copending and commonly assigned U.S. patent application entitled &#34;Improved Ventilator Triggering Device,&#34; Ser. No. 09/183,761, filed on Oct. 30, 1998, incorporated by reference herein. The software for the control micro 12 is written and compiled for the high level C language, using a PC platform. 
     The context diagram in FIG. 2 shows the information (signals and control data) flowing between the control micro 12 of FIG. 1 and all the external entities with which it interfaces. The rectangular boxes or terminators represent the external entities; the single circle or process represents the complete control micro 12 software system. Thus, going clockwise from the top of FIG. 2, the control micro 12 interacts with the interface micro 30 via SPI data (Serial Peripheral Interface data) that indicates inter-communication 312. A INSP signal, for respiratory rate measurement signal, is processed and delivered to input port 313 of the interface micro 30. A watchdog timer 314 is monitored, with the watchdog timer periodically polled (or patted) and suitable error signal conditions (INOP signal) monitored. Next the exhalation solenoid 316 is monitored and controlled, which controls how much respiratory gas is exhaled by the machine into the patient. A manual breath button 318 controls the delivery of a single shot of respiratory gas into a patient. A proximal pressure sensor 320 measures the patient airway pressure at the ventilator, while a trigger pressure sensor 322 senses the pressure at the Y-adapter of the respirator, attempting to measure the patient&#39;s efforts only. A DC supply input voltage 324, suitably isolated, provides power to the control micro and any accessories, while a DC logic voltage 326 supplies logic voltage. 
     Turning attention now to FIG. 3, there is shown a Mealy/Moore type finite state machine diagram of the portion of the ventilator that controls respiration, the control micro 12. In the Mealy/Moore finite state machine diagram, the present state is indicated by alpha-numeric indicia inside the boxes, while the event or condition that causes a change in state (even if the state is to the present state) is indicated by indicia outside the box, also termed a transition, with the direction of the arrow indicating the direction of the state transition from one state to the next. Suitable actions can take place both during a transition and at any given state. 
     Generally speaking, and ignoring for the moment the states (modes) involved with standby mode, manual (one-shot) mode, and numerous other such modes, the operation of the control micro 12 of the respirator of the present invention can be broken down into three broad categories: a first &#34;weaning&#34; mode, labeled CPAP in FIG. 3, where a patient is breathing spontaneously at a positive pressure above ambient, a second &#34;synchronous assist&#34; ventilator mode, labeled SIMV --  WDW in FIG. 3, where a patient can breathe spontaneously between synchronized assisted machine breaths, and a third conventional mechanical mode, labeled AC --  EX in FIG. 3, a traditional mode of first generation ventilators, where the patient is solely machine delivered or assisted in breathing with none of the features mentioned in the other two categories. 
     Aside from these three general categories of operation of the ventilator, there are numerous other modes (aside from the modes within each of the three general categories described above, as explained further herein). These modes have to do with when the apparatus is in standby mode, in system off mode, and in manual mode (one-shot mode), where a single cycle of respiration is performed on the patient. 
     Thus, one mode of operation of the control micro 12 is the standby mode, or the STBY state (mode), where the respirator is in a state of repose. As shown graphically by the Mealy/Moore finite state machine diagram of FIG. 3, when the control micro 12 of the ventilator is in a standby mode, there can be a plurality of events and conditions that trigger a change of state for the system. 
     One change is for the state to transition from the STBY mode (state) to the STBY mode (i.e., the system does not change state) upon the detection of a STBY --  MODE condition during a NEWMODE event, which may be a predetermined portion of the program that checks for the occurrence of a change in mode. In this case the state does nothing (i.e., system does not change state). Another change in state is from the STBY mode (state) to the AC --  EX mode (state) upon the detection of a AC --  MODE condition during a NEWMODE event. Such an AC --  MODE condition may result from an operator depressing a button or switch on the console operator interface designating the AC --  EX mode of operation, as is described further herein. The state can also change from STBY to SYS --  OFF, where the system is turned off, upon detection of a OFF --  MODE condition during a NEWMODE event, as indicated by the reference arrow. The condition to trigger the change of state to SYS --  OFF may be input by an operator from an operator interface console. In the SYS --  OFF mode all events are reinitialized, all timers are stopped (which preferably are software timers but may be hardware timers) and the ventilator has its power turned off. Any state variables referencing the system state is changed to reflect the new state, SYS --  OFF, as is true during any change of state. In addition, as a safety precaution, SYS --  OFF is the only state where instruments and hardware may be calibrated. 
     The state can also change from the STBY mode (state) to the manual breath inspiration state, the MB --  INSP mode (state), upon the happening of an event designated MBREATH. This occurs when an operator pushes a button on the console designating the MBREATH mode of operation, as described herein. 
     The MBREATH mode of operation, designated as the state MB --  INSP, is for a &#34;one-shot&#34; delivery of respiratory gas upon the depressing of a button on the apparatus interface console. When in the MB --  INSP state the software changes state to another state MB --  MIN --  EX upon the detection of a TDELTA event. A TDELTA event, signifies that the inspiratory time for a patient has just elapsed, as measured by a delta timer, which preferably is software driven and is set to count a predetermined time selected by the operator, which may depend on such factors as the patients age, weight and medical condition, and the like. The apparatus is instructed by the processor to deactivate the exhalation solenoid, and re-start a delta timer with a minimum exhalation time. If, however, prior to the TDELTA event a EXOFF event is detected, the state states the same. The EXOFF event, an emergency event, exists as a safety precaution, upon the occurrence of a high inspiratory pressure from the patient or a prolonged inspiratory time, which may set off an alarm in the system, and the control micro 12 will be instructed to turn off the exhalation solenoid, and restart the delta timer with a minimum exhalation time. In the state MB --  MIN --  EX the apparatus simply waits for the TDELTA event timer to elapse, and upon lapsing, if the condition CPAP --  MODE is sensed (e.g., such as if an operator has depressed a button on the console for putting the apparatus into the CPAP mode) then the state changes to CPAP, otherwise the state changes back to the standby mode, STBY. 
     Turning attention again to the STBY state, the apparatus can change from STBY mode to CPAP mode upon the detection of a CPAP --  MODE condition during a NEWMODE event. Such a CPAP --  MODE condition may result when an operator pushes a button on the operator interface console designating the CPAP mode of operation, as is described further herein. 
     A particularly popular mode of operation of the control micro 12 is the CPAP mode, or &#34;weaning&#34; mode, where the ventilator allows the patient to breathe spontaneously. Thus, when the trigger pressure sensor 322 detects that a patient is breathing spontaneously, the ventilator does nothing but monitor the patient. Graphically in the Mealy/Moore finite state machine diagram of FIG. 3 this is shown by arrow CPAP, which is in a present state of repose, CPAP, and which, upon the happening of a TRIGGER or SPONEX event, goes to the next state of CPAP, (e.g., maintains its present state). A TRIGGER event is signaled if the average trigger pressure crosses over an established reference pressure threshold. A SPONEX event is signaled if the average trigger pressure crosses above the average baseline pressure to indicate the start of an exhalation phase. The CPAP state also transfers information about the fact that spontaneous inhalation or exhalation has occurred to the interface micro 30, to display status about the change in state, and to reset the software to indicate that a TRIGGER or SPONEX event has been completed. 
     Another state transition in the CPAP &#34;weaning&#34; mode is shown as triggered by the event APNEA, which causes the control micro 12 of the ventilator to transition from the CPAP mode to the &#34;backup ventilation&#34; mode. This mode is entered whenever there is an apnea, or a temporary cessation of breathing. Upon the detection of apnea, the software transitions to another state, termed the state BK --  INSP, as shown in FIG. 3. The software for the finite state machine control micro 12 calls an appropriate module that notes the change in state, starts a cyclical timer module that is loaded in &#34;one-shot&#34; mode (non-periodic) with appropriate data particular to the patient for what type of mechanical breath delivery is required of the exhalation solenoid of the machine, and begins the respiratory cycle of the machine (the inspiratory cycle of the patient). 
     At state BK --  INSP, there are two events that will cause a transition in the state machine that are to be programmed: a TDELTA event and an EXOFF event. In the former, the TDELTA event, signifies that the inspiratory time for a patient has just elapsed. Thus it deactivates the exhalation solenoid 16 of the apparatus, and re-starts a delta timer with a minimum exhalation time. The next state reached is then the BK --  MIN --  EX state, which waits until another TDELTA event is reached, and at which point the state of the machine decays to the state BK --  EX. However, the EXOFF event exists as a safety precaution, upon the occurrence of a high inspiratory pressure from the patient or a prolonged inspiratory time alarm, the control micro 12 will be instructed to turn off the exhalation solenoid, and restart the delta timer with a minimum exhalation time. Suitable alarms may be sounded by the interface micro for a nurse or physician to be summoned. 
     At state BK --  EX a variety of new states may be entered into, depending on what events and conditions occur. For example, if event TRIGGER is detected, where the average trigger pressure crosses over the established reference pressure threshold, this signifies that the patient has attempted to breathe. Consequently, the new state entered into will be back to the &#34;weaning&#34; state, CPAP, as referenced by reference arrow TRIGGER in FIG. 3. 
     If, however, in state BK --  EX, the conditions TCYC or MBREATH are sensed by the software, the state entered into is BK --  INSP and the exhalation process is repeated for one more cycle, with the patient being forced air by the delivery breath solenoid. Condition TCYC is entered into if the cyclical timer for the current respiratory cycle lapses before any other condition is sensed in state BK --  EX (e.g., the other arrows leading out of the state diagram box BK --  EX). Condition MBREATH is sensed if a physician or nurse manually pushes a &#34;manual aspiration&#34; button, forcing air into a patient for one-shot (cycle) only. 
     Turning attention now to the AC --  EX mode, there is shown another state of the apparatus for forced air delivery. The AC --  EX mode of operation, for &#34;assist/control&#34; mode, is a more primitive, traditional form of machine aspiration than the SIMV --  WDW mode described herein. In the AC --  EX state, the ventilator does monitor the patient&#39;s breathing to detect a TRIGGER, but not synchronously as in the SIMV --  WDW mode discussed herein, nor does the machine wean a patient who is breathing spontaneously (i.e., naturally) but may need mechanical backup assistance when he/she goes apenic (i.e., apnoeic), as in the CPAP mode discussed herein. Rather, in the AC --  EX mode, the ventilator cyclically exhales respiratory gas into the patient in a regular, albeit changeable, mechanical cycle. Thus, as indicated by the Mealy/Moore finite state machine diagram of FIG. 3, the state AC --  EX can change into a plurality of other states depending on what events and conditions are triggered when the software driven apparatus is in the AC --  EX state. 
     For one, upon the occurrence of a NEWMODE event when in the AC --  EX mode, which may be a predetermined portion of the program that checks for the occurrence of a change in mode, and upon the occurrence of a OFF --  MODE condition received during a NEWMODE event, the program will switch (e.g., via a call to a function while in a switch statement) to the next state SYS --  OFF, which will turn off the ventilator and reinitialize all pending events, as well as stop all timers and disable trigger and spontaneous breath detentions. In addition, as is true for all changes in state, a state variable may be changed to indicate a SYS --  OFF mode. 
     Upon the occurrence of a STBY --  MODE condition during a NEWMODE event when in the AC --  EX state, the software changes state to the standby mode, STBY, as explained herein. Upon the occurrence of a AC --  MODE condition during a NEWMODE event when in the AC --  EX state, or upon the occurrence of a NEWRATE event, the software does not change state (e.g., remains in the same state). The occurrence of a AC --  MODE condition may be in response to an operator pushing a button on a console. The NEWRATE event is an update of the existing respiratory cycle time. Upon the occurrence of a NEWRATE event the software also performs the following functions: (a) if the new respiratory cycle time for the AC --  EX mode is less than the currently set respiratory time, and is also less than the elapsed respiratory cycle time, the timer for the current cycle time is ended and re-started with the new respiratory time; (b) if the new respiratory cycle time is less than the current respiratory time, and is also greater than the elapsed respiratory cycle time, the difference of the new and the elapsed respiratory cycle time is used to complete the current cycle time; and (c) if the new respiratory cycle time is greater than the current cycle time, no modification is needed to the current cycle timer. 
     Upon the occurrence of the events of either TRIGGER or MBREATH or TCYC during a NEWMODE event when in the AC --  EX state, the software changes state to the new state AC --  INSP, which starts the respiratory cycle. The TRIGGER event is signaled if the average trigger pressure crosses over an established reference pressure threshold. The TCYC timer is a counter timer to periodically trigger an event, such as when the current respiratory cycle is ended. The MBREATH event is initiated when an operator, e.g., a physician or nurse, pushes a button on the interface console of the respirator apparatus to trigger that a manual breath cycle be actuated, which causes the apparatus to deliver a single shot of respiratory gas into the patient every time the button is depressed. 
     From the state AC --  INSP the apparatus may change to the AC --  MIN --  EX state, upon the occurrence of a TDELTA event, signifying that the inspiratory time for a patient has just elapsed, and further it may change state from the state AC --  MIN --  EX back to AC --  EX upon the further occurrence of a TDELTA event (in effect 2 times TDELTA in time from the delta timer allows a change of state from AC --  INSP to AC --  EX), and complete the respiratory cycle, with no further air forced into the patient at the end of the cycle. At the state AC --  INSP the occurrence of an EXOFF event (which exists as a safety precaution, upon the occurrence of a high inspiratory pressure from the patient or a prolonged inspiratory time) will cause the control micro 12 to turn off the exhalation solenoid, and restart the delta timer with a minimum exhalation time. 
     State AC --  EX can also change state to the CPAP &#34;weaning&#34; mode, as discussed herein, upon the occurrence of a CPAP --  MODE condition during a NEWMODE event, such as an operator pushing a button on the console to start the CPAP mode when the NEWMODE window is open. Likewise, the AC --  EX state may change to the SIMV --  WDW state, as further discussed herein, upon the occurrence of a condition SIMV --  MODE during a NEWMODE event. 
     State SIMV --  WDW will now be described. In this state, breathing is machine assisted in a synchronous manner, but with sophisticated feedback in the ventilator to determine when to have the machine exhale respiratory gas into the patient, based on the patient&#39;s inhalation patterns and the pressure sensed by a trigger pressure transducer. Further, upon detection of a TRIGGER event, the state of the respirator changes to allow the possibility of a change to a different mode, as discussed further herein. 
     Turning to FIG. 3, state SIMV --  WDW changes to state SIMV --  WDW --  INSP when the events TCYC or MBREATH are triggered, such as when the cyclical timer TCYC lapses before any other condition is sensed in state, or when a manual mode (one-shot) button is depressed on the console by a nurse. The respirator solenoid is suitably activated to give a single shot of respiratory gas to the patient. In state SIMV --  WDW --  INSP the one-shot respiration process is continued. State SIMV --  WDW --  INSP does not change upon the happening of an EXOFF event, which is an emergency event, otherwise upon the end of a predetermined time set by software timer TDELTA, the state changes to state SIMV --  WDW --  MIN --  EX, which is a state involved at the end of an inspiratory phase, which restarts a delta timer with the predetermined minimum exhalation time (which may be set by an operator), turns off the exhalation solenoid 16, and signals the interface micro 30 of the change and relays SPI (Serial Peripheral Interface) data to the display console concerning the state of the control micro. 
     State SIMV --  WDW can also change to state SIMV --  TRIG --  INSP, upon the detection of a TRIGGER event, where a patient attempts to breathe. The state function executed from the transition from state SIMV --  WDW to SIMV --  TRIG --  INSP turns on a TDELTA cyclical timer to a predetermined value selected by the operator, passes information to the console, and starts the solenoid to start inspiratory phase of the respiratory cycle, so that the solenoid exhales gas from the machine to the patient, synchronous with the patients own attempts to breathe. At state SIMV --  TRIG --  INSP, there are two events that will trigger a state change, either a EXOFF event, an emergency event as discussed above, that exists as a safety precaution to activate emergency procedures in the respirator in the event of occurrence of a high inspiratory pressure from the patient or a prolonged inspiratory time, which maintains the state, or a TDELTA event, which signifies the minimum inspiratory time has lapsed, and changes the state to SIMV --  TRIG --  MIN. At the state SIMV --  TRIG --  MIN the state changes automatically to SIMV --  TRIG --  EX upon the lapsing of a TDELTA time (in effect TDELTA time is one-half the actual respiratory cycle time). Upon the change of state from SIMV --  TRIG --  MIN to SIMV --  TRIG --  EX, any delta timers are stopped, the states dealing with MBREATH, TRIGGER, and SPONEX are reset to a pending state, and the state is set to check to see if any of the events or conditions in SIMV --  TRIG --  EX are tripped. 
     In state SIMV --  TRIG --  EX, a state function is run (typically using a switch command in a do-while loop) that checks to see if the events NEWMODE, TCYC, MBREATH, TRIGGER, NEWRATE or SPONEX have occurred, and executes the appropriate change in state, initiating the appropriate action. Thus, the NEWMODE even coupled with the condition OFF --  MODE, STBY --  MODE, AC --  MODE, SIMV --  MODE, CPAP --  MODE will trigger the change in state the following states, respectively: to state SYS --  OFF, where the system is turned off, as previously discussed, state STBY, where the system is in repose, state AC --  EX, a mainly mechanical mode of respiration as discussed, and the state CPAP --  MODE, or weaning mode, as discussed. During each of these transitions the state variables are updated to reflect the change in state and appropriate initialization steps may be taken to ensure the states are set to proper values to respond. 
     State SIMV --  TRIG --  EX may change state to three other states, as shown in FIG. 3. The state may change from SIMV --  TRIG --  EX to the SIMV --  TRIG --  INSP state, upon the happening of a MBREATH event, such as when an operator depresses a button on the console for a &#34;single-shot&#34; of respiration (a single respiratory cycle upon depressing of the manual breath button) in which case the state changes to accommodate one additional cycle. In addition, the state may not change, or remain the same, upon the happening of a TRIGGER event, a TCYC event or a SPONEX event. The occurrence of a TRIGGER event indicates the patient is breathing by his or her own efforts, consequently, no additional change of state is required for the time being, unless the cyclical timer TCYC has been triggered. Upon the occurrence of a TCYC event when in the state SIMV --  TRIG --  EX, the synchronous cycle of the SIMV --  WDW mode is repeated by transformation back to the state SIMV --  WDW. Condition TCYC is entered into if the cyclical timer for the current respiratory cycle lapses before any other condition is sensed in state SIMV --  TRIG --  EX. Finally, also while in state SIMV --  TRIG --  EX, the event SPONEX indicates the start of an exhalation phase of a spontaneous breath, such as the average trigger pressure crosses above the average baseline pressure. 
     Regarding the hardware of the control micro 12 used in the present invention, it is preferably a Motorola 68HC11F1 chip, operated as a finite state machine by the control micro software of the present invention. The section titles and overall organization of the present detailed description are for the purpose of convenience only and are not intended to limit the present invention. 
     Although the present invention has been described in terms of the preferred embodiments above, numerous modifications and/or additions to the above-described preferred embodiments would be readily apparent to one skilled in the art. Thus, one of ordinary skill might be able to combine two or more states where there is only one transitional event branch from one state to the next, such as states SIMV --  TRIG --  INSP and SIMV --  TRIG --  MIN --  EX or AC --  INSP and AC --  MIN --  EX, without loss of generality. It is intended that the scope of the present invention extends to all such modifications and/or additions and that the scope of the present invention is limited solely by the claims set forth below.