Estimation of Instantaneous Gas Exchange in Flow-Through Respirometry Systems: A Modern Revision of Bartholomew's Z-Transform Method

Flow-through respirometry systems provide accurate measurement of gas exchange over long periods of time. However, these systems have limitations in tracking rapid changes. When an animal infuses a metabolic gas into the respirometry chamber in a short burst, diffusion and airflow in the chamber gradually alter the original signal before it arrives at the gas analyzer. For single or multiple bursts, the recorded signal is smeared or mixed, which may result in dramatically altered recordings compared to the emitted signal. Recovering the original metabolic signal is a difficult task because of the inherent ill conditioning problem. Here, we present two new methods to recover the fast dynamics of metabolic patterns from recorded data. We first re-derive the equations of the well-known Z-transform method (ZT method) to show the source of imprecision in this method. Then, we develop a new model of analysis for respirometry systems based on the experimentally determined impulse response, which is the response of the system to a very short unit input. As a result, we present a major modification of the ZT method (dubbed the ‘EZT method’) by using a new model for the impulse response, enhancing its precision to recover the true metabolic signals. The second method, the generalized Z-transform (GZT) method, was then developed by generalizing the EZT method; it can be applied to any flow-through respirometry system with any arbitrary impulse response. Experiments verified that the accuracy of recovering the true metabolic signals is significantly improved by the new methods. These new methods can be used more broadly for input estimation in variety of physiological systems.

known as the Z-transform method, to estimate instantaneous oxygen consumption (  from the fractional concentration of oxygen ( F E ) in the excurrent air stream from the respirometry chamber. This method assumes that after any changes in  V O 2 in an openflow respirometry system, F E changes exponentially to a new steady-state equilibrium value, F E eq . To accurately estimate  V O 2 , we require not only the current F E , but also the equilibrium value of the fractional concentration ( F E eq ) that would eventually be reached if there were no further change in  V O 2 . For any system with exponential washout behavior, such as a flow-through respirometry system, the rate of approach to the equilibrium point is constant and it can be determined as follows: and T is the measurement time interval. F E eq can be determined by combining these two equations: Therefore, F E eq can be calculated by two consequent measurement of F E .
The instantaneous change of oxygen in the chamber can be determined by using F E eq as follows [3]: where F is the flow rate and F I O 2 is the fractional concentration of oxygen in the inlet air (the change in the concentration of the gas), Equation S1-A4 changes to: (S1-A5) which is Equation 1 in the manuscript. As long as the washout is exponential, the same equations are valid for CO 2 or any other gases.

Appendix-C -Experimental determination of the impulse response
The impulse response, h(t), can be experimentally determined by injecting a short pulse of CO 2 into the chamber close to where the animal emits CO 2 . To obtain the impulse response precisely, two aspects of methodology should be considered carefully. First, the duration of the CO 2 pulse should be very small in comparison to the duration of the impulse response. The exact duration of the impulse is not critical, but it should be very small (based on experience, it should be less than 0.5% of the impulse response duration).
If the respirometry chamber is relatively large or the flow rate is relatively small, the pulse duration can be long. In those cases, it is possible to find the impulse response by manually blowing into the chamber. In a system with fast dynamics, i.e., one with a high flow rate and/or a small chamber, a high-speed valve is required to precisely control the duration of the injection. Second, the injection should not significantly affect the flow rate. If it changes the flow rate, then the system is no longer an LTI system. This means that the volumetric injection rate must also be negligible compared to volume flow rate the inlet airflow.
If these assumptions are met, the actual concentration and pattern of the gas injection used by the experimenter does not matter, because the measured impulse response will be not be affected (S1 Fig. 1). Here, we explain why this is true. Transforming the input to an output is an area-conservative process because all injected CO 2 molecules eventually pass through the IR chamber of the sensor. Therefore, by normalizing the output signal by dividing by its area, the output of the gas analyzer becomes independent of the shape of the input signal. To demonstrate this concept, a convolution of different short inputs with an impulse response has been computed in a simulation using Equation 7. The normalized outputs are very close to the true impulse response (S1 Fig. 1), even if the outputs are very different. We also tested this experimentally, by injecting different pulses of CO 2 with different durations into the 28 mL chamber, using with different pulse sizes (with flow rate of 125 mL/min). The results (S1 Figs. 1B and 1C) demonstrate the independence of the result and the shape of the short pulses. A Picospritzer microinjector (Picospritzer III, Parker Hannifin, Precision Fluidics Division, NH, US) was used to control the duration of the pulses. With the microinjector, the duration of the pulse can be ! 5 precisely controlled, but the flow rate depends on the pressure of the upstream flow. To provide an extreme condition, we changed the pressure of the CO 2 upstream (before the injection valve) for each pulse. The outputs of the respirometry system are different for each pulse, but as shown in S1 Fig. 1C, the normalized outputs that represent the impulse response are indeed identical.
This study showed that the expression adequately describes the impulse responses of small respirometry chambers. In this model, the parameter is not independent from the other two parameters. Because the area of the impulse response is one, can be determined to normalize the impulse response as follows: Fig. 1: The impulse response can be determined by injecting a short input. If the duration of the input is small compared to the duration of the impulse response, the normalized output signal (the impulse response) will be independent of the shape of the input signal.

Appendix-D -Derivation of the governing equation of the system using the impulse response
The Laplace-transformed form of the convolution equation of Equation 7 is: (S1-D1) where C(s), H(s), and U(s) are the Laplace transforms of c(t), h(t), and u(t), respectively.

Appendix-E -Robust differentiation of noisy data
Several methods can be used to differentiate noisy data and regulate the detrimental amplification of noise [5][6][7][8][9][10][11]. Here we used the low-noise Lanczos differentiator method, in which at each point, several neighboring points are used to calculate the derivative. For instance by using seven points, the derivative of a function f(x) at x * will be: (S1-E1) For derivations with a different number of points, see [10].

Appendix-F -Woakes' method
! After Bartholomew's paper introduced the Z-transform in 1981 [2], Woakes and Butler published another method to recover the instantaneous gas exchange signal in flowthrough respirometry systems in 1983 [12]. Although they derived their equations with different approaches, here we show that these two methods are actually identical. It is possible that Woakes and Butler were unaware of the Z-transform when they developed their version of the method.
In the appendix of their paper [12], Woakes and Butler provide the following equation for the volume of the produced CO 2 or consumed O 2 : where t 1 and t 2 are sampling times, C 1 and C 2 are the fractional concentrations of the gas in the outlet in respective times, V is the chamber volume, and ! Q is the flow rate (which is called F in our manuscript). In this method, it is assumed that the fractional concentration of the gas changes almost linearly from C 1 to C 2 during this interval. By dividing both sides of the equation by (t 2 − t 1 ) ! Q , which is the total inlet gas from t 1 to t 2 , we can find the instantaneous flow rate of the produced CO 2 or consumed O 2 during this interval. This quantity is named u in the main text: Note that

Appendix-G -MATLAB code !
A MATLAB code with sample experimental data is provided [13] (S2 file) to perform the GZT method on experimental data. Before using the method in an experiment, the calibration coefficients must be determined. CO 2 gas (or any other measurable gases) with an arbitrary pattern (u(t), S1 Fig. 2) should be injected into the respirometry chamber and the concentration of this gas in the outlet should be recorded (c(t), S1 Fig.   2). For this code, both signals should be saved in a text file with the name 'CalibrationData.txt', which contains three columns of data: time, the input signal u(t), and the output signal c(t). After running the code and selecting the calibration option, the code uses Equation 14 to determine the calibration coefficients and saves them in the 'Parameters_a.txt' file. After determining the calibration coefficients, the experimenter can now recover the instantaneous gas exchange data from their raw gas exchange data.
After collecting raw gas exchange data from the subject, the recorded data should be saved in a text file with the name of 'Data.txt', which should contain two columns: time, and concentration of the gas of interest in the outlet (Fig. 7). After running the code and choosing the signal recovery option, the code uses the raw data and the calibration coefficients the recover the instantaneous gas exchange signal (Fig. 7).