Abstract
Feedback on ventilation could help improve cardiopulmonary resuscitation quality and survival from out-of-hospital cardiac arrest (OHCA). However, current technology that monitors ventilation during OHCA is very limited. Thoracic impedance (TI) is sensitive to air volume changes in the lungs, allowing ventilations to be identified, but is affected by artifacts due to chest compressions and electrode motion. This study introduces a novel algorithm to identify ventilations in TI during continuous chest compressions in OHCA. Data from 367 OHCA patients were included, and 2551 one-minute TI segments were extracted. Concurrent capnography data were used to annotate 20724 ground truth ventilations for training and evaluation. A three-step procedure was applied to each TI segment: First, bidirectional static and adaptive filters were applied to remove compression artifacts. Then, fluctuations potentially due to ventilations were located and characterized. Finally, a recurrent neural network was used to discriminate ventilations from other spurious fluctuations. A quality control stage was also developed to anticipate segments where ventilation detection could be compromised. The algorithm was trained and tested using 5 -fold cross-validation, and outperformed previous solutions in the literature on the study dataset. The median (interquartile range, IQR) per-segment and per-patient -scores were 89.1 (70.8 – 99.6) and 84.1 (69.0 – 93.9), respectively. The quality control stage identified most low performance segments. For the 50% of segments with highest quality scores, the median persegment and per-patient -scores were 100.0 (90.9 – 100.0) and 94.3 (86.5 – 97.8). The proposed algorithm could allow reliable, quality-conditioned feedback on ventilation in the challenging scenario of continuous manual CPR in OHCA.
Index Terms—: Adaptive filter, cardiac arrest, cardiopulmonary resuscitation (CPR), quality control, recurrent neural network (RNN), thoracic impedance, ventilation
I. Introduction
OUT-of-hospital cardiac arrest (OHCA) is a major cause of death in industrialized countries. Emergency medical services (EMS) assess about 350,000 cases each year in the US alone, and survival rates to resuscitation efforts are mostly low, around or below 10% [1]. A patient in cardiac arrest loses spontaneous circulation and breathing, leading to death within minutes if not treated. High-quality cardiopulmonary resuscitation (CPR), consisting of chest compressions and ventilations, maintains a minimum flow of blood and oxygen, and is critical to improve survival from OHCA [2], [3]. Thus, considerable effort has been made to improve the overall quality of CPR. Resuscitation guidelines [4]-[6] are periodically updated with the latest evidence-based recommendations for CPR delivery. Supportive technologies have also been developed, such as portable accelerometers to estimate the depth of compressions [7], and many algorithms have been proposed to extract CPR information from different biomedical signals [8]-[10]. When integrated into field equipment, these solutions enable realtime feedback to the rescuer, improving adherence to guideline recommendations [11]. When used retrospectively, they facilitate the annotation and analysis of large OHCA registries for either quality programs or research [12]. However, most technical advances in CPR monitoring, analysis and feedback have focused on chest compressions. The importance of measuring ventilation during resuscitation is strongly supported by evidence [13], but current technology to monitor ventilation in OHCA is limited, and the optimal ventilation strategy remains unclear [14], [15].
Ventilation in OHCA is typically assessed using end-tidal capnography, which monitors the partial pressure of CO2 in exhaled gases [16], [17]. However, capnography is not usually available until late phases of resuscitation, once an advanced airway is placed, nor does it provide information on insufflated air volumes. Thoracic impedance (TI) is sensitive to air volume changes in the lungs, and has been extensively used to monitor respiratory events [18], [19]. Most basic defibrillators acquire TI along with the electrocardiogram through the defibrillation pads, making it one of the earliest signals available in OHCA. Thus, it could be used in a range of scenarios, from monitoring ventilations early during compression pauses [20], to fine-tuning capnogram readings after patient intubation [16]. Moreover, the amplitude of the TI fluctuations due to ventilations correlates with tidal volume [21] and, while patient-dependent, could offer insights on the effectiveness of ventilation [22].
Impedance-based ventilation detection can be challenging, though. Ventilatory waves may adopt a wide range of amplitudes and durations [23]. The signal itself is very sensitive to electrode motion [24], [25], frequent in ambulatory scenarios such as OHCA. Moreover, during late phases of resuscitation, ventilations are delivered continuously, concurrently with chest compressions; these produce a large artifact which has to be removed for a reliable ventilation detection. Current solutions include harsh static filtering [26], and adaptive filtering based on different compression reference signals, such as those from accelerometers [16], [23].
This study introduces a novel solution for impedance-based ventilation detection during continuous chest compressions in OHCA. Inspired by a previous work on mechanical CPR [27], this study proposes an algorithm for the more general case of rescuer-delivered CPR, where compression artifacts are far more irregular and motion noise levels larger than in mechanical. A preliminary version of this study has been reported [28]. The present work comprises more than twice as many OHCA cases, and improves on its performance by introducing bidirectional adaptive filtering and time-series classification. A signal quality control stage is also presented, which anticipates segments where ventilation detection could be compromised.
II. Data Sources and Preparation
Study data included the de-identified files from 367 OHCA patients treated by EMS between March 2016 and November 2017 in the Dallas - Fort Worth area (Texas, US), all enrolled in the Pragmatic Airway Resuscitation Trial (PART, NCT02419573) [29]. Data collection was approved under US federal rules for Exception From Informed Consent for emergency research (21 CFR 50.24). The files were acquired using a HeartStart MRx monitor-defibrillator (Philips Medical Systems, Andover, MA, US), and included TI, capnography, chest force, and chest acceleration recordings. TI was recorded with a sampling rate of 200 Hz and a resolution of 2.5 mΩ. The capnogram was acquired using Microstream (sidestream) technology, and recorded with a sampling rate of 40 Hz and a resolution of 0.004 mmHg. Force and acceleration were acquired using a Q-CPR assist pad, and recorded with a sampling rate of 100 Hz and resolutions of 0.01 kgf and , respectively. Fig. 1 shows an example of the signals involved in the algorithm development. All files were converted and processed using Matlab (MathWorks Inc., Natick, MA, US).
Fig. 1.
Example of a one-minute segment, with all the signals used in the algorithm functioning and development: (a) the raw thoracic impedance (TI); (b) and (c), chest force and acceleration, used as references to remove compression artifacts from the TI; (d) , the ventilation component of the TI, obtained after the preprocessing stage of the algorithm; and (e) the time-aligned capnogram, used as ground truth for training and evaluation. The ventilations annotated in the capnogram are shaded in blue, and closely match the inflation of fluctuations in . Additional 5 s of padding (blurred, outside the green box) were included at both ends to allow the full characterization of fluctuations taking place near the edges.
Ventilations were identified in the capnogram and used as ground truth to develop the impedance-based detection algorithm. Ventilations were first automatically annotated using a state-of-the-art solution [17], and then manually reviewed. Capnogram intervals that could not be reliably reviewed were deemed uninterpretable and excluded from the study. On the finally included intervals, the automatic pre-annotation showed a sensitivity of 91.1% and a positive predictive value of 95.6%. The time-delay of the capnogram was also manually corrected by aligning expiration upstrokes with TI fluctuations during compression-free intervals. A default time-delay of 3.5 s was considered when no clean fluctuations could be identified [16]. The observed mean (standard deviation, SD) time-delay was of 3.5 (0.3) s.
Impedance intervals suitable for the study design were then selected, which included concurrent recordings of acceleration, force, and interpretable capnogram as per the manual review. Chest compression pauses longer than 20 s were excluded, in order to consider mostly CPR artifacted TI. Abrupt TI excursions and other unusually large artifacts were also discarded. Given that ventilation rates are typically measured over one-minute periods [30], the intervals were sub-divided into non-overlapping 60 s segments, with additional 5 s of starting and ending signal padding, as shown in Fig. 1. The final dataset comprised 2551 one-minute segments and 20724 ventilations, median (interquartile range, IQR) of 6 (3 – 10) minutes and 45 (23 – 78) ventilations per patient. The 97.1% of ventilations were concurrent with chest compressions, thus reproducing the CPR conditions.
III. Methods
A ventilation detection algorithm was developed using the three-block architecture introduced in previous works [27], [28]. Fig. 2 shows a block-diagram of this layout: First, the TI signal was preprocessed to remove chest compression artifacts and enhance the ventilation waveform. Then, impedance fluctuations potentially due to ventilations were identified at instants and characterized by a set of waveform features . This stage was designed to over-estimate the number of ventilations, resulting in many false positives. Finally, fluctuation data were modeled as a time series, and fed to a recurrent neural network (RNN) to discriminate the actual ventilations. The algorithm was trained and tested using non-overlapping one-minute TI segments. An additional quality control stage was also considered to prevent erroneous feedback under low signal quality or heavy noise conditions.
Fig. 2.
Block diagram of the ventilation detection algorithm. The raw impedance signal is first filtered to obtain the ventilation component . Then, fluctuations potentially due to ventilations are located at instants , and characterized by a waveform feature vector . Finally, a recurrent neural network jointly classifies fluctuations as ventilations (, shaded in green) or false positives (, shaded in red). A discretionary signal quality control block allows to identify impedance segments where ventilation detection could be compromised.
A. Signal Preprocessing
First, the TI, force and acceleration signals were resampled to a common frequency of . Slow baseline drifts and high frequency components were removed from all three signals using a 0.06 Hz – 5 Hz band-pass filter (Butterworth, 4th order) [23]. Then, an adaptive Kalman filter and smoother, with force and acceleration as reference signals, was applied to remove compression artifacts from the TI. Finally, the TI was smoothed using an order 100 finite impulse response lowpass filter; a cut-off frequency of 1 Hz was selected, which is frequently used for impedance smoothing in respiration-related studies [19], [25]. Both static filters were applied in a forward-backward configuration to avoid phase distortion and delay.
In order to set up the adaptive filter, the high-pass filtered TI signal was assumed to be the sum of a component due to chest compressions and a component due to ventilations , such that . In addition, was modeled as a linear combination of the neighboring force and acceleration samples, so for a time instant :
(1) |
where is the sampling period, and and the downsampled and high-pass filtered force and acceleration signals. The slowly time-varying coefficients and were also assumed to follow gaussian processes with Ornstein-Uhlenbeck type covariances of length-scale [31], [32]. The process equation for the Kalman recursion follows:
(2) |
where the state vector is given by
(3) |
the transition matrix by , and follows a gaussian process with zero mean and covariance . Similarly, the measurement equation follows:
(4) |
with observation vector given by
(5) |
and . Given these equations, the coefficients and were obtained using a Rauch-Tung-Striebel smoother, as described in [33]. The ventilation component of interest was finally estimated as , with . Values of , , and were chosen after some initial experiments. In the following, the term is used to represent the output of the entire preprocessing stage.
B. Fluctuation Detection
Impedance fluctuations potentially due to ventilations were identified in . First, the largest local maxima with a minimum separation of 1.5 s were detected. Then, the start of the inflation phase, , and the end of the deflation phase, , were determined for each fluctuation. Inflation and deflation durations between 0.45 s and were considered [27]. The procedure to determine and was not critical for the overall performance of the algorithm. A detailed description of the heuristic used in this study is included as supplementary material.
C. Feature Extraction
Each fluctuation was characterized in terms of a vector of 14 waveform features. As shown in Fig. 3, the first four features comprised the amplitudes and durations of the inspiration (or upwards, from to ) and expiration (or downwards, from to ) phases of the fluctuation, given by:
(6) |
Fig. 3.
Example of two fluctuations, as identified by the fluctuation detection stage. The amplitude and duration of the upwards or inspiration phase (from to , in blue), and the amplitude and duration of the downwards or expiration phase (from to , in red) were computed to characterize each fluctuation.
The remaining 10 features consisted on the curve fit coefficients of each phase in terms of order Legendre polynomials . These polynomials form an orthogonal system in the real domain, and can be recursively obtained through
(7) |
with and . Let be a column vector containing the samples of within the inspiration phase . Let also be another column vector, obtained from evaluating (7) over a finite set of points , with as many points as samples in , equispaced between −1 and 1 . The curve fit coefficients of the inspiration phase were then computed using:
(8) |
An analogous procedure was followed to obtain the expiration phase coefficients .
D. Classification
For classification and evaluation purposes, each final fluctuation output by the previous stage was labeled as either actual ventilation or false detection , based on the ground truth annotations in the capnogram. As shown in Fig. 4, ventilations in the capnogram were annotated covering the full inspiration cycle, from inspiration onset or downstroke, at time , to expiration onset or upstroke, at time . A fluctuation was labeled as when its peak position fell within one of these inspiration cycles, with an extra tolerance margin of 1 s. When several fluctuations met this criteria for the same ground truth ventilation , only the one with peak closest to was labeled as , and the rest as .
Fig. 4.
Example of the fluctuation labeling and time-series composition procedures. Fluctuations were labeled as ventilations (, shaded in green) if their peak position fell within the bounds (extended by up to 1 s) of a capnogram ground truth ventilation , and as (in red) otherwise. Fluctuation data were then used to compose the 60-step feature and label time series used in classification. Each time-step in the series represented a one-second interval; fluctuations were mapped to time-steps according to their peak position .
Classification was performed over full one-minute segments, which could provide the classifier with comparative context on fluctuation shapes and relative positioning. Each segment was modeled as a time series, where each time-step represented a one-second interval. As shown in Fig. 4, fluctuations were mapped to time-steps according to their peak position , such that . Then, a feature time series was constructed, which contained the waveform features of the individual fluctuations at mapped time-steps, and an all-zero feature vector at unmapped ones. A ground truth label series was constructed using the same procedure to train and evaluate the classifier. In this case, unmapped steps were assigned to the negative class .
The classification task was performed using an RNN with a two-layer architecture: A bidirectional recurrent layer, comprising 20 gated recurrent units (GRU) [34], to which the time series were fed, and a single neuron output layer, activated by a sigmoid function to produce an output between 0 and 1 . The network worked on a sequence-to-sequence configuration, so a different output was obtained for each time-step. The outputs associated to fluctuations were recovered from the previously mapped time-steps, and the fluctuations classified as true ventilations if , and as false detections otherwise.
Given the primary interest on the positive class (, the actual ventilations), and the large number of negative class instances (mostly from unmapped time-steps), the models were optimized using the Dice coefficient loss [35], given by:
(9) |
The training of the models was performed over 25 epochs, with a batch size of 32 segments, and using an Adam optimizer with initial learning rate of 0.005 . The entire classification stage was implemented in Tensorflow 2.0 [36].
E. Evaluation
Segments were partitioned patient-wise into training and test sets using a 5-fold cross-validation (CV) strategy. Assignment was conducted in a balanced manner, such that approximately one-fifth (maximum deviation of 5%) of the patients, segments and ground truth ventilations were assigned to each fold. A total of 20 random CV partitions were generated to minimize any bias due to data partitioning.
For each one-minute segment, performance was assessed in terms of sensitivity (Se), positive predictive value (PPV) and -score, given by:
(10) |
where TP and FP are the number of true positives (, ) and false positives (, ), respectively. Se was computed against the number of ground truth ventilations , in order to account also for missed fluctuations(). Given the differences in the number of segments per patient, performance metrics were also computed patient-wise, using aggregated data from all segments of each patient. Peformance scores from different partitions were mean-aggregated into a single value for each segment/patient. The distributions of segments and patients for different performance score bands were analyzed . Overall performances by segment/patient were assessed in terms of median (IQR).
1). Comparison with literature solutions:
The performance of the proposed algorithm was compared to that of various similar solutions in the literature. Risdal et al. proposed an adaptive filter to remove compression artifacts, followed by a machine learning framework for ventilation segmentation [23]. Edelson et al. replaced the machine learning framework with a real-time fluctuation detector and a fixed rule-based discrimination of ventilations [16]. Finally, Alonso et al. proposed the use of static linear filters, and an adaptive rule-based discrimination, using dynamic thresholds based on previous detections [26]. The three methods were implemented in Matlab and trained and tested in the study dataset. Implementation details can be found in appendix I.
2). Feature importance:
Permutation importance and recursive feature elimination were used to assess the contribution of the different waveform features to classification. First, the RNN models were train-tested on clean data and a mean of reference (more robust to small differences than the median) was computed. Then, for each feature considered, its values along fluctuations were randomly shuffled and new predictions were obtained. The feature whose permutation caused the smallest decrease in mean was deemed the least important and was removed from the model. This process was repeated until a single feature remained.
In order to prevent data leakage, the importance analysis was conducted at each regular CV step, using an inner 4-fold CV loop over training data. Different feature rankings were thus obtained for each fold and partition.
F. Signal Quality Control
Impedance is sensitive to many noise sources, such as chest compressions and electrode motion, which may jeopardize the detection of ventilations. A signal quality control solution was designed, which could be integrated in the ventilation detection algorithm to anticipate the reliability of the detection.
The solution used the filtered TI signal , downsampled to 5 Hz, to compute the following waveform features:
The skewness of the sample distribution, which should be high for narrow, positive fluctuations, such as in Fig. 1.
The first peak amplitude (FPA) of the normalized signal autocorrelation [37], which should be larger for regular ventilation rates and fluctuation shapes.
SD12, a relational measure between short- and long-term variabilities [38], computed from the Poincaré plot of the first differences of the signal.
These features were used to fit a linear regression model where the scores (scaled to unit range) of the ventilation detection algorithm worked as target variable. A logit link function was applied to produce outputs between 0 and 1. As in the feature importance analysis, an inner 4-fold CV loop (per regular CV step) was conducted on training data to obtain an score for each training segment.
The regression models were applied to test data to obtain a quality score (QS), a rough estimate of , for each segment. Spearman's correlation was used to measure the ability of the QS to rank segments by . The performance of the ventilation detection algorithm was then reassessed for different segment inclusion rates; that is, when only the target fraction (inclusion rate) of segments with highest QS were evaluated.
Finally, the reliability of the ventilation detection algorithm (combined with the quality control) in providing feedback on ventilation rate (VR) was analyzed. For each segment, the VR was computed as
(11) |
where ventilation instants were taken at ventilation peaks for estimated VR, or at capnogram for ground truth VR. Errors and confidence intervals were assessed through a Bland-Altman plot.
IV. Results
The ventilation detection algorithm, evaluated per segment, achieved performance scores of 93.3 (75.0–100.0) % for Se, 90.0 (68.5 – 100.0)% for PPV, and 89.1 (70.8–99.6) % for . When computed per patient, scores were 86.5 (71.6–95.1)% for Se, 85.4 (68.3–94.7)% for PPV, and 84.1 (69.0–93.9)% for . Fig. 5 shows the distributions of both segments and patients for different performance decile bands. In both cases, the distributions presented negative skew, with most samples corresponding to the highest performance band. There were many segments, though, for which performance was probably too low for practical use, mostly related to high noise levels and/or low-amplitude ventilations (see Fig. 6). As shown in Fig. 6b, pauses in chest compressions were also identified as a potential error source. Per-patient metrics, which aggregated information from several segments, were less likely to present extreme performance values.
Fig. 5.
Distributions of both segments (left) and patients (right) for different sensitivity (Se), positive predictive value (PPV), and score bands.
Fig. 6.
Examples of error-prone ventilation impedance waveforms. Intervals of 20 s are presented, along with their corresponding ground truth capnogram waveform. The unfiltered impedance signal, depicted in the brackground in gray, is scaled (scale shown top-left of each figure) so fluctuations are highlighted. True positives (TP), false positives (FP) and false negatives (FN) are indicated.
Lower per-patient median performances were in part due to a higher number of segments for the patients with better overall performances (the 50% and 25% of patients with highest comprised, respectively, the 56.6% and 26.6% of segments), but also due to within-patient variability: the 63.5% and 36% of patients included, respectively, one or more segments with scores 10 and 20 points below the patienťs aggregate. Note that OHCA treatment may undergo important changes over the course of an episode, such as patient transportation or the placement of an advanced airway. Moreover, rescuers usually take turns delivering CPR, which may result in very different compression artifacts and motion noise levels.
Performance variation between partitions was minimal, with median per-segment and per-patient SDs of 0.1% and 0.2%, respectively. The variation among the 100 individual test folds was much larger, though, with median per-segment and per-patient ranging from 82.4% to 91.1%, and from 74.1% to 89.5%, respectively. This was most likely due to the random assignment of patients with very different TI signal qualities.
A. Comparison with literature solutions
A previous version of this study [28] used a harmonic chest compression model [39], [40] and a least-mean-squares (LMS) filter to remove compression artifacts, and a Random Forest (RF) classifier [41] to individually discriminate fluctuations. As shown in Table I, the preprocessing and classification stages introduced in the present work outperformed that preliminary design. Replacing the Kalman smoother with the LMS filter from the preliminary study resulted in median per-segment and per-patient of 86.5% and 81.5%, respectively. Similarly, replacing the RNN with an RF classifier resulted in median per-segment and per-patient of 85.8% and 81.0%, showing the benefits of a broader context on TI fluctuations.
TABLE I.
Median (IQR) performance metrics of previous solutions in the literature, evaluated on the study dataset.
Performance by segment |
Performance by patient |
|||||
---|---|---|---|---|---|---|
Algorithm | F1 (%) | Se (%) | PPV (%) | F1 (%) | Se (%) | PPV (%) |
Proposed algorithm | 89.1 (70.8 – 99.6) | 93.3 (75.0 – 100.0) | 90.0 (68.5 – 100.0) | 84.1 (69.0 – 93.9) | 86.5 (71.6 – 95.1) | 85.4 (68.3 – 94.7) |
Preliminary design [28] | 85.2 (66.4 – 96.4) | 87.5 (64.0 – 100.0) | 87.9 (68.8 – 100.0) | 80.3 (65.2 – 90.7) | 80.0 (59.6 – 91.5) | 83.9 (69.0 – 93.4) |
Risdal et al. [23] | 75.0 (53.3 – 90.0) | 94.1 (75.0 – 100.0) | 71.4 (46.7 – 91.0) | 70.0 (56.3 – 82.8) | 87.3 (71.7 – 95.8) | 65.2 (48.1 – 82.1) |
Edelson et al. [16] | 66.7 (40.0 – 85.7) | 83.5 (50.0 – 100.0) | 71.4 (43.3 – 100.0) | 62.1 (46.5 – 70.5) | 77.3 (52.2 – 91.2) | 64.3 (45.8 – 83.6) |
Alonso et al. [26] | 75.0 (55.2 – 92.3) | 100.0 (85.7 – 100.0) | 66.7 (42.9 – 90.0) | 68.6 (56.1 – 85.5) | 92.5 (84.6 – 97.1) | 60.2 (43.4 – 79.5) |
The proposed algorithm also outperformed similar solutions in the literature, as implemented and tested in the study dataset (see Table I). The algorithm by Alonso et al. [26] achieved the highest Se, but produced many false positives (low PPV). The dynamic amplitude threshold was able to reject relatively small artifacts; however, its starting value was low , rejecting only the smallest fluctuations, and adaptation failed or was too slow under sustained noise. In the opposite end, the solution by Edelson et al. [16] imposed much more severe amplitude and, most importantly, slope constraints. This resulted in a lower Se, as many of the lowamplitude ventilations in the dataset were missed (a Se of zero was obtained for 9.1% of the segments). The PPV did not improve much, as false positives were still frequent when noise levels exceeded the thresholds. The most elaborate solution, by Risdal et al. [23], did not substantially improve results either. The segmentation framework used a short window of 1.4 s to identify the inspiration (OI) and expiration (OE) onsets, which may had provided too little context to discriminate ventilations from other artifacts. The final decision ruleset was also rather simple, reliant on a correct segmentation, and did not include information of the expiration phase. When optimized for the study dataset, the algorithm was found to require a significant amplitude constraint . Finally, the solution was also penalized by a 2.3 Hz smoothing filter, which could have let too much noise and compression residuals through. Results were better with a more conservative 1 Hz cut-off (median of 76.9% and 71.8% for segments and patients, respectively), but still far behind those from the algorithm in this study.
B. Feature importance
As shown in Fig. 7, feature importance was very consistent across folds and partitions, with the exception of the two most important features, and , which were found on par. High order coefficients could likely be removed from the model without affecting performance. All remaining features contributed to performance, although the RNN proved robust to less detailed information. A simplified model using the four most important features scored a median per-segment of 88.6%. Similarly, a model including only the inflation amplitude scored a median of 87.1%. Note that this was possible due to the larger context managed by the RNN classifier. An optimal universal amplitude threshold (found at ), used independently in all fluctuations, scored a much lower of 78.3%, more in line with previous solutions in the literature.
Fig. 7.
Probability of selecting a given feature in a simplified M-feature model, computed as the proportion of training folds and partitions for which the feature was selected through recursive feature elimination.
C. Signal Quality Control
The quality control stage identified segments where ventilation detection was defective. The solution assigned a QS, an estimate of the , to each segment. A Spearman's correlation of was measured between QS and values, proving that the solution could reliably sort segments by performance. Ad-hoc QS thresholds could be defined, each with a different segment inclusion rate and expected performance range.
Fig. 8 shows the median (IQR) per-segment for different segment inclusion rates considered for evaluation. Median and quartile scores showed monotonic growth as inclusion became more restrictive and less segments were considered. Moreover, the median scores were close to those of an ideal QS (the itself), reaching 100% for up to a 55% segment inclusion. First quartile values were lower, though, indicating that some segments with low were not identified. For an inclusion rate of 50%, with of 100.0 (90.9 – 100.0)%, a 9.3% and 5.1% of segments with below 80% and 70% were respectively selected. The causes did vary, but often involved a dominant segment section (due to artifacts or larger ventilations) which governed the extraction of quality features. Likewise, 7.8% of all segments with of 100% were left out, mostly showing distorted fluctuations like in Fig, 6a.
Fig. 8.
Median (IQR) per-segment scores for increasing segment inclusion rates. Segments considered for evaluation were selected according to the proposed quality score (QS), and performance compared to an ideal QS (the itself). Median and IQR values were averaged between partitions. Median scores are also shown for the different solutions in the literature, with quality control optimized for each case.
Per-patient performances were notably lower, as many patients marginally contributed with relatively low segments. A 50% segment inclusion comprised data from 73.2% of all patients, for a per-patient of 94.3 (86.5 – 97.8)%. However, 21.7% of these patients were very partially included (less than 25% of each patienťs available data) and represented only the 6.4% of the segments considered. These showed, in general, lower performances, with of 85.7 (61.7 – 93.4) %.
All the impedance features considered in the quality control model were statistically significant, . The individual Spearman's correlations were 0.40 for FPA, 0.47 for Skewness, and −0.64 for SD12. The regression coefficients (using normalized features) were 0.28, 0.27 and −0.59 , respectively, denoting SD12 as the most relevant feature. The quality control model was also implemented for the solutions in the literature. In all three cases, the model was effective at sorting segments by , but the relative importance of the features (as given by regression coefficients) varied. Note that quality features were computed on the filtered TI, which was different in most cases. Moreover, some solutions included harsh amplitude thresholds, whereas features were intentionally amplitude independent.
D. Feedback on Ventilation Rates
Finally, the reliability of the ventilation detection algorithm to provide VR feedback was assessed. Fig. 9 shows a Bland-Altman plot on VR, in which 90% levels of agreement (LoA) are depicted for the whole dataset, as well as 70% and 35% data inclusion in combination with the quality control. Errors were larger without quality control, with a partition-averaged global LoA of . Overestimation was frequent for low to moderate rates, the median (IQR) ground truth VR being , whereas underestimation was prevalent for high rates . Errors were larger for extreme rates, probably affected by data imbalance; 90% of the segments were in the range.
Fig. 9.
Bland-Altman plot, comparing estimated and ground truth ventilation rates. The 90% levels of agreement (LoA) were computed for different intervals (interval width of 3 min−1 and step of 0.5 min−1) and segment inclusion rates (according to quality control results). Individual VRALG and LoA values were averaged partition-wise.
Quality control helped prevent many of the errors. Global LoA were and for 70% and 35% data inclusion, respectively. However, the improvement was highly biased, avoiding mostly overestimation errors in low to moderate VR segments.
V. Discussion
This study presents a novel algorithm for impedance-based ventilation detection during continuous chest compressions in OHCA. Evaluated on ground truth annotations taken entirely in the capnogram, the algorithm achieved median scores of 89.1% and 84.1% for one-minute segments and full patients, respectively, which represents about 4 points of improvement over its preliminary version [28]. Two main differences may explain this improvement: First, the Kalman smoother used in this study, with force and acceleration as reference signals, proved superior at removing chest compression artifacts compared to the previous LMS approach and other unidirectional adaptive filters. And second, the RNN classifier was fed with combined information from all fluctuations within the one-minute segment, which provided added context to discriminate ventilations.
The proposed method also outperformed previous solutions in the literature [16], [23], [26] by more than 10 points of . For all of them, performance was lower in our study dataset than in the original study. In general, these solutions treated each potential ventilation independently, and relied ultimately in amplitude thresholding; this would require ventilation levels to be overall larger than noise ones, which may not be the case in our data or in a real setting. Only the solution by Alonso et al. [26] included some case-specific context, but adapted too slowly and produced many false positives in noisy scenarios. Differences in data sources could explain these performance disparities. All the data in Edelson et al. [16] as well as part of the data in Risdal et al. [23] came from an in-hospital setting, in which noise levels could have been lower. In contrast, our dataset was collected entirely out-of-hospital, and also included a 21.6% of segments acquired during transportation in which detecting ventilations was more difficult (median of 84.0%, versus 90.3% for non-transport segments). Similarly, endotracheal intubation may have been the norm in hospital data [42], whereas our dataset included a 13.1% of segments with no advanced airway, and a 56.5% with laryngeal tubes, which have been shown to produce lower TI amplitudes [43]. Risdal et al. reported a median (IQR) patient average inflation amplitude of , while our dataset, considering only flawlessly classified segments, showed a much lower . Our results show that, in these circumstances, a universal amplitude threshold alone is not feasible; a broader context on the surrounding fluctuations and/or a more detailed characterization is needed to reliably identify ventilations.
Despite the improved performance, we still identified many TI segments where ventilation detection was unreliable. This is in contrast with our previous study on mechanical CPR [27], in which noise levels were found minimal and capnographygrade performance was obtained. Thanks to the quality control we introduced, we could anticipate low-performance segments and prevent erroneous feedback. While different approaches such as template matching [25] or convolutional networks [37] could be explored in the future, our linear regression solution proved robust enough while being highly interpretable, computationally cheap, and easy to integrate in the detection algorithm. No fixed binary quality labels, but the continuous scores of the detection algorithm were used to fit the model, so ad-hoc quality threshold could easily be defined according to performance requirements. All the quality features were also amplitude-independent. Given the high correlation between the quality and scores, our detection algorithm would probably be able to identify low-amplitude ventilations as long as not significantly distorted.
The impact of ventilation therapy in the outcome of cardiac arrest patients has been documented, but little is known about the details of ventilation during OHCA because it has not been adequately measured either in research studies or in practice [13]. Our ventilation detection algorithm could be used in two main scenarios: a) to provide real-time feedback on ventilation during OHCA treatment, and b) for the retrospective analysis of ventilation effectiveness in large datasets. Notice that real-time solutions could analyze overlapping segments to increase the frequency of readings. Other modifications could also be considered, such as performing filtering and fluctuation detection in shorter sub-segments to reduce memory requirements, or optimizing the signal padding to minimize delay. Whatever the application mode, a complete solution should also include logic to identify isolated large artifacts, which were manually excluded in this study. As a concrete application, the algorithm could be used to detect specific ventilation patterns, such as potentially harmful hyper-ventilation events [44]. Notice that the RNN in this study was trained using all data available, with no further considerations. This may have caused performances to be lower for minority ventilation patterns, and could be potentially alleviated using oversampling or data augmentation techniques. In the context of ongoing studies on ventilation effectiveness [22], the algorithm could also be used to provide TI amplitude measures as air volume surrogates. Given its ability to detect low amplitude ventilations, diverse enough study data could be selected and reliably analyzed with minimal human effort.
A. Limitations
This study has some limitations. First, all data came from a single device model, the Philips HeartStart MRx. Moreover, the algorithm relied on force and acceleration data, acquired with an external Q-CPR pad that may often not be available and may not be compatible with other manufacturers' devices. Different filters should be explored to broaden the applicability of the solution. Second, the evaluation was carried out with a cross-validation strategy, with all data coming from a single resuscitation site. Thus, the algorithm could be overfitted to specific ventilation patterns, which could be different for other EMS agencies. Further validation should be conducted on an independent dataset, preferably from different agencies and, if possible, different devices. Third, the evaluation was also limited to episode intervals with a capnogram readable enough to annotate the ground truth ventilations. Although we observed no correlation between end-tidal CO2 levels in the capnogram and ventilation amplitudes in the TI (Pearson's R of −0.11), other relationships may have existed between the two signals that resulted in a selection bias. And fourth, the algorithm was designed for continuous chest compression CPR. In early resuscitation stages, however, 30:2 CPR is usually practiced, where ventilations are delivered during pauses. Other solutions could be more appropriate for this scenario [20].
VI. Conclusions
This study introduces a novel algorithm for the detection of ventilations in TI during continuous chest compression CPR in OHCA. The algorithm improves on previous solutions through the use of an enhanced filtering of compression artifacts and a recurrent neural network to leverage on signal context. The study also introduces a quality control solution to anticipate TI segments where ventilation detection could be defective. The algorithm could be used to facilitate research on ventilation effectiveness, and potentially integrated in resuscitation equipment to provide real-time feedback on ventilation.
Supplementary Material
Acknowledgment
We express our deepest gratitude to late Prof. Unai Irusta for his contribution in the conceptualization and early development of this study. We also thank Andoni Elola for his advice on signal filtering and time-series classification.
This work was supported by MCIN/AEI/10.13039/501100011033 and “ERDF A way of making Europe” under grant PID2021-122727OB-I00; by the Basque Government under grants PRE-2021-2-0126 and IT-1717-22; and by the University of the Basque Country (UPV/EHU) under Grant COLAB20/01. The parent PART trial was supported by grant UH2/UH3-HL125163 from the National Heart Lung and Blood Institute.
Appendix I
Implementation of literature solutions
In this section we highlight the details of our implementation of the algorithms proposed by others. Missing information might have conditioned our implementation and thus resulted in suboptimal performance metrics.
The original MC-RAMP filter by Risdal et al. [23] used, on top of force and acceleration, the ECG common-mode channel, which was not available in the study dataset and was therefore ignored. Moreover, the training of the algorithm used OI and OE annotations taken directly on the filtered TI, which had to be derived from the capnogram: First, the largest TI local maxima, with minimum separation of 1.5 s, were located, and annotated as OE when they fell within 0.5 s of a capnogram . Then, for each OE, an OI was searched within 1 s of the corresponding . For each possible OI point, straight lines were fitted to the 0.5 s TI sections before and after the point; the OI was finally selected as the point with largest positive angle change between both lines. A window of 1.4 s and five hidden nodes were used, as found optimal in the original study. Given possible inaccuracies in OI and OE points, a duration of 0.2 – 5 s was considered; this was specified in the original work for a rule-based solution of reference. The decision thresholds on minimum amplitude and segmentation outputs were optimized through a grid search to maximize the median per-segment .
The study by Edelson et al. [16] missed key information on both static and adaptive filters, so the same TI preprocessing as in Risdal et al. was applied. No procedural definition was given for the potential start/end times of a ventilation, so they were defaulted to local minima. No validity ranges were given either for the expiration duration and the expiration/inflation ratio, so no related checks were performed.
Finally, Alonso et al. [26] introduced a dynamic amplitude threshold, based on information from previous detections. Amplitude measures were saved and applied between consecutive segments from the same patient, but the average case duration was about five times shorter than in the original study. This may have prevented a successful long run adaptation.
Contributor Information
Xabier Jaureguibeitia, Department of Communications Engineering, University of the Basque Country UPV/EHU, Ingeniero Torres Quevedo Plaza, 1, 48013, Bilbao, Spain.
Elisabete Aramendi, Department of Communications Engineering, University of the Basque Country UPV/EHU, Ingeniero Torres Quevedo Plaza, 1, 48013, Bilbao, Spain.
Henry E. Wang, Ohio State University, Columbus, Ohio, US
Ahamed H. Idris, University of Texas Southwestern Medical Center, Dallas, Texas, US
References
- [1].Tsao CW et al. , “Heart disease and stroke statistics-2022 update: A report from the american heart association.” Circulation, vol. 145, pp. e153–e639, Feb. 2022 [DOI] [PubMed] [Google Scholar]
- [2].Ritter G et al. , “The effect of bystander cpr on survival of out-of-hospital cardiac arrest victims.” American heart journal, vol. 110, pp. 932–937, Nov. 1985. [DOI] [PubMed] [Google Scholar]
- [3].Christenson J et al. , “Chest compression fraction determines survival in patients with out-of-hospital ventricular fibrillation.” Circulation, vol. 120, pp. 1241–1247, Sep. 2009 [DOI] [PMC free article] [PubMed] [Google Scholar]
- [4].Panchal AR et al. , “Part 3: Adult basic and advanced life support: 2020 american heart association guidelines for cardiopulmonary resuscitation and emergency cardiovascular care.” Circulation, vol. 142, pp. S366–S468, Oct. 2020. [DOI] [PubMed] [Google Scholar]
- [5].Olasveengen TM et al. , “European resuscitation council guidelines 2021: Basic life support.” Resuscitation, vol. 161, pp. 98–114, Apr. 2021. [DOI] [PubMed] [Google Scholar]
- [6].Soar J et al. , “European resuscitation council guidelines 2021: Adult advanced life support.” Resuscitation, vol. 161, pp. 115–151, Apr. 2021. [DOI] [PubMed] [Google Scholar]
- [7].Aase SO and Myklebust H, “Compression depth estimation for cpr quality assessment using dsp on accelerometer signals.” IEEE transactions on bio-medical engineering, vol. 49, pp. 263–268, Mar. 2002. [DOI] [PubMed] [Google Scholar]
- [8].Ayala U et al. , “Automatic detection of chest compressions for the assessment of cpr-quality parameters.” Resuscitation, vol. 85, pp. 957–963, Jul. 2014. [DOI] [PubMed] [Google Scholar]
- [9].Elola A et al. , “Finger photoplethysmography to monitor chest compression rate during out-of-hospital cardiac arrest,” in Proc. Computing in Cardiology, 2018, pp. 1–4. [Google Scholar]
- [10].Coult J, Blackwood J, Rea TD, Kudenchuk PJ, and Kwok H, “A method to detect presence of chest compressions during resuscitation using transthoracic impedance.” IEEE journal of biomedical and health informatics, vol. 24, pp. 768–774, Mar. 2020. [DOI] [PMC free article] [PubMed] [Google Scholar]
- [11].Hostler D et al. , “Effect of real-time feedback during cardiopulmonary resuscitation outside hospital: prospective, cluster-randomised trial.” BMJ (Clinical research ed.), vol. 342, p. d512, Feb. 2011. [DOI] [PMC free article] [PubMed] [Google Scholar]
- [12].Jaureguibeitia X et al. , “Methodology and framework for the analysis of cardiopulmonary resuscitation quality in large and heterogeneous cardiac arrest datasets.” Resuscitation, vol. 168, pp. 44–51, Nov. 2021 [DOI] [PubMed] [Google Scholar]
- [13].Idris AH, “The importance of measuring ventilation during resuscitation.” Resuscitation, vol. 177, pp. 41–42, Jul. 2022. [DOI] [PubMed] [Google Scholar]
- [14].Mosesso VN, “Ventilation during cardiopulmonary resuscitation-only mostly dead!” Resuscitation, vol. 141, pp. 200–201, Aug. 2019. [DOI] [PubMed] [Google Scholar]
- [15].Neth MR, Idris A, McMullan J, Benoit JL, and Daya MR, “A review of ventilation in adult out-of-hospital cardiac arrest.” Journal of the American College of Emergency Physicians open, vol. 1, pp. 190–201, Jun. 2020. [DOI] [PMC free article] [PubMed] [Google Scholar]
- [16].Edelson DP et al. , “Capnography and chest-wall impedance algorithms for ventilation detection during cardiopulmonary resuscitation.” Resuscitation, vol. 81, pp. 317–322, Mar. 2010. [DOI] [PMC free article] [PubMed] [Google Scholar]
- [17].Aramendi E et al. , “Feasibility of the capnogram to monitor ventilation rate during cardiopulmonary resuscitation.” Resuscitation, vol. 110, pp. 162–168, Jan. 2017. [DOI] [PubMed] [Google Scholar]
- [18].Freundlich JJ and Erickson JC, “Electrical impedance pneumography for simple nonrestrictive continuous monitoring of respiratory rate, rhythm and tidal volume for surgical patients.” Chest, vol. 65, pp. 181–184, Feb. 1974 [DOI] [PubMed] [Google Scholar]
- [19].Blanco-Almazán D, Groenendaal W, Catthoor F, and Jané R, “Chest movement and respiratory volume both contribute to thoracic bioimpedance during loaded breathing.” Scientific reports, vol. 9, p. 20232, Dec. 2019. [DOI] [PMC free article] [PubMed] [Google Scholar]
- [20].Aramendi E et al. , “A novel technique to assess the quality of ventilation during pre-hospital cardiopulmonary resuscitation.” Resuscitation, vol. 132, pp. 41–46, Nov. 2018. [DOI] [PubMed] [Google Scholar]
- [21].Losert H et al. , “Thoracic impedance changes measured via defibrillator pads can monitor ventilation in critically ill patients and during cardiopulmonary resuscitation.” Critical care medicine, vol. 34, pp. 2399–2405 , Sep. 2006. [DOI] [PubMed] [Google Scholar]
- [22].Chang MP et al. , “Association of ventilation with outcomes from out-of-hospital cardiac arrest.” Resuscitation, vol. 141, pp. 174–181, Aug. 2019. [DOI] [PMC free article] [PubMed] [Google Scholar]
- [23].Risdal M, Aase SO, Stavland M, and Eftestol T, “Impedancebased ventilation detection during cardiopulmonary resuscitation,” IEEE Transactions on Biomedical Engineering, vol. 54, no. 12, pp. 2237–2245,2007 [DOI] [PubMed] [Google Scholar]
- [24].Ansari S, Ward KR, and Najarian K, “Motion artifact suppression in impedance pneumography signal for portable monitoring of respiration: An adaptive approach,” IEEE Journal of Biomedical and Health Informatics, vol. 21, no. 2, pp. 387–398, 2017. [DOI] [PubMed] [Google Scholar]
- [25].Charlton PH et al. , “An impedance pneumography signal quality index: Design, assessment and application to respiratory rate monitoring.” Biomedical signal processing and control, vol. 65, p. 102339, Mar. 2021. [DOI] [PMC free article] [PubMed] [Google Scholar]
- [26].Alonso E et al. , “Reliability and accuracy of the thoracic impedance signal for measuring cardiopulmonary resuscitation quality metrics.” Resuscitation, vol. 88, pp. 28–34, Mar. 2015. [DOI] [PubMed] [Google Scholar]
- [27].Jaureguibeitia X et al. , “Automatic detection of ventilations during mechanical cardiopulmonary resuscitation.” IEEE journal of biomedical and health informatics, vol. 24, pp. 2580–2588, Sep. 2020. [DOI] [PMC free article] [PubMed] [Google Scholar]
- [28].Jaureguibeitia X, Irusta U, Aramendi E, Wang H, and Idris A, “An impedance-based algorithm to detect ventilations during cardiopulmonary resuscitation,” in Proc. Computing in Cardiology, 2020, pp. 1–4. [Google Scholar]
- [29].Wang HE et al. , “Effect of a strategy of initial laryngeal tube insertion vs endotracheal intubation on 72-hour survival in adults with out-of-hospital cardiac arrest: A randomized clinical trial.” JAMA, vol. 320, pp. 769–778, Aug. 2018. [DOI] [PMC free article] [PubMed] [Google Scholar]
- [30].Kramer-Johansen J, Edelson DP, Losert H, Köhler K, and Abella BS, “Uniform reporting of measured quality of cardiopulmonary resuscitation (cpr).” Resuscitation, vol. 74, pp. 406–417, Sep. 2007. [DOI] [PubMed] [Google Scholar]
- [31].Zhao Z, Särkkä S, and Rad AB, “Spectro-temporal ecg analysis for atrial fibrillation detection,” in 2018 IEEE 28Th international workshop on machine learning for signal processing (MLSP). IEEE, 2018, pp 1–6. [Google Scholar]
- [32].Elola A, Aramendi E, Irusta U, Berve PO, and Wik L, “Multimodal algorithms for the classification of circulation states during out-of-hospital cardiac arrest,” IEEE Transactions on Biomedical Engineering, vol. 68, no. 6, pp. 1913–1922, 2020. [DOI] [PubMed] [Google Scholar]
- [33].Haykin S, Kalman filtering and neural networks John Wiley & Sons, 2004, vol. 47. [Google Scholar]
- [34].Cho K, Van Merriënboer B, Bahdanau D, and Bengio Y, “On the properties of neural machine translation: Encoder-decoder approaches,” arXiv preprint arXiv:1409.1259, 2014.
- [35].Milletari F, Navab N, and Ahmadi S-A, “V-net: Fully convolutiona neural networks for volumetric medical image segmentation,” in 2016 fourth international conference on 3D vision (3DV). IEEE, 2016, pp. 565–571. [Google Scholar]
- [36].Abadi M et al. , “Tensorflow: Large-scale machine learning on heterogeneous distributed systems,” arXiv preprint arXiv:1603.04467, 2016.
- [37].Rozo A et al. , “Data augmentation and transfer learning for data quality assessment in respiratory monitoring.” Frontiers in bioengineering and biotechnology, vol. 10, p. 806761, 2022. [DOI] [PMC free article] [PubMed] [Google Scholar]
- [38].Nardelli M et al. , “Reliability of lagged poincaré plot parameters in ultrashort heart rate variability series: Application on affective sounds,” IEEE Journal of Biomedical and Health Informatics, vol. 22, no. 3, pp 741–749, 2018. [DOI] [PubMed] [Google Scholar]
- [39].Irusta U, Ruiz J, de Gauna SR, EftestØ1 T, and Kramer-Johansen J, “A least mean-square filter for the estimation of the cardiopulmonary resuscitation artifact based on the frequency of the compressions,” IEEE Transactions on Biomedical Engineering, vol. 56, no. 4, pp. 1052–1062, 2009. [DOI] [PubMed] [Google Scholar]
- [40].Isasi I et al. , “Automatic cardiac rhythm classification with concurrent manual chest compressions,” IEEE Access, vol. 7, pp. 115 147–115 159, 2019. [Google Scholar]
- [41].Breiman L, “Random forests,” Machine learning, vol. 45, no. 1, pp. 5–32, 2001. [Google Scholar]
- [42].Penketh JA et al. , “Airway management during in-hospital cardiac arrest: An international, multicentre, retrospective, observational cohort study.” Resuscitation, vol. 153, pp. 143–148, Aug. 2020. [DOI] [PubMed] [Google Scholar]
- [43].Nassal MMJ et al. , “Novel application of thoracic impedance to characterize ventilations during cardiopulmonary resuscitation in the pragmatic airway resuscitation trial.” Resuscitation, vol. 168, pp. 58–64, Nov. 2021. [DOI] [PMC free article] [PubMed] [Google Scholar]
- [44].Aufderheide TP and Lurie KG, “Death by hyperventilation: a common and life-threatening problem during cardiopulmonary resuscitation.” Critical care medicine, vol. 32, pp. S345–S351, Sep. 2004. [DOI] [PubMed] [Google Scholar]
Associated Data
This section collects any data citations, data availability statements, or supplementary materials included in this article.