Methods and apparatus for the systemic control of ventilatory support in the presence of respiratory insufficiency

11617845 · 2023-04-04

Assignee

Inventors

Cpc classification

International classification

Abstract

A method and apparatus for providing ventilatory assistance to a spontaneously breathing patient an error signal (56) is computed that is the difference between a function of respiratory airflow (54) over a period of time and a target value (52). Using a servo loop, air is delivered to the patient at a pressure that is a function of the error signal, the phase of the current breathing cycle, and a loop gain that varies depending on the magnitude of the error signal. The loop gain increases with the magnitude of the error signal, and the gain is greater for error signals below a ventilation target than for error signals above the ventilation target value. The target value (52) is an alveolar ventilation that takes into account the patient's physiologic dead space.

Claims

1. An apparatus for providing pressurized ventilatory assistance to a patient, the apparatus comprising: a blower for producing pressure support ventilation for a patient, a controller coupled with the blower to control the blower, a flow sensor for deriving an estimate of respiratory flow; and wherein the controller is configured to: change a rate of adjustment of the pressure support ventilation by applying a difference function to a determined pressure support amplitude, the difference function comprising a variable representing an extent to which leak is changing rapidly, the determined pressure support amplitude being determined from an error between a target ventilation and measured ventilation; filtering the estimate of respiratory flow with a filter having a peak hold tendency to produce an estimate of residual leak; and compute the variable of the difference function by applying a function to the estimate of residual leak, wherein the filter is a multi-stage filter comprising a first stage and a second stage; and wherein the controller is configured to vary a variable time constant for the filtering with a ratio of an output of the first stage of the filtering and the target ventilation.

2. The apparatus of claim 1 wherein the difference function comprises a subtraction of the variable from one to produce a difference value.

3. The apparatus of claim 2 wherein the difference function is applied to the determined pressure support amplitude by multiplying the different value and the determined pressure support amplitude.

4. The apparatus of claim 1 wherein the function applied to the estimate of residual leak produces a value in a range from 0 to 1.

5. The apparatus of claim 4 wherein the value in the range is 0 when an absolute value of the estimate of residual leak is less than the target ventilation.

6. The apparatus of claim 5 wherein the value in the range is 1 when an absolute value of the estimate of residual leak is twice the target ventilation.

7. The apparatus of claim 6 wherein the value in the range is linearly interpolated based on the absolute value of the estimate of residual leak and the target ventilation.

8. The apparatus of claim 1 wherein the first stage comprises a low pass filter.

9. The apparatus of claim 8 wherein the low pass filter is a 4-pole Bessel lowpass filter.

10. The apparatus of claim 9 wherein the 4-pole Bessel lowpass filter has a corner frequency of 3.2/60 hertz.

11. The apparatus of claim 1 wherein the second stage is an instant-rise, variable time constant, first order lowpass fall filter.

12. The apparatus of claim 1, wherein output of the second stage is weighted toward retaining values closer to output of the first stage when output of the first stage is further from zero.

13. A method of a controller for apparatus for providing pressurized ventilatory assistance to a patient, the method comprising: controlling a blower for producing pressure support ventilation for a patient; receiving a signal from a flow sensor to derive an estimate of respiratory flow; determining a pressure support amplitude from an error between a target ventilation and measured ventilation; changing a rate of adjustment of the pressure support ventilation by applying a difference function to the determined pressure support amplitude, the difference function comprising a variable representing an extent to which leak is changing rapidly; filtering the estimate of respiratory flow with a filter having a peak hold tendency to produce an estimate of residual leak; and computing the variable of the difference function by applying a function to the estimate of residual leak, wherein the filter is a multi-stage filter comprising a first stage and a second stage; and wherein the controller varies a variable time constant for the filtering with a ratio of an output of the first stage of the filtering and the target ventilation.

14. The method of claim 13 wherein the difference function comprises subtracting the variable from one to produce a difference value.

15. The method of claim 14 wherein the difference function is applied to the determined pressure support amplitude by multiplying the different value and the determined pressure support amplitude.

16. The method of claim 13 wherein the function applied to the estimate of residual leak produces a value in a range from 0 to 1.

17. The method of claim 16 wherein the value in the range is 0 when an absolute value of the estimate of residual leak is less than the target ventilation.

18. The method of claim 17 wherein the value in the range is 1 when an absolute value of the estimate of residual leak is twice the target ventilation.

19. The method of claim 18 wherein the value in the range is linearly interpolated based on the absolute value of the estimate of residual leak and the target ventilation.

20. The method of claim 13 wherein the first stage comprises a low pass filter.

21. The method of claim 20 wherein the low pass filter is a 4-pole Bessel lowpass filter.

22. The method of claim 21 wherein the 4-pole Bessel lowpass filter has a corner frequency of 3.2/60 hertz.

23. The method of claim 22 wherein the second stage is an instant-rise, variable time constant, first order lowpass fall filter.

24. The method of claim 13, wherein controller weights output of the second stage toward retaining values closer to output of the first stage when output of the first stage is further from zero.

Description

BRIEF DESCRIPTION OF THE DRAWINGS

(1) FIG. 1 depicts the structure of the preferred ventilator apparatus for implementing the methods of the current invention;

(2) FIG. 2 is a flow chart of the general steps in synchronizing and setting the pressure;

(3) FIG. 3 is a flow chart showing steps to achieve flow triggering and phase cycled machine synchronization;

(4) FIG. 4 is a graph of Measured Ventilation V(t) versus Gain G illustrating a symmetrical function for adjusting the servo-ventilator gain that is a function of the distance that the measured ventilation deviates from the target ventilation;

(5) FIG. 4A is a graph of relative ventilation error versus gain illustrating an asymmetrical function for adjusting the servo-ventilator gain that is a function of the distance that the measured ventilation deviates from the target ventilation;

(6) FIG. 5 is a flow chart illustrating steps in the delivery of pressure in accordance with a target alveolar ventilation; and

(7) FIG. 6 is a graph of a function for determining dead space as a function of tidal volume.

DETAILED DESCRIPTION

(8) In reference to FIG. 1, the ventilator relies on a servo-controlled loop for governing the operation of blower 2. The device includes a flow sensor 4f, pressure sensor 4p, a mask 6, and an air delivery conduit 8 for connection between the blower 2 and the mask 6. Exhaust gas is vented via exhaust 13. Mask flow may be measured using a pneumotachograph and differential pressure transducer to derive a flow signal F(t). Alternatively, the pneumotachograph may be replaced by a bundle of small tubes aligned in parallel with the flow from the blower with the pressure difference measured by the differential pressure transducer across the bundle. Mask pressure is preferably measured at a pressure tap using a pressure transducer to derive a pressure signal P.sub.mask(t). The pressure sensor 4f and flow sensor 4p have been shown only symbolically in FIG. 1 since those skilled in the art will understand how to measure flow and pressure. Flow F(t) and pressure P.sub.mask(t) signals are sent to a controller or microprocessor 15 to derive a pressure request signal P.sub.Request(t). The controller or processor includes integrated chips, a memory and/or other instruction or data storage medium to implement the control methodology described in more detail herein. Programmed instructions with the control methodology are either coded on integrated chips in the memory of the device or loaded as software.

(9) A. Pressure Delivery Synchronization—Triggering and Cycling

(10) One aspect of the invention involves patient ventilator synchronization. In the preferred device, synchronization is performed by a unique combination of two different respiratory cycle detection techniques that collectively result in superior synchronization. It has been found that a ventilator controlled by application of flow-based triggering in conjunction with phase-based cycling as described herein has a synergistic effect in terms of improved machine synchronization.

(11) In general, the ventilator delivers a higher pressure upon the detection of patient inspiration and a lower pressure during expiration. One simple form of the delivered pressure as cycled by the controller is as follows:

(12) TABLE-US-00001 P(t) = P.sub.O + A if inspiration is true P(t) = 0 if inspiration is not true (i.e. expiration)

(13) where:

(14) A=−G∫(V(t)−V.sub.TGT)dt

(15) 0≤A.sub.min≤A≤A.sub.max (chosen for safety and comfort)

(16) P.sub.O is an initial pressure, and

(17) G is a gain.

(18) While the above pressure formula will generally result in a higher pressure and a lower pressure during the inspiratory and expiratory portions of a respiratory cycle of a patient in a bi-level sense, those skilled in the art will recognize that the pressure changes may be ramped to provide more comfortable transitions from the higher to lower pressure or lower to higher pressure such that the ramping simulates a more natural respiratory airflow cycle.

(19) The steps in the methodology for triggering to the higher pressure and cycling to the lower pressure are listed in the flow chart of FIG. 2. In step 20, the current state of the machine is initialized to inspiration. In step 22, an instantaneous airflow is measured. In step 24, the patient's instantaneous phase is calculated. In step 26, the setting of the machine's state (inspiration or not inspiration) is based upon an evaluation of the airflow and instantaneous phase to determine the respiratory state of the patient. In step 28, the pressure is adjusted based upon the detected respiratory state. The steps repeat at a very high frequency relative to a normal respiratory cycle with the exception of the initialization step 20.

(20) With regard to steps 24 and 26, those skilled in the art will recognize an appropriate threshold and instantaneous flow measure suitable for detecting the onset of inspiration, which will also be adjusted to alleviate the effect of leak. As it relates to the calculation of instantaneous phase, the invention contemplates a continuous phase variable as disclosed in U.S. patent application Ser. No. 09/661,998 or U.S. Pat. No. 6,532,957. The instantaneous phase variable is calculated in a fuzzy logic process.

(21) More specifically, the device utilizes a respiratory airflow and preferably its rate of change. The degree of membership of the respiratory airflow signal in each of the fuzzy sets zero, positive, large positive, negative, and large negative is calculated using suitable membership functions. Similarly, the degree of membership of the derivative of the respiratory airflow signal in each of the fuzzy sets steady, increasing, increasing fast, decreasing and decreasing fast is calculated using suitable membership functions. The degrees of membership in these sets are used in a group of fuzzy logic inference rules. Each fuzzy inference rule is associated with a particular phase of respiration. Although many variations are possible, in the preferred embodiment the inference rules relating to respiratory airflow are as follows:

(22) 1. If the airflow is zero and increasing fast, then the phase is 0 revolutions.

(23) 2. If the airflow is large positive and steady, then the phase is 0.25 revolutions.

(24) 3. If the airflow is zero and falling fast, then the phase is 0.5 revolutions.

(25) 4. If the airflow is large negative and steady, then the phase is 0.75 revolutions.

(26) 5. If the airflow is zero and steady and the 5-second low-pass filtered absolute value of the respiratory airflow is large, then the phase is 0.9 revolutions.

(27) 6. If the airflow is positive and the phase is expiratory, then the phase is 0.1 revolutions.

(28) 7. If the airflow is negative and the phase is inspiratory, then the phase is 0.6 revolutions.

(29) 8. If the 5-second low-pass filtered absolute value of the respiratory airflow is small, then the phase in the respiratory cycle is increasing at a fixed rate equal to the patient's expected respiratory rate.

(30) 9. If the 5-second low-pass filtered absolute value of the respiratory airflow is large, then the phase in the respiratory cycle is increasing at a steady rate equal to the existing rate of change of phase, low-pass filtered with a time constant of 20 seconds.

(31) The general method for developing and using these fuzzy inference rules is described in U.S. patent application Ser. No. 08/935,785 or U.S. Pat. No. 6,532,957. Generally, various features, such as the point of start of inspiration, are identified on a graph of airflow versus phase, and for each phase corresponding fuzzy rules are developed. For example, a suitable rule for the point “start of inspiration” could be “effort signal is small and the second derivative of the effort signal with respect to time is large positive.” Membership functions, would cause that rule to be maximally activated at or near the start of inspiration. Preferably, the exact phase at the moment of maximal activation should be determined empirically. In the current example, the maximum activation will be at a phase shortly after the actual moment of start of inspiration, say 0.05 revolutions, and this is the best phase to associate with the rule. The more features that are identified and assigned a rule and a phase, the smoother will be the resultant determination of instantaneous phase. Additional rules may be supplied so that the phase will continue to rotate at an. expected respiratory rate in the presence of an apnea or leak. Sample rules 8 and 9 serve these purposes respectively.

(32) Each of the rules in the combined set of fuzzy inference rules will be evaluated to determine a degree of activation G(n) by using a standard fuzzy inference method. For example, with respect to rule 2, using one such method assuming a unit weighting of rules, if (a) the degree of truth for the membership function “the airflow is large positive” evaluates to 0.6 and (b) the degree of truth for the membership function “the airflow signal is steady” evaluates to 0.4, and a fuzzy logic “AND” operator is applied, then the degree of activation for G(2) would be 0.4.

(33) Additionally, each of the fuzzy inference rules associates a particular rule with a particular phase Φ(n). For example, as shown above, rule 2 is associated with Φ(2)=0.25 revolutions. Then, using the degree of activation G(n) for each Φ(n), a single value representing the instantaneous respiratory phase Φ is calculated in a defuzzification step using the formula:
Φ=arctan(Σ[G(n)sin Φ(n)],Σ[G(n)cos Φ(n)]).

(34) where the arctan function is a four-quadrant function, giving a phase of 0 in the unlikely event that both its arguments are zero. In the preferred embodiment, the instantaneous respiratory phase Φ is a continuous variable between 0 and 1 revolution, which proportionally represents a position within a singe respiratory cycle (starting at the beginning of inspiration (0) and ending at the conclusion of expiration (1)). Of course, those skilled in the art will recognize that the instantaneous respiratory phase can be represented by a different numerical range.

(35) As previously described, the delivered pressure is flow-triggered and phase cycled. This change in machine state is accomplished in step 26. One algorithm for achieving the invention is as follows:

(36) If (inspiration is true) and (instantaneous phase is greater than an instantaneous phase threshold), then:

(37) set Inspiration to false (i.e., expiration detected) Otherwise, if (inspiration is false) and (instantaneous airflow is greater than a flow threshold), then:

(38) set Inspiration to true (i.e., inspiration detected).

(39) The steps in such an algorithm are illustrated in the flow chart of FIG. 3. In step 30 the apparatus examines the current respiratory state. If the current state is inspiration, the instantaneous phase is compared to a phase threshold in step 32. The phase threshold in the preferred embodiment is 0.5 revolutions but would be different depending on the numerical range of the instantaneous phase as it has been associated with one compete respiratory cycle. A central number in the range that would represent the switching point between inspiration and expiration would be appropriate. In step 32, if the instantaneous phase is greater than the threshold, step 34 is executed, otherwise no change to the machine's state will occur. In step 34, the machine's state will be set to expiration.

(40) If the state is not inspiration in step 30, step 36 compares an instantaneous measured flow with an airflow threshold. If the flow is greater than the threshold, a change of machine state will occur in step 38, otherwise no change will occur. In step 38 the machine's state will be switched to inspiration.

(41) With this process, when the measure of the instantaneous flow exceeds the flow threshold while the machine is delivering an expiratory level of pressure, the machine will trigger the inspiratory pressure because the apparatus has effectively detected the onset of inspiration. Moreover, when the calculated instantaneous phase exceeds the phase threshold while the machine is delivering an inspiratory level of pressure, the machine will cycle to the expiratory pressure because the apparatus will have effectively detected the onset of expiration or otherwise detected a need to cycle to the onset of expiration.

(42) B. Controller Gain Varying with Ventilation Error

(43) In order to insure a proper ventilation of a patient in the presence of varying respiratory effort and patient condition, the pressure delivered P(t) during inspiration is set as a function of a target ventilation V.sub.target and actual ventilation V.sub.actual, by adjustment of amplitude A. With a feedback measure of ventilation V.sub.actual, the support is servo-controlled to satisfy the target ventilation V.sub.target. The calculation of the delivered pressure support amplitude A is as follows:
A=∫G(E(t)).Math.E(t)dt

(44) where E is a measure of ventilation error, such as absolute ventilation error:
E(t)=V.sub.target−V.sub.actual(t)

(45) or relative ventilation error, defined by

(46) E ( t ) = V target - V actual ( t ) V target

(47) It is trivially the case that for some function H
G(E(t)).Math.E(t)=H(E(t))

(48) The equation above is expressed in terms of G rather than H to indicate that in this integral servocontroller,

(49) dA dt
generally increases with E, but that this increase is modified by the factor G(E).

(50) Typically, when E is absolute ventilation error, a gain G of the integral servo-controller of a value in the range 0.1 to 0.3 cmH.sub.2O per L/min error in ventilation per second is suitable. However, in servo-controlling the level of ventilation around the target, rapidly and completely meeting the target is not always desirable or necessary. For example, in some short instances of moderate hypoventilation experienced by the patient (i.e., V.sub.actual falls below V.sub.target), it may not be desirable to make a complete and immediate compensation response to the ventilation shortfall. A more rapid or aggressive adjustment might arouse a sleeping patent or otherwise have an unsatisfactory impact on the synchronization of the machine with the patient. Such a change may also be less comfortable for the patient. Accordingly, in the preferred embodiment of the invention, the gain G varies depending on the amount by which the measure of ventilation deviates from the target. This permits a slower response to the error when a need for a change in delivered ventilation is detected for minor deviations from the target while also providing a more rapid response to the error for greater deviations from the target. In other words, the gain allows a patient to vary his ventilation around a target ventilation without an aggressive response if he does not stray too far. But if the ventilation does deviate from the target more significantly, a more aggressive response may be taken. Similarly, the gains may be distinct depending on whether the patient's ventilation is above or below the target so that the gain will allow the ventilation support to withdraw more gradually when the patient is over-ventilated since it might not be desirable to rapidly withdraw support that has recently increased as it might cause the patient to oscillate back into being under-ventilated, and the ventilation may appear to be above target because the leak has changed rapidly and the leak compensation system has not substantially compensated for this change.

(51) Various methods may be utilized to vary the gain as a function of the distance of the ventilation measure from the ventilation target. In one embodiment as illustrated by symmetrical step function 40 in the graph of FIG. 4, the gain G is a function of a threshold (T) 42. A higher gain per error is implemented for distances greater than the threshold and a lower gain per error for distances below the threshold. For example, the following algorithm can achieve this embodiment:

(52) TABLE-US-00002   If d<T then    G=Lower Gain per error Otherwise    G=Higher Gain per error
Where:

(53) d is the distance from the target |V.sub.actual−V.sub.target| and

(54) T is a threshold distance.

(55) For example, the typical gain servo of 0.3 cm H.sub.2O per L/min per error may be utilized as the higher gain per error and some fraction of higher gain per error would be appropriate for the lower gain per error (e.g., 0.2 cm H.sub.2O). In one embodiment, the threshold is a 1.0 liter per minute error where the ventilation measure and target ventilation are minute volumes.

(56) The function 44 is another example in which the gain is varied as a function of the distance of the ventilation measure from the ventilation target. This function is also symmetrical around the target but does not exhibit sharp changes in gain. Moreover, unlike the symmetrical response shown in the previous embodiment, the gain adjustment may also be implemented asymmetrically to permit different gain responses depending on whether the patient's measured ventilation is above or below the ventilation target. These principles are illustrated by the preferred function shown in the graph of FIG. 4A. Those skilled in the art will recognize how to implement the graphed function of relative ventilation error with a ventilator device as illustrated in FIG. 4A.

(57) As shown in FIG. 4A, as measured ventilation moves away from the target, the gain may be graduated to increase the ventilation response of the ventilator. However, different gains are applied below and above the target. For respiratory airflows that are above the target value the gains are less than the gains for corresponding respiratory airflows that are below the target value. Thus, for a patient hyperventilating with the relative ventilation error being in excess of 0.5, the gain will not exceed some intermediate gain, e.g., 0.1 cm H.sub.2O/(L/min)/sec., since a more aggressive response is not critical. Similarly, since a leak in the system will change the patient's measure of ventilation to make it appear that the patient is hyperventilating, an aggressive response may be incorrect. Conversely, when the patient is hypoventilating to a significant degree (e.g., a relative ventilation error of −0.3), a greater gain is utilized, e.g., 0.3 cm H.sub.2O/(L/min)/sec., since a more aggressive response is preferred. In the preferred embodiment, the measure of ventilation is a minute volume or minute ventilation; thus, the gain adjustment is a function of the relative minute ventilation error.

(58) When a gain which varies with error is used, the measure of ventilation used should preferably not change markedly during a breath. Using the measure of ventilation given in the above equation, namely, half the absolute value of respiratory airflow, the change in pressure support during the breath is the integral of the product of the gains and instantaneous errors for a range of ventilations, from a ventilation of zero at the transitions between inspiration and expiration to values of ventilation well above target ventilation at the times of peak inspiratory and expiratory flow (considering a typical breath when ventilation is at target). This works satisfactorily with a constant gain, since gain can then be taken outside the integral, as in the equation above. But with a gain varying with error, such a measure of ventilation which changes substantially during the breath would not allow the desired gain for the ventilation typical of that breath to be delivered; instead the gains for a wide range of ventilations would be traversed, and in particular that for maximum ventilation error would be applied every time the respiratory flow crossed zero. Hence it is necessary to low-pass filter half the absolute value of respiratory flow in order to calculate ventilation and ventilation error before determining the gain. A disadvantage of this low-pass filtering is a delay in the response to changes in ventilation.

(59) One way of using a well-filtered ventilation measure for much of the time but being able to respond to severe hypoventilation quickly is to use two measures of ventilation with different speeds of response. The more rapidly responding measure of ventilation (“fast ventilation”), which fluctuates somewhat during a breath, has no effect on pressure support unless it is moderately below target, from which point as fast ventilation decreases further the more slowly responding measure (“slow ventilation”) becomes progressively less important and fast ventilation becomes progressively more important in the calculation of pressure support, until a point is reached below which fast ventilation is the only determiner of pressure support.

(60) In particular, one implementation, using slow and fast relative ventilation errors E.sub.s and E.sub.f respectively, uses the following equation for the rate of change of pressure support amplitude A:

(61) dA dt = { G s E s , when E f < 0.3 G f E f when E f > 0.5 when 0.3 E f 0.5 α G s E s + ( 1 - α ) G f E f α = 0.5 - E f 0.2 , where

(62) Suitable gain values are G.sub.f=0.7 and G.sub.s=0.5 cm H.sub.2O/sec. (The pressure support amplitude A discussed above can be determined by integrating dA/dt.)

(63) C. Alveolar Ventilation Target

(64) Another aspect of the invention involves the control of the ventilator to maintain a ventilation target that more accurately corresponds to actual gas exchange in the patient's respiratory system. This aspect involves servo-control of a measure of alveolar ventilation. While the device as heretofore discussed may utilize a simple minute volume as the target ventilation, in this aspect of the invention the preferred target ventilation V.sub.TGT is an alveolar ventilation.

(65) FIG. 5 identifies steps in a methodology of servo-controlling the pressure to maintain alveolar ventilation. In an input step 50, a user is prompted to enter patient specific information necessary to assist with a calculation of an alveolar ventilation target for the patient. In step 52, an alveolar ventilation target is calculated. In step 54, a measure of alveolar ventilation is taken. In step 56, the measure and target are compared to derive an alveolar ventilation target error. In step 58, the pressure is adjusted based on the alveolar ventilation target error.

(66) In order for the device to control such a ventilation measure, an estimate of the patient's physiologic dead space V.sub.D (i.e., alveolar plus anatomical dead space) is required. In a simple embodiment, prior to the control of alveolar ventilation, as previously mentioned the user may be prompted to enter an estimate into the device in step 50. Thus, the user may enter alveolar volume V.sub.A or dead space volume V.sub.D determined from a prior analysis of the patient. V.sub.D may be determined by any known method for analyzing dead space such as by using Fowler's method or Bohr's method. The Fowler and Bohr methods for determining dead space volume are described by John B. West in Respiratory Physiology—the essentials 5.sup.th ed., Baltimore Md., Williams & Wilkins, 1995. Alternatively, V.sub.D may be a fixed volume or it may be a default volume if no other information is entered or calculated, for example, 150 ml.

(67) Alternatively, the device may estimate anatomical dead space volume from a table based on user responses to questions regarding the size of the patient. For example, prior to use, the device may prompt a user for height, age and sex. With this information, the device may access a table or tables with such information associated with ideal weights for such a user. With the determined ideal weight of such a patient, anatomical dead space may be estimated by allowing 2 ml of anatomical dead space volume for each 1 kg of ideal weight. As those skilled in the art will recognize, the table may contain the anatomical dead space based on age, height and sex rather than the weight based on the one-to-one approximation noted above. The ideal weights for patients based on age, height and sex are known in the art. In one embodiment, the device may prompt the user for the actual weight and anatomical dead space volume or it may be approximated therefrom based on the above formula. This weight may also be adjusted based on the patient's body mass, such as by entry of a body mass index (BMI) or a skin fold thickness. Those skilled in the art will recognize various ways for utilizing a table or other formula or calculation to approximate anatomical dead space volume from the size of the patient. In one embodiment, the above weight-related estimate of anatomical dead space may be taken as V.sub.D or the estimate for both the alveolar and anatomic dead space. Alternatively, a separate estimate for alveolar dead space may be made and combined with the anatomical dead space. Thus, additional prompting of the device may also provide an estimate of alveolar dead space V.sub.ALD that will be combined with the anatomical dead space V.sub.AND to serve as the estimate of total dead space volume V.sub.D (i.e., the physiological dead space [V.sub.D=V.sub.ALD+V.sub.AND]).

(68) In one embodiment of the invention, the dead space V.sub.D may be taken to be a function of the patient's expected tidal volume or a recently calculated tidal volume measured during the provision of treatment as follows: V.sub.D=F(V.sub.T). In such an embodiment, the function may be a fixed percent in a range of about 0.2 to 0.35 or roughly about 30% or about ⅓ of the tidal volume for normal patients at rest and higher for patients with a lung disease such as Chronic Obstructive Pulmonary Disease at rest. Given that certain patients with lung disease will have a greater degree of dead space than normal patients, in one embodiment the device may prompt input from a user to determine if the patient has a lung disease or COPD (for example, Emphysema or Chronic Bronchitis). The fixed percent may be set to a value at the higher end of the range for such patients, otherwise it will be set to the lower end of the range if the response is in the negative. Alternatively, an affine function based on tidal volume may be utilized to derive V.sub.D and, optionally this affine function may also depend on the disease condition of the patient as prompted by the device. For example, as illustrated in FIG. 6, an affine function 60 may be utilized as a function of tidal volume to determine dead space. Optionally, different functions may be selected depending on whether the patient suffers from COPD, or any such particular disease. Thus a specified volume offset 62 associated with the patient's disease or the alveolar dead space (V.sub.ALD) may be applied to the patient's function of tidal volume as illustrated in FIG. 6. In still another embodiment of the invention, the V.sub.D may be estimated with use of an electronically integrated monitor to measure arterial partial pressure carbon dioxide PCO.sub.2 or alternatively expired CO.sub.2 in the mask. The CO.sub.2 data may be utilized to derive an alveolar ventilation target during a learning period in accordance with Bohr's equation and then used for servo-controlling support to equal the target alveolar ventilation.

(69) As previously noted, the preferred target V.sub.target is an alveolar minute volume. During the calculation step 52 of FIG. 5, the device may be configured or programmed with the following formula to calculate alveolar minute volume target.
Alveolar minute volume(V.sub.alveolar-minute)=V.sub.A×R
where V.sub.A is the alveolar volume (V.sub.A=V.sub.T−V.sub.D) V.sub.T is the patient's expected tidal volume V.sub.D is the patient's dead space volume, and R is the patient's expected respiratory rate (breaths/min).
Alternatively, the target may be set as a function of this calculated V.sub.alveolar-minute. For example, the target may be set to 95% of this calculated V.sub.alveolar-minute.

(70) For purposes of the expected values utilized in this determination, in step 50 the device may also prompt for the entry of the patient's expected tidal volume V.sub.T and expected respiratory rate R. However, such patient specific information may be measured by the device during an awake learning period or calculated based upon the entry of some of the above-identified information. For example, the respiratory rate may be taken as a median respiratory rate over the last 75% of an awake learning period. Optionally, where the target calculation is based on measures taken from an awake learning period, such as the respiratory rate, the calculation of the target alveolar minute volume may be adjusted to account for respiratory differences associated with sleep as described in commonly owned U.S. Pat. No. 6,644,312, the disclosure of which is incorporated herein by reference.

(71) A mean alveolar ventilation during part of a learning period can be calculated as follows. For each breath, there is a tidal volume V.sub.T, and if there are N breaths over a time T and the alveolar tidal volume is given as a function of tidal volume by the function a (V.sub.T), then the mean alveolar ventilation is given by

(72) 1 T .Math. i = 1 N a ( V T , i )
But when a median alveolar ventilation is required, which is desirable in order to reject outliers and artifacts, a breathwise median is inappropriate since it gives the same weight to short breaths (typically lower in tidal volume) as to longer breaths, and so typically does not give the same result as mean ventilation in cases where it should, such as a distribution of alveolar ventilation with respect to time which is symmetrical with respect to the mean. This is undesirable. A timewise median is more desirable. Mathematically, a piecewise constant function of time is constructed by assigning to the time period of each breath the alveolar ventilation (alveolar volume divided by breath duration) during that breath, and calculating the median of this function. In practice, an approximation to this can be efficiently calculated by forming a histogram of alveolar ventilation. For each breath, the alveolar ventilation is calculated, and the corresponding entry in the histogram is incremented by an amount proportional to the duration of the breath. The median of the histogram is then calculated in the usual way.

(73) The measurement of the actual delivered alveolar ventilation V.sub.actual experienced by the patient in step 54 is based on the same formula as the target calculation with the exception that the tidal volume V.sub.T and the respiratory rate are recent measures preferably determined continuously from the measure of respiratory airflow from the patient. For example, the respiratory rate is the recent average respiratory rate or the number of breaths taken by the patient over the previous one-minute period. The tidal volume is the volume from the previous breath or average volume from the breaths taken during the previous one-minute period. Tidal volume may also be determined by dividing a measure of minute ventilation by respiratory frequency (V.sub.min/f.sub.resp). Preferably, minute ventilation can be derived by filtering half the absolute value of respiratory airflow with a fourth-order low pass Bessel filter with a time constant selected to achieve the minute average. The patient's dead space volume V.sub.D as entered may remain constant or vary as a function of tidal volume as described above.

(74) Alternatively, the actual delivered alveolar ventilation V.sub.alveolar (or the target based on expected values) may be calculated according to the formula:

(75) V alveolar = ( V total f resp - V D ) f resp
where: V.sub.total is a ventilation derived from airflow such as half the absolute value of respiratory airflow, low pass filtered with a corner frequency chosen to give a response appropriate for the application (for control, significantly faster than the servocontrolling response, to avoid oscillations; for target determination, possibly quite slow), V.sub.D is the dead space volume determined from any one of the methods previously described, and f.sub.resp is the respiratory frequency (breaths per minute) which may be calculated as the number of revolutions per minute of the instantaneous phase variable as described previously.

(76) The preferred method of calculating alveolar ventilation is as follows:

(77) Suppose that the alveolar volume delivered as a function of volume V inhaled above FRC (functional residual capacity, the lung volume at the end of expiration) is given by U(V). Then, both during inspiration and expiration, the following value is input to a lowpass filter whose output is the measure of alveolar ventilation:
½|Q|U′(∫.sub.t.sub.0.sup.t|Q|ds)

(78) where Q is respiratory flow as a function of time, the prime symbol indicates the derivative, and t.sub.0 is the time of the start of the most recent inspiration or expiration.

(79) Intuitively, the half the absolute value of respiratory flow is multiplied by the rate at which the alveolar volume is increasing, relative to volume. For the special case of excluding only the anatomical deadspace V.sub.DA from the calculated alveolar ventilation, this is equivalent to calculating the volume since the beginning of the most recent inspiration or expiration, and when this volume is less than the deadspace, making the input to the lowpass filter zero, and otherwise making the input equal to half the absolute value of respiratory flow. This is because here we have

(80) U ( V ) = { 0 , when 0 V V DA V - V DA , otherwise so that U ( V ) = { 0 , when 0 V V DA 1 , otherwise

(81) The advantages of using both inspiratory and expiratory flow in the calculation of ventilation, rather than either inspiratory or expiratory flow alone, include lower sensitivity to baseline error in flow, and a smoother filter output.

(82) Once the actual and target alveolar ventilations are determined, delivered pressure support amplitude A can be adjusted based upon the error, for example, as follows:
A=−G∫(V.sub.alveolar-minute(t)−V.sub.target)dt

(83) The delivered pressure is then set in accordance with the amplitude A as previously discussed.

(84) D. Decreasing Pressure Support Adjustment when Leak is Changing Rapidly.

(85) Rapid change in leak causes the respiratory flow baseline to be transiently incorrect, which almost always has the effect of making calculated ventilation higher than actual ventilation, with the result that pressure support is either inappropriately reduced, or increased more slowly than it should be.

(86) U.S. Pat. No. 6,532,957 mentioned above, by Berthon-Jones, describes one method of decreasing this effect, using a fuzzy quantity called “jamming”.

(87) In the present invention, to decrease this effect, a different fuzzy measure R, where 0≤R≤1, of the extent to which leak is changing rapidly, is used to decrease the rate of pressure support adjustment, by multiplying the rate of adjustment of pressure support amplitude

(88) dA dt ,
as calculated above, by 1-R. To calculate R, the estimated respiratory flow is processed with a lowpass filter having a peak hold tendency, producing an estimate L of residual leak (defined to be leak which is not compensated for) which typically responds more rapidly that the leak estimate does, and so warns that the leak estimate is incorrect, though by itself fluctuating too rapidly to be directly useful as a leak estimate for the purposes of calculation of respiratory flow. When the absolute value of L is small (for example, less than the target ventilation), R is 0; when the absolute value of L is large (for example, twice the target ventilation), R is 1; and in between, it is interpolated linearly.

(89) An implementation of the filter which produces L is as follows. The first stage is a 4-pole Bessel lowpass filter with a corner frequency of 3.2/60 Hz. The second stage is an instant-rise, variable time constant first order lowpass fall filter, where “rise” here means an increase in the direction of the previous output away from zero; so, for example, if the previous value of the output was negative, a “rise” means becoming more negative. A “fall” means movement towards zero. The time constant is longer when the flow is further from zero. Let the filtered respiratory flow (output of the first stage) relative to the target ventilation (both in the same flow units) be given by

(90) Q R = Q respiratory , filtered V target

(91) Then the fall rate constant (reciprocal of the fall time constant) in units of 1/sec is given by

(92) 1/0.5 when Q.sub.R≤0.75

(93) 1/5 when Q.sub.R≥2

(94) α/5+(1−α)/0.5 otherwise, where

(95) α = Q R - 0.75 1.25

(96) The purpose of the second stage is to cause the output of the second stage to be held closer to those values of the output of the first stage which are further away from zero. (The output of the first stage typically has the appearance of a sinusoid plus a slowly changing “DC” value.)

(97) This method of compensating for residual leak has the advantage over the “jamming” described in Berthon-Jones U.S. Pat. No. 6,532,957 in that it is able to detect residual leak which is not large enough to produce apparent inspiratory or expiratory periods much longer than normal (to produce these long periods generally requires a baseline shift large enough to make estimated respiratory flow positive throughout or during most of expiration, for example, in the case where leak has suddenly increased).

(98) Although the invention has been described with reference to various embodiments as described in this entire disclosure, it is to be understood that these embodiments are merely illustrative of an application of the various principles of the invention. Numerous modifications, in addition to the illustrative embodiments of the invention discussed herein, may be made and other arrangements may be devised without departing from the spirit and scope of the invention.