## Abstract

A respiratory chamber is used for monitoring O_{2} consumption (V̇o_{2}), CO_{2} production (V̇co_{2}), and respiratory quotient (RQ) in humans, enabling long term (24-h) observation under free-living conditions. Computation of V̇o_{2} and V̇co_{2} is currently done by inversion of a mass balance equation, with no consideration of measurement errors and other uncertainties. To improve the accuracy of the results, a new mathematical model is suggested in the present study explicitly accounting for the presence of such uncertainties and error sources and enabling the use of optimal filtering methods. Experiments have been realized, injecting known gas quantities and estimating them using the proposed mathematical model and the Kalman-Bucy (KB) estimation method. The estimates obtained reproduce the known production rates much better than standard methods; in particular, the mean error when fitting the known production rates is 15.6 ± 0.9 vs. 186 ± 36 ml/min obtained using a conventional method. Experiments with 11 humans were carried out as well, where V̇o_{2} and V̇co_{2} were estimated. The variance of the estimation errors, produced by the KB method, appears relatively small and rapidly convergent. Spectral analysis is performed to assess the residual noise content in the estimates, revealing large improvement: 2.9 ± 0.8 vs. 3,440 ± 824 (ml/min)^{2} and 1.8 ± 0.5 vs. 2,057 ± 532 (ml/min)^{2}, respectively, for V̇o_{2} and V̇co_{2} estimates. Consequently, the accuracy of the computed RQ is also highly improved (0.3 × 10^{-4} vs. 800 × 10^{-4}). The presented study demonstrates the validity of the proposed model and the improvement in the results when using a KB estimation method to resolve it.

- indirect calorimetry
- respiratory gas exchange
- energy expenditure
- Kalman filter
- stochastic model

accurate monitoring of gas exchange [O_{2} consumption (V̇o_{2}) and CO_{2} production (V̇co_{2})] of a subject in health and disease is of large interest in medical research (4, 9, 17, 20–22). It enables the assessment of important physiological indexes, such as oxidation rate of energy substrate and energy expenditure (6, 7, 12). Although various instruments for indirect calorimetry exist, the respiratory chamber is the only one permitting continuous long-term monitoring (24 h) of patients, thus offering a unique opportunity to study important aspects of energy metabolism in humans practicing their daily life activities (sleeping, eating, physical activity, etc.). The precision of the measurements of respiratory gas becomes of crucial importance to obtain precise metabolic data, as for example, computation of respiratory quotient (RQ) (V̇co_{2}-to-V̇o_{2} ratio), which is very sensible to the accuracy of the V̇o_{2} estimates.

To estimate V̇o_{2} and V̇co_{2}, conventional methods divide the observation period into small subintervals. For each such subinterval, the following three steps are executed (1, 2, 5, 10–13, 16, 18): measurement phase, in which a series of measurements is collected at any generic subinterval; prefiltering phase, in which the accuracy of the measurements is improved by applying suitable filtering methods (arithmetic mean, cubic splines); and finally, computation phase, in which the prefiltered data are related to the problem unknowns (V̇o_{2} and V̇co_{2}) by a mass balance equation that is simply inverted to produce estimates of the unknown values. Some differences do exist between the standard methods regarding mainly the formulation of the mass balance equation, rising from different simplifying hypotheses used.

Estimates performed as indicated above are affected by several error sources: *1*) measurements are always corrupted by noise and, although prefiltering is applied, considerable residual error remains; *2*) the used mass balance equation is only an approximate representation of reality due to the simplifying hypotheses used; *3*) V̇co_{2} and V̇o_{2} are obtained by simple inversion of the mass balance equation, without applying any mechanism to limit the propagation of the errors introduced by *1* and *2*. The above error sources are always present in a real experimental setting and cannot be completely eliminated; therefore, it is of high importance to apply procedures and methods to minimize such negative effects.

The main goal of the present study is to propose adequate procedures to obtain more accurate and reliable estimates of the variables of interest (V̇o_{2}, V̇co_{2}, and, moreover, RQ). Furthermore, it is of interest to validate the proposed method with respect to conventional ones. To do so, the following points were studied: *1*) introduction of adequate stochastic model to describe the dynamics of gas exchange in a respiratory chamber and of the measurement processes; *2*) analysis of the proposed model and identification of the statistical parameters of the stochastic processes involved; *3*) use of the well-known Kalman-Bucy (KB) estimation method to realize online filtering and offline interpolation, thus producing accurate estimates of V̇o_{2} and V̇co_{2}; *4*) experimental validation of the proposed model and of the estimation procedure by processing the data obtained by simulated (known injected gas rates) and real (humans) gas exchange in the respiratory chamber. Furthermore, the results obtained by using the proposed method are compared with the ones obtained by applying a conventional method (18).

## METHODS

*The respiratory chamber.* The respiratory chamber, built in the Metabolism Unit, Catholic University, School of Medicine, Rome, Italy, has a volume of 23.62 m^{3}. It exchanges gas volumes with the external environment [input flow φ_{i} (l/min); output flow φ_{o} (l/min)] through two sole apertures by means of an adequate pump, mounted to the output aperture, creating a regular airflow. This φ_{o} is measured by a flowmeter generating an analog voltage output (0–10 V), directly proportional to the measured airflow (0–150 l/min). A certain portion (∼1 l/min) is directed to two gas analyzers (specified below), producing the fractions of oxygen and carbon dioxide in the sampled airflow.

The carbon dioxide concentration is measured by a 2% full scale (0–2%) infrared absorption analyzer (URAS 3G, Hartmann & Braun, Frankfurt, Germany), generating voltage output (2–10 V) directly proportional to the measured fraction (0–2%). The oxygen concentration is assessed by a 2% full scale (19–21%) paramagnetic analyzer (Magnos 4G, Hartmann & Braun), generating an analog voltage output (2–10 V) directly proportional to the measured fraction (19–21%). Both gas analyzers are operating with a precision of 0.02 volumetric percentages. The zero values of both analyzers were calibrated by allowing fresh air to flow through the sample and the reference lines simultaneously, whereas the span values were calibrated using commercially available gas mixtures (Rivoira, Torino, Italy). The composition of the gas mixture used to calibrate the O_{2} analyzer was 19.48% O_{2}-balance N_{2}. The composition of the gas mixture used to calibrate the CO_{2} analyzer was 1.5% CO_{2}-balance N_{2}. The calibration procedure is as specified by the manufacturers of the gas analyzer and was carried out at the beginning of each experimental session.

The three voltage signals (airflow, O_{2} fraction, and CO_{2} fraction) are sampled by a data-acquisition board (Keithley DAS-1601), mounted on a standard desktop. An adequate software realizes the necessary procedures to compute and memorize the sampled measurements at a preset sampling period. The memorized data is then used to compute the V̇o_{2} and the V̇co_{2} of the subjects in the respiratory chamber, using either the proposed method or the method reported in Ref. 18, which is a representative example of most conventional methods presented in the literature.

*A dynamic model for the gas exchange in the respiratory chamber.* The scope of this section is to derive a general simple mathematical model to describe the following phenomenon: a controlled volume is subject to an φ_{i}, an φ_{o}, and within it a source produces or consumes a gas *g* (see Fig. 1). This model is later used to describe both V̇co_{2} and V̇o_{2} by a subject in the respiratory chamber.

The following notation is introduced: c^{g}(*t*), the mean volumetric spatial fraction of *g* at time *t*; φ_{i}(*t*), flow rate of input fresh air at *t* (in l/min); , volumetric fraction of *g* at the φ_{i} at *t*; , volumetric fraction of *g* at the φ_{o} at *t*; φ_{o}(*t*), flow rate of output stale air at *t* (in l/min); *u ^{g}(t)*, gas production rate (positive or negative) at

*t*(in l/min); and [0,

*T*], the time interval describing the duration of the experiment, where

*t*represents a time instant within this interval.

With the above notation, the mass conservation principle allows the writing of the following fundamental equation 1 where V is volume, and the gas volumes and flows are expressed in stp conditions. The following simplifying hypotheses are now assumed.

*1*) The existence of an adequate ventilation system in the respiratory chamber allows us to assume that “a rapid mixing of respiratory gas with air occurs in the chamber” (explicit in Ref. 16 and implicit in all others); therefore 2

*2*) The concentration of the *g* in the φ_{i} is constant, with a value determined by its standard volumetric fraction in atmospheric air 3

*3*) The φ_{i} is equal to the φ_{o} and is perfectly measured by an adequate sensor 4 Defining now the difference in the volumetric fractions of the gas considered 5 and substituting *Eqs.* *2*, *3*, *4*, *5* in *Eq. 1* results in the following linear differential equation 6

Unfortunately, in real life, the hypotheses of *Eqs.* *2*, *3*, *4* are never perfectly fulfilled, and, as a consequence, the *right* side of *Eq. 6* is not exactly equal to the *left* side. To account for the latter, it is possible to add a corrective term, *w ^{m}*, denoted modeling error, resulting in 7 where

*w*describes the cumulative effect of all approximations introduced by the simplifying hypotheses above (inhomogenity of gas mixture, variation of standard gas fractions, variation of airflows, etc.). The value of this error at each time instant

^{m}*t*is not known; nevertheless, it can be well described by a stochastic variable, characterized by its statistical properties (expected value, variance, etc.).

*Equation 7*turns out to be a Stochastic Linear Differential Model of the phenomenon. A fundamental hypothesis that lies in the basis of this work is that the

*w*can be accurately described as a zero mean white Gaussian stationary random process. Such a process is completely defined by its variance, denoted by .

^{m}Next, a dynamic description of the gas production/consumption rate *u ^{g}* is proposed. A generic gas source having a constant production rate can be described by the simple model d/d

*t*[

*u*] = 0. If, on the other hand, the production rate varies in an unknown manner around a nominal value, the following simple stochastic model can be used 8 where

^{g}(t)*w*is a zero-mean white Gaussian random process, describing the variations in the production rate, i.e., the error in assuming a constant production/consumption rate. This random process is completely defined by its variance .

^{u}The model in *Eq. 8* is commonly referred to as random walk and, in this case, plays only a descriptive role and should not be interpreted as a model of the physiological phenomenon of the gas production. Because V̇o_{2} and V̇co_{2} are highly related processes, it is reasonable to assume similar temporal behavior (dynamic model), which implies the use of the same . The results obtained, presented in the sequel, further validate the use of this simple stochastic model and the parameters here defined.

To complete the mathematical modeling of gas exchange in the respiratory chamber, the measurement process has to be formulated as well. The available measurements are the differences in the volumetric fractions of the gas considered, as defined in *Eq. 5*, and are affected by an additive measurement noise ν (present in any real experimental setting) 9 where ν is a white Gaussian process, fully identified by its expected value and variance . *Equation 9* is widely referred to as the measurement equation.

Putting together *Eqs.* *7*, *8*, *9*, the complete model describing a typical experimental setting of the respiratory chamber can be obtained in a compact matrix form 10 where 11

The model in *Eq. 10* cannot be directly utilized due to the following reasons: *1*) measurements are not available on any time instant *t*, but only at certain discrete time instants *t*_{j} = *j*·Δ, *j* = 0, 1,..., *N*, where Δ is a constant sampling period and *N* is the number of measurements, *N* = *T*/Δ; *2*) the model is to be resolved using computer software, which is by nature a discrete time digital process.

To account for the above, the following discrete time model is used in the sequel 12 where 13

*Identification of model parameters.* To complete the exact model formulation, specifying the values of the following parameters is needed: , denoting the process noise covariance matrix; , denoting the measurement noise covariance matrix. Note that, because the measurement is a scalar, then ν is also a scalar, and its covariance matrix reduces simply to the noise variance.

The has been experimentally obtained by performing a set of measurements of a known constant volumetric fractions (specifically zero) and calculating the variance of the obtained measurements.

As far as and are concerned, the authors have assessed their values by performing the following data fitting procedure.

*1*) Three experiments were carried out in which gas was injected into the respiratory chamber at accurately measured rates. These gas inputs simulated a step-type phenomenon, starting with zero rates for 20 min and followed by some constant value (200 ml/min in *experiment A*, 120 ml/min in *experiments B* and *C*) during the subsequent 20 min. Gas fractions and airflows were measured with a sampling period of 5 s.

*2*) The gas production has been estimated by applying the KB methods using different values for within the interval (10^{-16}... 10^{-4}) (min^{-2}), and for within the interval (10^{-10}... 10^{2}) (l^{2}/min^{4}). The was fixed to the value derived experimentally as specified above.

*3*) The fitting error (mean of the absolute values of the instantaneous errors) when comparing the known gas inputs with their estimates was calculated for each variance pair ().

*4*) The selected values for and are the ones minimizing the fitting error.

*The KB estimation method.* The problem of estimating the state *x*(*j*) using the available measurements *y*(*j*)in *Eq. 12* turns out to be a linear Gaussian problem that can be solved by applying the KB estimation method. This is a well-known estimation procedure, which processes the measured data using rational criteria and accounts for the available a priori information regarding both the deterministic and the stochastic nature of the observed phenomena. The estimated state at time *j*Δ based on the set of measurements *y*(0)... *y*(*k*Δ) is denoted *x̂*(*j*|*k*). The larger the set of measurements, the more accurate becomes the estimate.

The KB procedure has an important theoretical property, being the Best Linear Unbiased Estimator, in the sense of minimizing the expected value of the squared estimation error. The estimation error is defined as the difference between the estimated and the true value, i.e., *ê*(*j*|*k*) = *x*(*j*) - *x̂*(*j*|*k*). The demonstration of this property is not straightforward; the interested reader is, therefore, referred to various texts, e.g., Refs. 3, 8, 19.

In general, the estimation problem can be resolved for the following three possibilities: *1*) *j* > *k*, prediction, where the time index of the estimate *j* is in the future of the available measurements; *2*) *j* = *k*, filtering, where the time index of the estimate is equal to that of the available measurements [this case is used for online (real-time) implementation]; and *3*) *j* < *k*, interpolation, where the time index of the estimate *j* is in the past of the available measurements, thus enabling the use of more information with respect to the other cases.

The KB method computes iteratively both the state estimate, *x̂*(*j*|*k*), and the covariance matrix of the estimation error 14

Application of the KB methods requires the specification of the covariance matrices describing the random processes used, i.e., Ψ_{w} = cov (*w*) and Ψ_{ν} = cov (ν). Furthermore, it is necessary to specify initial conditions for both the estimated state, *x̂*(*j* = 0), and the Ψ_{ê}, Ψ_{ê}(*j* = 0), the choice of which is not critical to the performance of the KB method because it is proved that, as the index *j* grows, the estimate becomes independent of this selection (8). According to the information available at the initial conditions of the experiments, the following values are used in this study: *1*) initial state, for the V̇o_{2} estimates and for the V̇co_{2} estimates , where the first component is the initial differential volumetric fraction (unitless) and the second is the initial gas production rate (in l/min); *2*) initial , where 0.1 is the variance associated with the gas fraction estimation error, thus dimensionless, and 1 is associated with the *u ^{g}* [therefore, in (l/min)

^{2}].

Various formulations of the above algorithms are known in literature. The appendix reports the formulation realized by the authors (3). In this study, the authors present the implementation of both interpolator (offline) and filter (online) versions of the KB method.

*Experimental validation.* Experimental validation is performed by two sets of experiments. The first set is realized by simulating gas production within the respiratory chamber, at accurately measured rates. Gas mixtures of known composition (20% CO_{2}-1% O_{2}-balance N_{2}) were injected into the respiratory chamber at an accurately measured flow rate. The goals of this procedure were to confirm and validate the ability of the proposed method to reproduce a good estimate of the known gas production. Three such experiments were carried out, starting with zero CO_{2} injection for 20 min followed by 20 min of a known level of CO_{2} gas (200 ml/min in *experiment A*; 120 ml/min in *experiment B*; 120 ml/min in *experiment C*), thus creating a step-type phenomenon, to be estimated by the proposed method. Flow and concentration measurements were performed at the frequency of 0.2 Hz.

The second set involves humans occupying the respiratory chamber. Eleven subjects (4 men and 7 women) were studied. None had diabetes mellitus or any endocrine disease. Their anthropometric characteristics are reported in Table 1. The nature and purpose of the investigations were explained to all subjects before they agreed to participate in the study, which followed the protocol guidelines of the Institutional Review Board. At the time of the examination, all of the subjects studied were on an “ad libitum” diet with the following average composition: 60% carbohydrates, 30% fat, and 10% proteins (at least 1 g protein/kg body wt). This dietary regimen was maintained for 1 wk before the study. The day preceding the experimental session, the patients entered the Energy Metabolism Research Unit in the fasted state. Each subject occupied the respiratory chamber for 24 h, practicing normal activity and also a physical exercise during 30 min, as specified below. Before the experiment, the subjects were allowed to practice walking on the motorized treadmill, until they were able to walk without holding on to the railings, to become familiar with the testing equipment. The physical exercise includes walking for 30 min at 10% grade and with a constant speed of 3 km/h. Flow and concentration measurements were performed at the frequency of 1 Hz and averaged over a 5-min period.

As previously stated, conventional methods all compute respiratory volumes by inverting a mass balance equation, similar to the one in *Eq. 6*. In this study, the estimates performed using the proposed method are compared with the ones obtained by applying the method in Ref. 18, based on the three phases described in the Introduction. Gas fraction measurements are collected over a certain time period (5 min with humans and 1 min for the experiments with simulated gas production) and prefiltered using arithmetical mean. The *u ^{g}* are then computed by solving the equations specified there (

*Eqs.*

*3*,

*4*,

*5*,

*6*in Ref. 18). Note that, when applying this method, prefiltering by averaging is needed, whereas, when applying the KB methods, no such prefiltering is required, and estimates are available with the same temporal resolution as the measurements.

*Analysis of the results.* Regarding the experiments with simulated gas production rates, it is possible to compare the estimates with this known input and to compute the instantaneous fitting error. The authors have chosen the mean of the absolute value of this fitting error as an index for the quality of the estimates.

Concerning humans, the true *u ^{g}* are unavailable for comparison. An alternative comparison approach makes use of the spectra of the estimates. The spectrum of a time series provides information with regard to its temporal behavior. Respiratory gas exchange, as a natural biological phenomenon, has a limited bandwidth; therefore, its spectrum should be concentrated on the lower frequencies and should tend to zero on high frequencies. The existence of high-frequency components in a computed spectrum denotes the presence of estimation errors. To quantify these noisy components, the area contained below the spectrum was calculated, starting from the frequency of 0.05 (min

^{-1}) (i.e., oscillation periods shorter than 20 min). The resulting area (signal power) is proportional to the power of the noisy content and has the dimension of the signal squared, dimensionless for the RQ case and squared milliliters per minute for the V̇o

_{2}and V̇co

_{2}.

*Statistics.* For the experiments with simulated gas production rate, the results are reported as means of the absolute values of the fitting error ± SE, whereas, for experiments with humans, the results are reported as means ± SE, computed over the 11 subjects.

## RESULTS

*Model parameters identification.* Statistical properties of ν are assessed by measurements of null gas fractions in the respiratory chamber, resulting in a zero-mean noise {*E*[ν(*t*)] = 0} and (unitless). As for Ψ_{w}, Fig. 2 describes the fitting error obtained when the computed estimate is compared to the known gas production rate. Those values are plotted vs. different values of the pair () used in the KB method. The minimizing values are and . Table 2 summarizes the values of all of the parameters used in the sequel.

*Experimental validation.* Results in terms of mean absolute fitting error with regard to the known inputs are presented in Table 3. Figure 3 shows the results of *experiment A*. The three subfigures plot the performance of the methods applied: KB interpolator, KB filter, and the conventional method (18). The known value of the gas production rate is plotted by a thin line. Note that KB estimates are available at the measurement sampling period (i.e., every 5 s), whereas the conventional method provides estimates every 60 s, due to the prefiltering performed.

As for experiments with humans, typical results of obtained estimates are portrayed in Fig. 4 (V̇o_{2} and V̇co_{2}) and in Fig. 5 (RQ). Figure 6 shows the mean power spectral density (computed over the 11 subjects) of the V̇o_{2} and V̇co_{2} estimates. Note that the spectra are almost identical, but at high frequencies the spectra of the KB estimates are clearly lower than the spectrum of the estimate by the standard method and are converging to zero. Figure 7 plots the results obtained by spectral analysis of the RQ estimates. Note that the units of the signal power are the square of the signal units over frequency units. Because the RQ is dimensionless, the resulting spectrum is quoted in minutes, whereas, for the gas rates, the spectra are in units of milliliters squared per minute. The time scale in Figs. 4, 5, 6, 7 refers to the experiment duration, where the initial time (*instant 0*) coincides with 0800.

Table 4 presents the high-frequency signal power (i.e., oscillatory components with periods shorter than 20 min) computed as the area of the spectra at high frequencies for the estimates performed by the three methods. These data are proportional to the residual noise content in the estimates. Figure 8 shows the temporal evolution of the Ψ_{ê} as produced iteratively by the KB filter algorithm.

## DISCUSSION

Methods presented in the literature to compute respiratory gas production/consumption of a subject in a respiratory chamber are all based on similar mass balance equations, relating the available observations (measurements of volumetric gas fractions, φ_{o}) with V̇o_{2} and V̇co_{2} (1, 2, 5, 10, 11–13, 16, 18). Some differences do exist between the standard methods, mainly regarding the formulation of the mass balance equation, rising from the different simplifying hypotheses used. Some authors (2, 18) address the problem of noise attenuation by applying certain prefiltering methods but do not explicitly consider the effects of measurement noise and other uncertainties. Heymsfield et al. (10) have formulated for the first time the problem using the terminology of dynamic systems theory, introducing the concepts of stochastic modeling, explicitly considering measurement noise and process noise, fundamental in real applications. However, no solution to the estimation problem was proposed based on those concepts.

In this paper, the authors propose a general stochastic mathematical model describing the dynamics of gas exchange within a controlled volume using an input-state-output approach. The used model is linear, and the stochastic variables describing the uncertainties are considered as zero mean white Gaussian processes, therefore formulating the problem as a Linear Quadratic Gaussian (LQG) problem. Different from Ref. 10, the *u ^{g}* (V̇o

_{2}and V̇co

_{2}) are treated as part of the system state, and, therefore, their estimation using the classic KB methods is made possible. As it is well known, the KB estimation method is optimal for such problems (LQG) in the sense of minimizing the expected value of the squared estimation error. The accuracy improvement is verified by the experimental validation performed in this study.

Optimal fitting of the known simulated gas production rates is achieved by using the model parameters reported in Table 2. The low value of points out that the modeling errors are negligible, thus implying that the stochastic modeling (*Eq. 7*) is very adequate for this class of problems (dynamics of gas exchange in a controlled volume) and that the assumed hypotheses are well satisfied. Regarding , its value describes the uncertainty in variations in the temporal evolution of the *u ^{g}* and should be, therefore, large enough to account for abrupt changes, e.g., the ones occurring at the beginning and ending of the physical exercise. One possible modification might be the use of a time-dependent ), in particular, considering large at the instants of beginning and ending of the physical exercise. Such modification requires the use of a priori information regarding these instants.

The experiments with simulated gas production rates are an important procedure to validate both the proposed model and the estimation method, because they offer a unique opportunity to compare the estimates of a variable with its true values. Clearly the results obtained by applying the proposed method are much better than those obtained by using the standard (see Table 3). Note in Fig. 3 the large variations in the standard method, due, in all probability, to the propagation of the measurement and model errors into the computation of the gas production. Contrarily, the KB estimates are much smoother, where KB interpolator performs better than the KB filter, as expected, and removes the delay in detecting the step phenomenon.

Moreover, the KB methods are not constrained regarding the time resolution, as it is possible to apply the KB method for any sampling period Δ. In fact, at the experiments with simulated gas production, the KB methods process the measurements at 5-s intervals, with no averaging (prefiltering) involved, whereas the conventional method (18) demands averaging of the measurements over some significant period (60 s, i.e., 12 samples). The KB methods produce estimates that are more accurate and with higher temporal resolution (5 s in the KB estimates vs. 60 s in the standard method).

Regarding experiments with humans, the measurement data were available already averaged over a 5-min period (prefiltered). In this case, the obtained results demonstrate that, by using the KB method, it is possible to further improve the estimates and to attenuate residual noise content that is not removed by the prefiltering process. Note in Figs. 4 and 5 that the standard method produces highly scattered estimates, making it hard to deduce the physiological condition of patients, whereas the ones obtained using the proposed methods are much smoother. Moreover, as it is well known, an acceptable range for RQ values is from 0.7 to 1.0. Clearly the estimates by the standard method fail to comply with this range, whereas the KB estimates generally meet this constraint.

The spectral analysis demonstrates that, at low frequencies, all spectra (by the different methods) are practically identical. Nevertheless, Fig. 6 clearly shows that the spectra of the standard method estimates do not go to zero on high frequencies (thus denoting high-noise content), whereas the spectra of the KB estimates do converge to zero on those frequencies. A similar and even more distinguished phenomenon is revealed by the spectra of the RQ in Fig. 7. Table 4 quantifies the noise contents, clearly visible in Figs. 6 and 7. The noise content in the estimates obtained by the standard method is two to three orders of magnitude larger than that obtained by the KB methods, thus confirming the superiority of the proposed method in the case of human patients as well. Although variations between different subjects are sometimes large, the superiority of the KB methods over the conventional method is, again, very clear.

Figure 8 plots the temporal evolution of the diagonal elements of the Ψ_{ê} (*Eq. A6*). These values are, in fact, online estimates of the accuracy of the estimation procedure. Note that this variance converges rapidly to a steady-state value, thus confirming the filter stability and its robustness with regard to the initial condition values. This fact indicates quasi-stationary behavior of the filter, resulting from the fact that the temporal variations in the matrix *H*(*j*) (*Eq. 13*) are negligible. In such case, it might be possible to use the steady-state version of the KB algorithm (the Wiener filter) and reduce the computational load, although in this study it was preferred to use the more general method.

In conclusion, a general mathematical model is presented, accurately describing gas exchange in a respiratory chamber. This model serves to estimate V̇o_{2} and V̇co_{2} by applying the KB methods, resulting in estimates highly superior to the ones obtained by conventional method in all cases studied. Computation of RQ, based on the obtained estimates, complies better with biological understanding of such phenomenon.

## APPENDIX: KB FILTER FORMULATION

Following the presentation in Ref. 3, the general LQG estimation problem can be solved by three sequential phases: *1*) single-step prediction, *2*) filtering, and *3*) interpolation.

*Single-step prediction.* A1 A2 A3 A4 With the use of initial conditions for the state *x̂*(*j* = 0) and the initial error covariance matrix, Ψ_{ê}(*j* = 0), as provided in methods.

*Filtering.* A5 A6

*Smoothing.* A7 A8 A9 The smoother problem is solved backward (from *j* = *k* to *j* = *1*), making use of the solution to the filtering problem, which, in turn, is based on the solution of the single-step prediction problem.

## Footnotes

The costs of publication of this article were defrayed in part by the payment of page charges. The article must therefore be hereby marked “

*advertisement*” in accordance with 18 U.S.C. Section 1734 solely to indicate this fact.

- Copyright © 2004 the American Physiological Society