Artifact Detection and Data Reconciliation in Multivariate Ventilatory. Variables Measured During Anesthesia: a Case Study. Ping Yang , Guy Dumont ...
Artifact Detection and Data Reconciliation in Multivariate Ventilatory Variables Measured During Anesthesia: a Case Study Ping Yang∗ , Guy Dumont∗∗ , Yuan-Ting Zhang∗ , and J Mark Ansermino∗∗∗ Abstract— A ventilation system is usually connected to an anesthetized patient during surgery to replace or support normal respiratory function. Clinician experts monitor the concentration, flow and pressure of the various gases in the airway to maintain adequate ventilation. However, environmental disturbances often perturb the readings of these variables and cause them to deviate far from the true levels, resulting in a biased evaluation of a patient’s ventilatory status. Most of the previously proposed signal estimation methods, however, have only utilised the difference of the dynamic characteristics between artifacts and the true physiological variations in each individual variable, without considering the interrelationship between these signals. This has resulted in suboptimal signal estimation. In this paper, we propose the use of the procedure of gross error detection and data reconciliation commonly used in process control, to detect highly cross-correlated artifacts in the ventilation circuit and reconcile the uncontaminated signal measurements. A case study demonstrates that the proposed method has great potential for improving the reliability of ventilatory signals. Index Terms— Data reconciliation, Patient Monitoring, Ventilation management
I. I NTRODUCTION A ventilation system is usually connected to an anesthetized patient during surgery to replace or support normal respiratory function. Clinician experts monitor the concentration, flow and pressure of the various gases in the airway to maintain adequate ventilation. However, environmental disturbances often drive the readings of these variables to deviate from their true levels, resulting in a biased evaluation of a patient’s ventilatory status. Obtaining accurate estimates of the ventilatory variables is of great importance for intraoperative patient monitoring. The contamination of ventilatory variables comes from various sources. Airway interventions are the most frequent disturbances at the beginning of a surgery. Other causes include poor contact, disconnection, circuit leakage, accidental bending of the sampling tube, or occlusion caused by moisture or secretions [1]. In addition to these artifacts, This work was partly supported by the Young Scientists Fund of the National Science Foundation of China (Grant No. 61002002), National Basic Research Program 973 (Grant No. 2010CB732606) from Ministry of Science and Technology, China, and the Guangdong Innovation Team Fund (Low-cost Health Technology Innovative Team), China; Institute of Biomedical and Health Engineering, Shenzhen Institutes of Advanced Technology, Chinese Academy of Sciences, Shenzhen, China. Yuan-ting Zhang is also with the Joint Research Centre for Biomedical Engineering, Department of Electronic Engineering, The Chinese University of Hong Kong, Shatin, Hong Kong.∗ Department of Electrical and Computer Engineering, The University of British Columbia, Vancouver BC, CANADA∗∗ Department of Anesthesiology, Pharmacology & Therapeutics, The University of British Columbia, Vancouver BC, CANADA∗∗∗
Sidestream gas Patient
D-lite sensor P2
Fig. 1.
P1
Gas analyzer
Monitor
Flow meter
A typical ventilatory monitoring system
autonomic regulation and measurement noise also cause random fluctuations in the signals. Since these random fluctuations can be roughly seen as identically and independently distributed over time with the amplitude much smaller than the clinically relevant variations, the signals can still be recovered with good reliability. Artifacts, however, when they are present, often complicate the problem of signal estimation. Most artifacts in ventilatory variables are present as transient spikes or brief oscillations with the amplitudes numerically distant from the trend of the surrounding observations. However, some artifacts may smoothly merge into the trend of the variable and become hardly detectable by visual inspection. Artifacts must be detected and removed before signal estimation; otherwise, the signal estimates can be distorted. The structure of the airway monitoring system makes the ventilatory signals closely interrelated in many aspects. Figure 1 demonstrates a typical ventilatory monitoring system, where an airway adaptor (referred to as D-lite sensor, GE healthcare [2]) is mounted between the tracheal tube that inserts into the patient’s trachea and the Y piece that connects to an anesthesia machine. From the D-lite adaptor, a sidestream is drawn for content analysis, and the pressure at the two different openings 𝑃1 and 𝑃2 are transmitted to a differential pressure sensor for calculating gas pressure, flow and volume variables. The gas sampling tube is locked in a groove between the double pressure measurement tubing. This measurement circuit, together with the patient’s ventilatory system, constitutes a typical shared signal propagation pathway. In this pathway, artifacts presented in one variable often indicate increased possibility of artifact contamination in other variables. In addition, principles of gas exchange and metabolic gas use also dictate that the multivariate ventilatory variables must conform to certain rules in both the stable stage or during the varying phase. Both academic and industrial research communities have shown great interest in artifact removal in physiological signals [1]. Most of the previously proposed methods, how-
TABLE I V ENTILATORY VARIABLES Variable MVexp MVinsp TVexp RR(CO2 ) FeO2 EtCO2 FeAA FeN2 O FeN2 FiN2
Unit ml ml ml % % % % % %
Description End tidal minute volume Inspiratory minute volume End tidal volume Number of breath per minute from capnograph End tidal concentration of oxygen End tidal concentration of carbon dioxide End tidal concentration of anesthetic agent End tidal concentration of nitrous oxide End tidal concentration of nitrogen Inspiratory concentration of nitrogen
ever, only utilised the difference of dynamic characteristics between artifacts and the true physiological variations in each individual variable, without considering the interrelationship between these signals, resulting suboptimal signal estimation. In this paper, we propose using the prior knowledge about the interrelationship between the ventilatory variables monitored during anesthesia, as well as the dynamic characteristics of each variable, to detect artifacts and reconcile the data. A case study will demonstrate that the proposed method has great potential for improving the reliability of ventilatory signals. II. M ETHODOLOGY A. Prior Knowledge about the Ventilatory Variables Table I lists the ventilatory variables usually measured during anesthesia. At each sampling time, the measurement of a variable 𝑦𝑖 (𝑡), 𝑖 ∈ 1 . . . 𝑁 is the physiological level plus noise contamination, where 𝑁 is the total number of variables. The whole variable set is represented as 𝑌 : 1 × 𝑁 in the description below. There exists some prior knowledge about the variables’ static and dynamic properties, as well as the interrelationship between them. 1) Range: For each variable, there is a physiological range [𝑙𝑖 𝑢𝑖 ] that any valid reading should not exceed. 2) Stochastic dynamic model of the trend of each individual variable: The trends of the ventilatory variables may vary during anesthesia due to ventilation adjustment, change of the depth of anesthesia, or other clinical events. If the ventilation system works appropriately, these clinically relevant changes often follow quadratic linear curves and seldom exhibit abrupt patterns. This dynamic process can be described using an ARIMA(0,2,2) model [3], equivalent to: 𝑥𝑖 (𝑡) = (1 − 𝜆𝑖 )ˆ 𝑦𝑖 (𝑡−1) + 𝜆𝑖 𝑥𝑖 (𝑡−1) (1) 𝑦ˆ𝑖 (𝑡) = 𝑥𝑖 (𝑡)+𝜈𝑖 , 𝑖 ∈1 . . . 𝑁. In this model, at every moment, a signal prediction 𝑥𝑖 (𝑡) is calculated as the exponentially smoothed average of the historical data, and the random incremental amount 𝜈𝑖 accounts for the unknown trend changes that may occur during surgery. 𝜈𝑖 is often assumed to be independently and identically distributed and follow a Gaussian distribution with zero mean and a standard deviation of 𝛿𝑖 . For each variable, according to their dynamic properties, different model coefficients 𝜆𝑖 and 𝛿𝑖 are used in the model.
Given this model, comparing the difference between the signal measurement and the prediction, i.e., 𝑦𝑖 (𝑡) − 𝑥𝑖 (𝑡), with a testing threshold ℎ𝑖 at every moment can reveal the transient artifact in each variable. 3) Interrelationship between the ventilatory variables: The ventilatory variables listed in Table I follow the three equality relationships in below: 𝐻𝐼 : EtCO2 +FeO2 +FeAA+FeN2 O+FeN2 −1 = 0 𝐻𝐼𝐼 : FeN2 ×MVexp - FeN2 ×MVinsp = 0 𝐻𝐼𝐼𝐼 : MVexp - TVexp×RR(CO2 ) = 𝜀 Rule I means that the concentration fractions of all the exhaled gas contents should add up to one. Rule II depicts the fact that during the steady state the minute volume of inhaled N2 is equal to the expired, since N2 as an inert gas is neither taken up nor excreted by the lung. In Rule III, the exhaled minute volume measured by the flow meter should be equal to the exhaled volume per respiration multiplied by the respiratory rate measure from the gas analyzer; 𝜀 is introduced in Rule III to indicate that this relationship is susceptible to measurement uncertainty. It should be noted that, in some gas analyzers, nitrogen concentrations FiN2 and FeN2 are not directly measured but derived from other gas factions using Rule I. In this case, Rule I will no longer provide any measurement redundancy. Validating the measurements with these relationships can reveal artifacts. Substitute the measurements into Rule 𝑘. If the residual breaks the corresponding threshold 𝐻𝑘 , artifacts very likely have occurred in the variables involved in the corresponding equation. B. Artifact Detection The signal measurements are first tested against the aforementioned knowledge to detect artifacts. Since the artifacts in the ventilatory variables are closely correlated, the existence of artifacts in one variable often indicates the increased probability of artifact contamination in the remaining variables. Based on this, three possible thresholds 𝑐𝑖 3(𝑡)>𝑐𝑖 2(𝑡)>𝑐𝑖 1(𝑡) are calculated for each variable at every sampling time based on the physiological range as discussion in Section II-A.1 and dynamic constraints as in Section II-A.2. The signal value of the 𝑖th variable is compared with one of the thresholds according to the degree of measurement reliability suggested by the artifact detection results in the correlated variables. The switching process for the testing threshold 𝑐𝑖 (𝑡) for each variable is carried out in three steps: (1) Initialize the 𝑐𝑖 (𝑡) = 𝑐𝑖 3(𝑡). (2) The signal measurements are tested against the initial thresholds. If an artifact is detected in one variable, the thresholds for all the remaining variables are switched to 𝑐𝑖 2. (3) The signal measurements are tested against the inter-variable relationship as in Section II-A.3. If the measurements are found to deviate from one constraint, 𝑐𝑖 (𝑡) for all the variables related to this constraint are switched to the smallest thresholds 𝑐𝑖 1(𝑡).
C. Data Reconciliation The contaminated measurements detected in the previous step are discarded. Uncontaminated measurements are processed in the data reconciliation framework to derive reliable signal estimates. Data reconciliation (DR) is a technique commonly used in industrial processes to optimally adjust measured process data so that they are consistent with known constraints. The DR technique was initially used in steady state processes [4] , where signal values are only constrained to static structural relationships and admission conditions on the signal levels. The application of this technique was then extended to deterministic dynamic process, by adding constraints on the signals’ temporal evolution in the form of a dynamic model [5]. Unlike the industrial process, the intraoperative dynamics of the ventilatory variables are often stochastic processes. The following framework incorporates all the constraints discussed in Section II-A: ∑𝑁 𝑚𝑖𝑛 𝑦𝑖 (𝑡) − 𝑦𝑖 (𝑡))2 𝑠.𝑡. 𝑖=1 (ˆ ⎧ 𝑦ˆ𝑖 (𝑡) − 𝑥𝑖 (𝑡) = 𝜈𝑖 𝑖 ∈ 1 . . . 𝑁 (𝐷𝑦𝑛𝑎𝑚𝑖𝑐𝑠) ˆ 𝐻 ( 𝑌 ) = 0 (𝐼𝑛𝑡𝑒𝑟 − 𝑣𝑎𝑟𝑖𝑎𝑏𝑙𝑒 𝑟𝑢𝑙𝑒𝑠) ⎨ 𝐼 𝐻𝐼𝐼 (𝑌ˆ ) = 0 ˆ ⎩ 𝐻𝐼𝐼𝐼 (𝑌 ) = 𝜀 𝑙𝑖 ≤ 𝑦ˆ𝑖 (𝑡) ≤ 𝑢𝑖 𝑖 ∈ 1 . . . 𝑁. (𝑅𝑎𝑛𝑔𝑒) (2) The reconciled estimates 𝑦ˆ𝑖 (𝑡) are expected to minimize the mean squared error, and at the same time, fulfil the constraints on both the stochastic signal dynamics and intervariable relationship, and fall within the admissible range [𝑙𝑖 𝑢𝑖 ]. The factors 𝜈𝑖 and 𝜀 are incorporated to represent the uncertainty in the dynamic model and Rule III. DR is a constrained optimization problem, and in most cases it can be solved using a lagrange multiplier. The influence of the uncertain constraints are realized by adding penalty terms to the objective function [6], and then the term to be minimized in Equation (2) becomes: ∑ 𝑦𝑖 (𝑡) − 𝑦𝑖 (𝑡))2 +𝑤𝐻III (𝑌ˆ (𝑡))2 + Φ(𝑌ˆ , 𝑡) = ∑𝑖 (ˆ (3) 𝑦𝑖 (𝑡) − 𝑥𝑖 (𝑡))2 , 𝑖 𝑘𝑖 (ˆ where the penalty coefficients 𝑤 and 𝑘𝑖 , 𝑖 ∈ 1...𝑁 control the influence of the corresponding constraint on signal estimation according to the relative reliability of the constraints. The problem is now to optimize Φ(𝑌ˆ , 𝑡) subject to the deterministic constraints, as follows: 𝑚𝑖𝑛 Φ(𝑌ˆ , 𝑡) 𝑠.𝑡. ⎧ ⎨ 𝐻𝐼 (𝑌ˆ ) = 0 𝐻 (𝑌ˆ ) = 0 ⎩ 𝐼𝐼 𝑙𝑖 ≤ 𝑦ˆ𝑖 (𝑡) ≤ 𝑢𝑖
(4) 𝑖 ∈ 1...𝑁
A trust region sequential quadratic programming algorithm was used to realize this optimization process and obtain the signal estimates. III. C ASE S TUDY A case collected in a previous study following the ethics approval [7] is used to demonstrate the performance of the
proposed method. The case was collected at BC Children’s Hospital using a PC-based software tool (S/5 Collect GE Healthcare), at a sampling rate of 5 seconds. The DR process is realized in Matlab 7.0. In the example case (as shown in Figure 2), the ventilatory variables were heavily contaminated with transient artifacts. The signals were denoised using the proposed method, as well as with the use of a univariate filter. In the proposed method, the three thresholds for the level of each variable, 𝑐𝑖 3(𝑡)>𝑐𝑖 2(𝑡)>𝑐𝑖 1(𝑡), and the thresholds for the dynamic and inter-variable rules, 𝐻𝑘 , 𝑘 ∈ I...III and ℎ𝑖 , 𝑖 ∈ 1...𝑁 were all empirically set. In the univariate filter, the inter-variable constraints and cross-correlation between artifacts were ignored. At every sampling moment, only one threshold, 𝑐𝑖 3(𝑡) calculated as in the proposed multivariate method, was used on each variable for artifact detection. The results of the two methods are compared in Figure 2. Both methods successfully detected a significant amount of the artifacts. The proposed method appears to perform better than the univariate filter in regard to the overall smoothness of the estimates. For example, at around 𝑡=300 (ellipse A), some transient oscillations in TVexp remained in the univariate estimates, while these artifacts were successfully removed by using the proposed method and the reconciled estimates are more of a smooth extension of the historical data. At around 𝑡=180 (ellipse B), both methods removed the artifact in EtCO2 , but only the proposed method successfully detected the artifacts in FeO2 and FeN2 , by adjusting the thresholds to 𝑐2. Figure 3 displays the residuals of the Nitrogen balance (Rule II in Section II-A.3) calculated for the original measurements and for the signals denoised by the proposed method and the univariate method. The original signals deviate significantly from this constraint, and the signal estimates generated using the univariate method did not show obvious improvement in approximating this constraint. However, the signal estimates generated using the proposed method conform almost perfectly to the constraint of Nitrogen balance, indicating that the proposed method performs better in data reconciliation. IV. D ISCUSSION This example demonstrates the potential of the proposed method in detecting correlated artifacts in ventilatory variables and in deriving reliable signal estimates by using data reconciliation techniques. The use of inter-variable relationship can help reveal and rectify some artifacts that otherwise may be buried in signal trends and cause fault alarms. The proposed method should be tested on more clinical cases to tune the threshold settings and to further evaluate the performance of artifact detection. In future studies, the signal estimates should be compared with the signals’ true value to obtain a qualitative evaluation of the accuracy of signal estimation. There are two ways to acquire true physiological values: either though visual annotation performed by clinician evaluation, or recording