Automatic detection of AutoPEEP during controlled mechanical ventilation

Background Dynamic hyperinflation, hereafter called AutoPEEP (auto-positive end expiratory pressure) with some slight language abuse, is a frequent deleterious phenomenon in patients undergoing mechanical ventilation. Although not readily quantifiable, AutoPEEP can be recognized on the expiratory portion of the flow waveform. If expiratory flow does not return to zero before the next inspiration, AutoPEEP is present. This simple detection however requires the eye of an expert clinician at the patient’s bedside. An automatic detection of AutoPEEP should be helpful to optimize care. Methods In this paper, a platform for automatic detection of AutoPEEP based on the flow signal available on most of recent mechanical ventilators is introduced. The detection algorithms are developed on the basis of robust non-parametric hypothesis testings that require no prior information on the signal distribution. In particular, two detectors are proposed: one is based on SNT (Signal Norm Testing) and the other is an extension of SNT in the sequential framework. The performance assessment was carried out on a respiratory system analog and ex-vivo on various retrospectively acquired patient curves. Results The experiment results have shown that the proposed algorithm provides relevant AutoPEEP detection on both simulated and real data. The analysis of clinical data has shown that the proposed detectors can be used to automatically detect AutoPEEP with an accuracy of 93% and a recall (sensitivity) of 90%. Conclusions The proposed platform provides an automatic early detection of AutoPEEP. Such functionality can be integrated in the currently used mechanical ventilator for continuous monitoring of the patient-ventilator interface and, therefore, alleviate the clinician task.


Introduction
Mechanical ventilation is routinely used in the clinical ward and/or in nursing/ rehabilitation institutions. Unfortunately, imperfect interaction between patient and ventilator is frequently exhibited in intubated patients [1] and those undergoing non-invasive ventilation [2].
It has been demonstrated that the graphical curves (flow, airway pressure and air volume) available on most recent mechanical ventilators provide much information to http://www.biomedical-engineering-online.com/content /11/32 analyze the patient-ventilator interface [3]. By visually monitoring these curves, patientventilator mismatching can be observed and detected by the clinician. Various automatic detection algorithms either embedded in a ventilatory system to detect ineffective triggering and double triggering [4], or recently in a computerized monitoring system (BetterCare) to determine ineffective respiratory efforts during expiration [5] have been reported with positive results. However, to the best of our knowledge, the automatic detection of other types of ventilatory abnormalities, including AutoPEEP, has not yet been adequately considered.
This paper addresses automatic detection of AutoPEEP, a common ventilatory abnormality that usually occurs in patients with acute severe asthma or chronic obstructive pulmonary disease. The presence of AutoPEEP basically indicates an insufficient expiratory time. The amount of time given over to expiration therefore needs to be lengthened, either by reducing the respiration rate or by decreasing the inspiratory time, or both. AutoPEEP can be measured at the patient's bedside by using the pressure transducer of the ventilator. However, this quantification requires intervention from the therapist, who must perform an expiratory pause, in order to monitor tele-expiratory pressure [6]. On the contrary, although not readily quantifiable, AutoPEEP can easily be recognized on the expiratory portion of the flow waveform. If expiratory flow does not return to zero before the next inspiration, AutoPEEP is present. This detection however requires the eye of an expert clinician at the patient's bedside. Using flow signal as the input, an automatic detection of AutoPEEP (dynamic hyperinflation) due to either expiratory flow limitation and/or inappropriate ventilatory cycling should be helpful to optimize care. Our focus is thus early detection of AutoPEEP for continuous monitoring of the patient-ventilator interface. In what follows, AutoPEEP detection is performed by Signal Norm Testing (SNT) on the flow signal captured from the patient-ventilator interface. SNT involves testing the norm of a signal observed in noisy condition with respect to a certain tolerance fixed by users on the basis of their know-how and/or experience of the domain [7]. An extension of SNT in a sequential framework is also investigated. Other practical aspects, including phase change detection and parameter estimation are considered as well. The performance assessment is provided in three levels. First, the detection performance of the proposed detectors will be illustrated with data synthesized on computer. Then, further evaluation is performed on data derived from a respiratory system analog. Finally, an ex-vivo performance assessment on retrospective data acquired from patients is carried out.

Automatic detection of AutoPEEP and System overview
AutoPEEP can be visually observed and detected through flow signal. Figure 1 shows an example of flow signal with AutoPEEP captured during mechanical ventilation on a patient. Let f t be the clean flow signal. AutoPEEP can be regarded as the non-return of the flow signal at the end of each expiratory phase to the null value. In practice, during the observation of the air flow, various factors might get involved, including the mechanical vibration of the air tube, the patient movement, the electro-magnetic interference, etc. Therefore, the flow signal at the end of the expiratory phase will never be exactly zero, even in absence of noise. Testing directly the hypothesis f t k = 0, where t k is the endexpiration instant of the considered breath, might thus not be realistic. A tolerance τ > 0 http://www.biomedical-engineering-online.com/content/11/32 is then introduced to take into account possible distortions on the signal under consideration. Given τ , the problem is then the testing of f t k ≤ τ versus f t k > τ based on the flow signal observation in presence of noise. This tolerance τ is specified by the clinician. Its value is usually derived from his/her expertise of the domain. Other technical factors could also be taken into account, such as: the flow sensor precision, the dynamic range of the signal, etc. Multiple values of τ could also be employed to provide a semi-quantitative evaluation of persisted AutoPEEP on patient.
With respect to the discussion above, a platform for automatic detection of AutoPEEP based on a noisy observation of the flow signal can be developed. Figure 2 depicts such a platform. The main processing components include: the data acquisition and Serial/Parallel conversion, the phase-change detector, the estimator and the AutoPEEP detector. These components are briefly presented as follows before being detailed in the sequel.
Data acquisition and Serial/Parallel conversion This very-first module acquires the discrete flow signal y n provided by the ventilator or by an independent flow sensor For each end-expiration t k it detects, the Phase change detector triggers the data acquisition/conversion process. Based on observations Y k provided by the Data acquisition/conversion module and parameters p k ,σ given by the Estimator, the AutoPEEP Detector performs an optimal testing with respect to specified tolerance τ and level γ to decide whether or not an AutoPEEP is present. http://www.biomedical-engineering-online.com/content/11/32 installed inside the air-tube during the mechanical ventilation. Although every flow datum is acquired, only end-expiration flow data of each breath is useful for the detection of AutoPEEP. When the end-expiration instant t k of the k-th breath is provided by the phase change detector, the Data Acquisition and Serial/Parallel conversion module will log L samples at the end of the expiratory phase to form the observation vector Y k =[ y t k −L+1 , y t k −L+2 , . . . , y t k ] T for the k-th breath. This output observation vector Y k is finally injected into the AutoPEEP detector module.

Respiration phase change detection
The main role of this module is to detect the endexpiration of each breath and provide this instant to trigger the data logging process and the Serial/Parallel conversion described above. This can also be regarded as a breath detector, which separates the continuous flow signal into different breaths.
Estimator This module consists of two estimators, which estimate necessary parameters for the AutoPEEP detection algorithms. These parameters are the so-called waveform vector (p k for the k-th breath) and the noise standard deviation estimate (σ ). The waveform vector will be used to aggregate multi-samples at the end of the expiratory phase of a breath into a decision (cf. Section Single-breath detector), while the noise standard deviation estimate will be provided to adjust the AutoPEEP detector.

AutoPEEP detector
The AutoPEEP detector is the main core of the whole platform. Given a specified tolerance τ and the desired maximum false-alarm rate (level) γ , the AutoPEEP detector will decide whether an AutoPEEP is present or not for a given breath, on the basis of its observation Y k and estimated parameters p k ,σ .

AutoPEEP detectors
Given tolerance τ and observation y n of the noisy flow signal, the AutoPEEP detection is the testing of the null hypothesis |f t k | ≤ τ against the alternative one |f t k | > τ. The SNT (Signal Norm Testing) problem introduced in [7] provides such a test. In this section, two AutoPEEP detectors are proposed. One is based directly on SNT and takes each of the breaths into account independently. The other one is an extension of SNT in a sequential framework. The latter detector is developed under the assumption that the state (AutoPEEP/NON-AutoPEEP) of the patient-ventilator interface is regular and remains the same within a certain number of breaths. This assumption usually holds in practice.

Single-breath detector
Signal Norm Testing To begin with, let us consider the signal model: where θ is some unknown clean deterministic signal and z is its observation in noise. The additive noise x is assumed to be centered and gaussian with variance σ 2 x , i.e. x ∼ N (0, σ 2 x ). Given observation z, SNT is the problem of testing the composite hypothesis h 0 : |θ| ≤ τ versus its alternative h 1 : |θ| > τ.
In the sequel, a test T is any measurable map of R into {0, 1}. The value returned by T indicates the index of the accepted hypothesis. As in [8], the power function of test http://www.biomedical-engineering-online.com/content/11/32 T is defined as the probability that T rejects the null hypothesis h 0 , regardless of which hypothesis actually holds, i.e. (1) The size of T for testing h 0 : |θ| ≤ τ is defined as the least upper bound for the probability of false-alarm, i.e.
and its power is the value of β θ (T ) for θ such that |θ| > τ -in other words, the detection probability. In practice, it is expected to maximize the power of T for a given θ while restricting the false-alarm rate below some level γ (0 < γ < 1). This value γ is specified by the clinician with respect to the acceptable number of false-alarms during a period of time. For instance, a typical value of γ = 0.01 corresponds to an average of one false-alarm per 5 minutes with the usual frequency of 20 [breaths/min]. The UMP (Uniformly Most Powerful) test for the problem does not exist (cf. [8]). However, the problem is invariant to any sign change in θ. Therefore, it is natural that the test itself should also be invariant to sign changes -that is, T should be an even function. It follows from [7] that the UMP test among those even tests with size γ is: is the cumulative distribution of any standard normal random variable. Additionally, the test is UMPU (UMP unbiased) [7]. This thresholding test will be used for the detection of AutoPEEP, one of the most frequent abnormalities exhibited during mechanical ventilation.

Single-breath SNT-based AutoPEEP detector
Although the definition of AutoPEEP is based solely on the final sample of the expiratory phase of each breath, it is expected that taking multiple samples into account will improve the detection performance. By introducing the waveform vector, namely p k , with dimension L, one can aggregate L samples at the end of the expiration to carry out a single decision for the breath under consideration. Let Y k be the observation vector containing the last L samples of the expiratory phase of the k-th breath under consideration. Y k is modeled as: additive gaussian noise with standard deviation σ . Vector f k can be factorized as: is the waveform vector. It should be noted that p (k) L = 1. This vector p k corresponds to the local form of the flow signal near the end of the http://www.biomedical-engineering-online.com/content/11/32 expiratory phase. It is also worth mentioning that this local waveform vector p k depends mainly on the configuration of the interface, including the patient condition and the ventilator settings. As long as the interface stays unchanged, the waveform vector remains almost the same regardless whether or not an AutoPEEP might occur. In practice, either p k is known prior to the detection or it can be estimated from the observation using one of the methods proposed in Section Waveform regression to compute p k . To aggregate L observed samples into one decision for the considered breath, Y k is projected onto the direction generated by p k . We thus have: By such proceeding, noise w k follows normal distribution with zero mean and variance σ 2 w = σ 2 / p k 2 . According to [9, Theorem 27.4, p. 362] and equation (14), it can be proved that, even when the original noise is not gaussian, the resulting noise w k tends to a normally distributed random variable, as long as L is large enough and the original noise samples are i.i.d (independent and identically distributed). In practice, the i.i.d condition can be significantly relaxed. The problem in (4) is the same as that in previous section, except that the noise level is reduced (σ w ≤ σ ). Moreover, no information on the correlation among samples of noise vector X k is required. The two hypotheses are unchanged: h 0 : |f t k | ≤ τ and h 1 : |f t k | > τ. The detection is thus carried out as follows. We decide that there is an is calculated as in (3). Otherwise, the considered breath is labeled with Non-AutoPEEP.
It should be noted that p k increases with respect to the number L of samples. The noise standard deviation σ w will thus decreases when more samples are taken into account. By reducing the noise standard deviation, the detection probability is improved while the false-alarm rate is still limited to the specified level γ . Theoretically, L is only limited by the length of expiratory phase. However, L must not be too long so that the local waveform vector can be considered stable and stays almost unchanged for a large number of breaths.

Sequential detector
SNT extension in sequential decision framework By using SNT, one can restrict the false-alarm rate to some value γ . It is has also been shown in [7] that the detection rate is lower-bounded by γ . Since γ is usually be very small, this bound is of poor interest. In this section, an extension of SNT in a sequential decision framework -namely, the Sequential SNT -is introduced to improve the detection rate while still limiting the false-alarm rate to the specified value γ . The main idea is to introduce two detection thresholds: one is calculated to restrict the false-alarm rate as described in Section Single-breath detector, whereas the other is obtained by exchanging the two hypotheses to limit the miss-detection rate. In particular, with the same notation as in Section Single-breath detector, we take both the from-above testing problem considered in Section Single-breath detector: 5) http://www.biomedical-engineering-online.com/content/11/32 and the from-below one: As aforementioned, the test: T λ * γ is called the thresholding test from above with threshold height λ * γ . On the other hand, according to [7], the UMP (Uniformly Most Powerful) test with size γ for problem (6) also exists and is the thresholding test from below with threshold height λ * We also have: For γ < 0.5, it follows from [7] that λ * 1−γ < λ * γ . It is also worth mentioning that γ is usually set to be small. In practice, γ = 0.001, 0.005, 0.01, 0.05 are typical values. Using both λ * γ and λ * 1−γ , let us consider the test: for testing the hypothesis h 0 : |θ| ≤ τ against the alternative one h 1 : |θ| > τ. It is inherited from (7) and (8) that, once the decision has been made by (9), the probability of false-alarm (P FA ) is limited to the specified value γ (i.e. P FA < γ ) and the detection probability (P D ) is guaranteed to be higher than 1 − γ (i.e. P D > 1 − γ ). In a sequential framework, the test T * (z) is firstly carried out to attempt a decision based on current observation z. If T * (z) returns 1 or 0 then the decision is made. The value returned by T * (z) is the index of the accepted hypothesis. Otherwise, the decision cannot be made yet since current observation z does not provide enough evidence to either accept or reject any of the two hypotheses. More data are required. The decision is then postponed until enough evidence has been collected. For AutoPEEP detection, the process is detailed below. http://www.biomedical-engineering-online.com/content/11/32

Sequential SNT-based AutoPEEP detector
Let us consider K consecutive breaths. Using the same aggregation scheme as in Section Single-breath detector for each breath, we have: and w k iid ∼ N (0, σ 2 w ). By averaging over the K breaths, we obtain: where: It is worth mentioning that w 1: is strictly decreasing with the number K of breaths used.
Assuming that the true hypothesis (AutoPEEP/NON-AutoPEEP) remains the same for K consecutive breaths, the AutoPEEP detection for these breaths amounts to determining whether or not the average end-expiration flow f t 1:K exceeds the specified tolerance τ . Given level γ , the from-above test for this problem is: for testing h 0 : |f t 1:K | ≤ τ against h 1 : |f t 1:K | > τ and the from-below test is: The two associated thresholds are thus: and λ ( ) Summarizing, in a sequential decision framework, the AutoPEEP detection is carried out as follows. Firstly, the detector tries to make a decision based solely on the observation of the first breath, using the test: If the decision cannot be made yet (i.e. λ ( ) 1:1 ≤ |u 1:1 | ≤ λ (h) 1:1 ), it will be delayed until the next observation (i.e. u 2 ) is obtained and the test is performed based on u 1:2 using T * (u 1:2 ). If the decision still cannot be performed, it will be delayed again until the next observation, where the test T * (u 1:3 ) is used. The process is iterated until the decision is made. Then the process is restarted for a new sequence of observations. As shown in Figure 3, both λ (h) 1:K and λ ( ) 1:K tend to tolerance τ when σ w,K → 0 (the proof will be carried out in a future work which covers all theoretical aspects of Sequential http://www.biomedical-engineering-online.com/content/11/32 SNT). It should also be noted that σ w,K −→ K→∞ 0. Therefore, it could be expected that the probability to make a decision is one when K → ∞. However, if K is too high, the assumption that the same state remains for the considered K consecutive breaths might no longer hold. Moreover, a high number of breaths to be acquired may yield an unacceptable delay-to-decision. One simple solution is then to limit the number of breaths to some value M. If M breaths have been observed but no decision has been made, a hard decision is then performed. To assure the false-alarm rate, threshold λ (h) 1:M is used. The hard decision is carried out by: The value M must be chosen so that the assumption mentioned above holds valid and the delay-to-decision is still in an acceptable range. In our experimental settings, we use M = 10, which corresponds to about 30 seconds of observation in the usual case with a breathing frequency of 20 [breaths/min].

Phase change detection
Since the detection is performed on the basis of the flow samples at the end of the expiratory phase of each breath, it is required that the end-expirations are precisely retrieved. As aforementioned, the main role of the Phase change detection/segmentation block is to provide a detection of the end-expiration for each breath. This can be achieved by detecting the change in flow signal y n from the expiratory phase of the current breath (negative values) to the inspiratory phase of the next breath (positive values) (c.f. Figure 1). As long http://www.biomedical-engineering-online.com/content/11/32 as the distortion of the signal caused by noise gets involved and may bias the detection, a smoothed version of the signal can be used. To be simple, the moving average smoothing (SMA) method can be considered: where 2h + 1 is the length of the moving window.
Since the wavelet transform is a powerful processing tool to retrieve irregularities in a signal, it can be used to carry out the detection of change from the expiratory phase of a breath to the inspiratory phase of the next one. The wavelet transform is applied on either the flow signal y n on its smoothed versionȳ n . End-expirations are actually negative peaks in the detail coefficients (high band). Figure 4 shows an example of these peaks. In this example, the discrete stationary wavelet transform was used and the number of wavelet decomposition levels was set to K = 3.
The end-expiration detection is performed by thresholding these peaks in the detail bands of the wavelet transform coefficients. Let us consider the level-2 detail band for instance. This detail band signal is composed of noise and peaks, which represent the irregularities in the original flow signal. Since the flow signal is supposed to be in independent additive gaussian noise and since the wavelet transform is linear, the noise in detail band is also gaussian. Therefore, each coefficient in the detail band can be modeled as y D = f D + x D , where f D is a signal coefficient and x D is gaussian noise. Let σ D be the standard deviation of this noise and let N be the number of coefficients. It was shown in [10][11][12] that the universal threshold: λ u (N) = σ D √ 2lnN can be interpreted as the noise maximum absolute value when N is large enough. This threshold λ u (N) can also be thought of as the minimum absolute value of the signal (cf. [13]). Therefore, the problem amounts to testing the peak absolute value with respect to λ u (N). This is, once again, a SNT problem in the sense given by [7] and Section Single-breath detector. The peaks in the detail band can thus be detected using the test: is defined as in Section Single-breath detector. Level γ is set to be very small, for example γ = 10 −4 , 10 −5 , 10 −7 , etc. Since a peak is only one point, the results of the thresholding test should be postprocessed in such a way that consecutive 1s are removed. In particular, in case of consecutive decisions equal to 1, only the first one will be kept. End-expirations are negative peaks. As long as noise standard deviation σ D is concerned, it can be estimated using the same methods as those described in Section Estimation of the noise standard deviation. Figure 5 gives a typical result of the end-expiration detection obtained by proceeding as described above.

Estimation
As aforementioned, some estimations have to be made prior to the AutoPEEP detection, including: the waveform vector (p k ) and the standard deviation of the unknown noise. In the following, these two estimations will be addressed.

Waveform regression to compute p k
With regard to Section Single-breath detector, the waveform vector p k is the key which makes it possible to aggregate multiple end-expiration flow samples into one decision. This vector p k can be calculated from the regression of the flow signal at the end of the expiration. Indeed, during the expiratory phase of a breath, the mechanical ventilation system works based solely on the passive response of the patient lung. Due to the resistance of the airways and the elasticity of human lung, the flow signal during the expiratory phase of a breath can be modeled by: with φ > 0 and μ > 0, even in presence of AutoPEEP. This model is used to estimate the referenced waveform at the end of the expiration using a nonlinear robust regression method. Given a set of N data points {(t i , y(t i )), i = 1..N} where y(t i ) is the observation at instant t i , the non-linear robust regression aims at solving the least square problem: where the introduction of weight vector [ ξ 1 , ξ 2 , .., ξ N ] makes it possible to reduce the influence of outliers onto the final result. The MATLAB routine nlinfit performs such a regression task. This routine uses a weighted version of the Levenberg-Marquardt algorithm [14] to solve the non-linear least squares problem (13). The weights are iteratively updated with respect to corresponding residues |y(t i ) − (C − φe −μt i )|, i = 1..n to downweight the outliers and therefore reduce their effects on the final regression curve. Figure 6 shows an example of the flow signal at the end of the expiratory phase and the regression resulting from the aforementioned non-linear robust method. The signal is shown to be well-fitted by the model function (12).
Even though only L samples are required to calculate the L-dimensional vector p k , more samples should be used to achieve a better regression curve. Let L ext (L ext ≥ L) be the number of samples to be used. L ext is only limited by the length, namely T e (in samples), of the expiratory phase, i.e. L ext ≤ T e . Regarding the transition between different respiratory phases, samples at the beginning of the expiration are very sensitive to transition and may bias the regression. Therefore, only a proportion of the T e samples of the expiratory phase should be taken into account: where 0 < α < 1 is the proportion and . is the floor function. Proportion α must be chosen so that L ext = αT e ≥ L. Additionally, to avoid the border effect, one might http://www.biomedical-engineering-online.com/content/11/32 consider the weighted regression with a weighting scheme that puts more weight on the middle samples than on the side ones. Figure 7a shows the regression on end-expiration samples of a flow signal recorded from a patient. In this example, α is set to 0.75 to avoid the transition effects at the beginning of the expiratory phase. Since it is not so crucial in the situation experienced in this work, an unweighted regression was employed. Given the regression at the end of expiration, namely [ŷ t k −L ext +1 ,ŷ t k −L ext +2 , . . . ,ŷ t k ], the last L values are used to calculate the estimatep k for the considered breath: According to Section Single-breath detector, waveform vector p k concerns the current (k-th) breath. However, as aforementioned, this waveform vector does not vary much. It is then sensible to use estimates from previous breaths so as to improve the estimation of p k . In this respect, the following strategies can be considered to compute the waveform vector estimate to be used in AutoPEEP detectors: This waveform vector will be updated each time the machine is tuned or after a verification session by the clinician. One may also want to update the estimation on a regular time basis. Dynamic waveform vector: The waveform vector to be used is the one estimated from the current breath: Adaptive waveform vector: In this strategy, the waveform vector is updated every time a new breath is observed. Previous estimates are taken into account with a forgetting factor μ such that 0 < μ < 1:

Estimation of the noise standard deviation
Noise is unknown in practice. As long as the noise standard deviation in concerned, it must be estimated from the observation. In this work, we propose two solutions: one based directly on the result obtained by waveform regression, whereas the other is based on an estimation from the wavelet coefficients of the flow signal.

Estimate from regression
By using the regression, the residue can be considered as noise. Therefore, the noise standard deviation can be estimated directly from this residue. For the k-th breath, we have: y i −ŷ i 2 http://www.biomedical-engineering-online.com/content/11/32 To aggregateσ fromσ k , the same strategies as those proposed for the waveform vector can be considered.

Estimation from wavelet coefficients
Studies on nonparametric estimation based on Wavelet Shrinkage have shown that most of the wavelet coefficients obtained from the first level wavelet decomposition of a piecewise smooth signal are of very small amplitude. Only a small number of these wavelet coefficients, which correspond to signal, are of higher amplitude [12]. This fact allows the use of robust estimators on the wavelet coefficients to provide noise estimation. One can consider the MAD (median absolute deviation) [15,16] to accomplish such a task. The method is usual [12,15,16] and we recall it for readiness sake. Let c 1 , c 2 , . . . c N be the wavelet coefficients obtained from the first level discrete wavelet decomposition of an N-sample segment of the flow signal y. The estimateσ MAD of σ is then provided by: Since the noise is central, white and gaussian, the formula is simplified to:σ In [17], another robust estimator was proposed, namely the d-dimensional adaptive trimming estimator (DATE). The method is summarized as follows. Let c (1) , c (2) , . . . , c (N) be sequence of wavelet coefficients c 1 , c 2 , . . . c N sorted by increasing magnitude. Put It has been shown in [17] that this estimator outperforms the MAD when the number of outliers increases. The DATE can thus be employed as an alternative to the MAD mentioned above in such situation. For the cases considered in this work, because the number of large wavelet coefficients pertaining to signal remains small, the two estimators yield similar performance. The MAD estimator is thus adopted for its lower complexity and higher rapidity.

Simulations
To illustrate the detection performance of the proposed algorithms, the flow signal was first synthesized on computer. For each breath, L end-expiration samples were generated. The waveform vector was supposed to be known and set to p k = p =[ 1, 1, . . . , 1] T . It is worth mentioning that, by construction, |p 1 | ≥ |p 2 | ≥ . . . ≥ |p L | = 1 and, as a result, . The equality happens when and only when p i = 1 for all i = 1..L. http://www.biomedical-engineering-online.com/content/11/32 With regard to noise level σ w , by setting p k = p =[ 1, 1, . . . , 1] T , we considered the worst case where p k 2 = L and σ w = σ √ L . For sequential SNT-based detector, M was set to 10 [breaths], which corresponds to about 30 seconds of observation. The tolerance was empirically set to τ = 2 [l/min] by clinician. The values of f t k were randomly and uniformly generated between 0 and − τ 1−π , where π is the proportion of positive cases (AutoPEEP). Since the false-alarm rate P FA is always restricted to the specified value γ , it is more meaningful to plot the detection rate P D versus different values of π, namely the detection curve, than to present the usual ROC (Receiver Operating Curve). Figure 8 shows detection curves for different noise levels and different values of L. The detection rate is significantly improved when more samples are aggregated. Of course, the lower the noise level, the better the detection. In this respect, the Sequential SNT-based detector also showed higher detection rate while still keeping the false-alarm rate below the specified value γ .

Emulations with a respiratory system analog
The proposed AutoPEEP detectors were also tested in a more realistic setting in which the interface between a ventilator and a lung model was established. In these experiments, the respiratory system analog was constituted by a G5 ventilator (Hamilton Medical, Bonaduz, Switzerland) connected to the ASL5000 computerized lung model (Ingmar Medical Ltd., Pittsburgh, PA, USA), making it possible to modify respiratory mechanics. Thirteen sets of parameters (cf. Table 1) for both the lung emulator and the ventilator, which correspond to various practical situations, were carried out. The tolerance τ = 2 [l/min] was employed again. With respect to this tolerance, among the 13 settings, 7 cases were reported as AutoPEEP and the other 6 cases were labeled as NON-AutoPEEP, thanks to an independent clinical analysis from the Intensive Care unit of Brest University Hospital, Brest, France. The detection was performed on the basis of the flow signal captured by the sensor integrated in the ASL5000 lung model. For each case, about 1.5 minute of the signal flow was recorded. The corresponding number of breaths varied from 13 to 34, depending on the setting. In total, 323 breaths were recorded. For both the proposed detectors, the dynamic waveform vector was employed for its simplicity. Level γ was set to 0.01. The detection results are reported in Table 1. All the 13 cases were successfully detected by the two proposed methods: the Single-breath SNT-based detector and the Sequential SNT-based detector. Moreover, in each case, all the breaths were precisely classified. No detection error was found among the 323 breaths analyzed.

Analysis of clinical data
For further evaluation, the AutoPEEP detectors were tested ex-vivo on various patient curves. These curves were retrospectively extracted from data files issued from the Medical Intensive Care Unit of Brest University Hospital, France and from the Institut Universitaire de Cardiologie et de Pneumologie de Québec, Canada. For each patient undergoing mechanical ventilation, the flow signal was recorded. All these data were then mixed up to form a unique dataset. In total, the final dataset contains 1998 breaths from 15 patients with different health conditions and different treatments. The parameters of the ventilator also varied depending on the situation. According to the retrospective aspect of the study and to the fact that the files were anonymized, the study was considered to be in accordance with French legislation by our local ethics committee. http://www.biomedical-engineering-online.com/content/11/32  The analysis was performed both manually by a set of experts and automatically by the proposed methods. On the one hand, each breath was carefully screened by two experts of the domain. They performed a dual analysis, separately, before confronting their points of view and delivering a final assessment of the data. For each breath of the dataset, their decision was then regarded as the ground-truth label (AutoPEEP/NON-AutoPEEP). On the other hand, the proposed detectors were used to predict the label of every breath of the dataset. The two analyses were carried out independently and anonymously. The results were then compared together to evaluate the detection performance of the proposed methods.
In these experiments, the tolerance was set to τ = 2 [l/min] as before. In this respect, the dataset includes 1383 breaths with AutoPEEP and 615 breaths with NON-AutoPEEP. The dataset is somehow unbalanced with the presence of AutoPEEP in 69% of the cases. For the proposed detectors, level γ was set to 0.01 as usual. Figure 7 presents a typical case with the regression at end-expiration and the corresponding detection. It can be seen that the detection algorithm can precisely reveal the true label for all the breaths.
To quantitatively assess the detection performance of the proposed methods, we considered four usual evaluation measures: Accuracy, Precision, Recall (Sensitivity) and Specificity. These measures are defined as follows: where: TP (resp. TN) is the number of true positives (resp. true negatives), defined as the number of breaths with (resp. without) AutoPEEP that are correctly predicted; FP (false positive) is the number of breaths without AutoPEEP that are falsely predicted as AutoPEEP, and FN (false negative) is the number of breath with AutoPEEP that are not detected. These four values TP, FP, TN, and FN form the so-call confusion matrix of the detection. In terms of the four aforementioned evaluation measures, the performance results for the two proposed detectors are reported in Table 2. The results show that both the detectors worked very well on patient data with an accuracy higher than 93%, a precision higher than 99%, a recall (sensitivity) higher than 90% and a specificity higher The experiments were carried out with τ = 2[l/min]. For both the detectors, the level was set to γ = 0.01, which corresponds to an average of 1 false-alarm per 5 minutes (with the usual breathing frequency of 20 [breaths/min]). http://www.biomedical-engineering-online.com/content/11/32 than 98%. For the considered dataset, the two proposed AutoPEEP detectors provided similar results. It is worth mentioning that, by reducing the noise impact, the Sequential SNT-based detector is aimed at improving the detection performance of the Single-breath detector in case the latter fails to reveal 'twilight region' AutoPEEP, i.e. AutoPEEP with an end-expiration flow value near the given tolerance τ . Thence, the higher the number of twilight-region AutoPEEPs in the dataset, the more significant the performance improvement can be observed. However, in the considered clinical dataset, the number of twilight region AutoPEEPs, which are also difficult for the clinician to analyze, was very limited. Therefore, no significant difference in detection performance could be seen. However, the use of the Sequential SNT-based detector is recommended for better performance and robustness.

Conclusion
To the best of our knowledge, this is the first work on the automatic detection of AutoPEEP for continuous monitoring of the patient-ventilator interface during controlled mechanical ventilation. With the introduction of the waveform vector to aggregate multiple samples into a unique decision, the SNT has been successfully applied to provide a good AutoPEEP detector. Finally, we have extended SNT in a sequential framework, namely Sequential SNT. The resulting sequential AutoPEEP detector has been shown to yield high detection performance. Besides, the proposed algorithms have very low complexity and require very little computational power. The platform can then be deployed as a real-time functional block. Although the algorithm is proposed for the detection of AutoPEEP during controlled mechanical ventilation, it could be extended to assisted mechanical ventilation and pressure support ventilation since the algorithm investigates the expiratory part of the flow curve, which mainly depends on characteristics of the patient rather than on the ventilatory settings and mode of ventilation. The platform may also be extended to the detection of other types of ventilatory abnormalities that are deviations of the observed signal from some reference. In this respect, other signals such as pressure and volume curves could also be taken into account.
For the present work, by using the retrospective data files with a double-blinded and dual expert analysis, we were able to assess whether the system automatic analysis was concordant with that of the experts. In the next validation step, continuous and prospective recordings of the curves will be carried out to get better insight into cases where any disagreement between the proposed system and the therapist might occur. Furthermore, it is also worth performing a semi-closed-loop analysis, in which the therapist supervises, validates the decisions yielded by the proposed platform and adjusts the ventilatory parameters to correct any possible abnormality.
The deviation detection approach proposed in this paper is very general and could be used in many other applications, including fault detection and structural health monitoring. A theoretical general approach in Sequential SNT should also be investigated.