1 Introduction

The process of mechanically ventilating the respiratory system, that includes the lungs and thoracic cage, is often influenced by a patient’s level of consciousness. For heavily sedated or paralyzed patients, insufflation is entirely passive. Yet, conscious patients may exhibit an active response, such as trying to exhale during insufflation risking injurious lung strain [1, 2], or developing forceful inhalations if experiencing air hunger [3], a stressful emotional state that may lead to long term psychologic sequela [4].

Quantification of patient effort during ventilatory support could help clinicians optimize ventilator settings and calibrate sedative administration. With that goal in mind, the current research proposes a non-invasive method to estimate the portion of airway pressure (Paw) attributed to muscular effort (Pmus) during insufflation automatically.

1.1 Model development

The single compartment model of the respiratory system [5, 6] during positive pressure ventilation with negligible Pmus, may be expressed as [7]:

$${ P}_{passive}\left(t\right)= \frac{\varDelta V\left(t\right)}{{C}_{rs}}+ {R}_{rs}{F}_{aw}\left(t\right)+ {PEEP}_{a}$$
(1)

where Ppassive(t) is the airway pressure required to inflate the respiratory system devoid of patient assistance; ΔV(t) represents increases in lung volume from functional residual capacity; Faw(t) is airway flow; and PEEPa is the applied positive end-expiratory pressure. Crs and Rrs denote the respiratory system’s compliance and inspiratory resistance, respectively.

In the presence of respiratory muscle activity, Eq. 1 becomes,

$${P}_{aw}\left(t\right)= \left[\frac{\varDelta V\left(t\right)}{{C}_{rs}}+ {R}_{rs}{F}_{aw}\left(t\right)+ {PEEP}_{a}\right] + {P}_{mus}\left(t\right)$$
(2)

Substituting from Eq. 1 and rearranging,

$${P}_{mus}\left(t\right)= {P}_{aw}\left(t\right)- {P}_{passive}\left(t\right)$$
(3)

The Pmus(t) function, describing changes in Pmus during insufflation, is calculated using Eq. 3 with sequential Paw(t) measurements and Ppassive(t) values calculated from Eq. 1. According to Eq. 3, Pmus(t) is negative for Paw (t) < Ppassive(t), indicating inspiratory muscle effort, and positive for Paw (t) > Ppassive(t), signifying expiratory muscle effort.

The calculation of Ppassive(t) requires prior knowledge of Crs and Rrs, whose values are also derived from Eq. 1 using data from breaths with no muscle effort (Pmus(t) = 0). Although Eq. 1 by itself is indeterminate, a numerical solution has been developed [8]. This involves repeatedly solving Eq. 1 by applying a broad spectrum of plausible Crs and Rrs values to each set of measurements (ΔV(k), Faw(k) and PEEPa) made during passive insufflation. The outcome is a Crs x Rrs matrix that encompasses all possible solutions of Eq. 1 for the given measurements, within the selected range of Crs and Rrs values. A (Crs-Rrs)k function is next generated by identifying the matrix elements matching the measured Paw(k).

Replicating the above process for all n measurements made during insufflation generates a family of (Crs-Rrs)n functions on the Crs-Rrs plane. Since the model assumes Crs and Rrs to be constant during insufflation, these (Crs-Rrs)n functions intersect at their true values, This methodology has been rigorously tested for stability and validated with clinical data [8].

Although assumed constant during the insufflation, the algorithm also recognizes that Crs and Rrs may change longitudinally due to treatment or clinical factors. This is addressed by treating Crs and Rrs as the mean of fixed-length vectors, operating like quasi-circular buffers. In other words, as monitoring begins, Crs and Rrs values from passive insufflations are added sequentially to respective vectors. Once the vectors accumulate 180 elements, their averages are taken as initial Crs and Rrs for that patient. Crs and Rrs values derived from subsequent breaths meeting Pmus(t) = 0 criteria are used to dynamically update these vectors with a First-In-First-Out (FIFO) method, ensuring their sizes remain constant. The choice of 180 elements, equivalent to 10 to 15 minutes of monitoring time, aims to strike a balance between gathering enough passive breath data for accurate calculation and the time required to produce initial Crs and Rrs values.

1.2 Model validation

It is possible to assess the validity of predicted Pmus(t) by its consistency with anticipated physiological responses. Specifically, in patients ventilated with volume-control (VC) mode, where the tidal volume (VT) is preset, Pmus(t) is expected to associate with fluctuations in Paw(t). Conversely, for pressure-control (PC) mode, that provides a constant Paw(t) during the entire insufflation, Pmus(t) should more closely correlate with alterations in VT. The soundness of the Pmus(t) estimate is intrinsically linked to the robustness of its separate correlations with Paw(t) and VT, with a strong coefficient of determination R2 signifying an accurate computation.

2 Methods

The algorithm was tested using Faw and Paw signals stored in a database of 250 patients treated with invasive ventilation at the Intensive Care Unit of The George Washington University Hospital. These patients had been enrolled in multiple studies approved by the Institutional Review Board (Nos. 101228, 110910, 111235) conducted between 2011 and 2015 in accordance with the 1964 Helsinki Declaration. The patients, or their appointed surrogates, gave informed consent for these studies, and the IRB allowed use of the anonymized data for subsequent research.

Table 1 shows demographic and enrollment data for the patients in the database. There was a preponderance of medical diagnoses (67%), 58% were male, with the largest percentage of patients being of Black ethnicity (54.4%).

Table 1 Demographics and enrollment data for the 250 patient database

All patients were intubated via the nasotracheal or orotracheal route and received ventilatory support using Servo_i or Servo_s ventilators (Getinge, Solna, Sweden) with various modes of ventilation. Treatment decisions were independent of the study. Enrollment occurred within 24 h of intubation, with patients monitored for 3 [2, 5] (median [IQR]) days.

Faw and Paw signals were acquired from the ventilator data port (Computer Interface Emulator CIE, Getinge, Solna, Sweden) at 31.25 Hz and stored as sequential time-windows, termed epochs, spanning 131.1 s and containing 4096 samples of each Paw and Faw signal. Commencing with records starting from 2011, data from each patient were analyzed sequentially from the time of enrollment to the cessation of monitoring, with software developed according to the algorithm of Fig. 1 written in Python 3.11 programming language. The algorithm simulates the real-time patient monitoring process used in clinical settings. Excluded from analysis were epochs on bi-level ventilation and Airway Pressure Release Ventilation (APRV).

Fig. 1
figure 1

Algorithm used to analyze data from 250 patients in chronologic order from 2011 to 2015. Stage 1: Search the database for epochs with respiratory rate variability (RRVI) < 50%, considered to occur when Pmus = 0. Stage 2: Identify all breaths in the selected epochs meeting a strict criteria for absent Pmus and PEEPi. Apply the numerical solution of the equation of motion to calculate breath specific Crs and Rrs and fill respective vectors sequentially to a length of 180 elements. Stage 3: Use the mean of these vectors as estimates for Crs and Rrs to calculate Ppassive from Eq. 1 and Pmus from Eq. 3. Account for longitudinal variations in Crs and Rrs by calculating their values in subsequent epochs with RRVI < 50% and incorporate them in the respective vectors FIFO

Step 1: Data analysis begins by identifying epochs with a respiratory rate variability index [9] (RRVI) < 50%, a threshold observed during the N2 and N3 sleep stages [10]. Given their low RRVI, these epochs are considered to occur during times of minimal respiratory muscle activity and chosen for subsequent analysis.

Step 2: For each selected epoch, calculate Crs and Rrs for every breath that meets the criteria for passive insufflation: (1) Ventilator triggered: (PEEPa – minimal Paw) < 0.3 cmH2O; (2) Full volume breaths: VT ≥ 250 mL with insufflation time (Ti) > 0.8 s; (3) Absence of PEEPi: end exhalation (EE) Faw < 3 L·min− 1 and breath’s initial Paw(t0) - prior breath’s EE Paw < 2 cmH2O [11, 12], (4) No leaks in the circuit: inspired – expired VT < |30 mL|; and (5) Avoidance of lung overdistention: inspired VT < 740 mL [13]. Store calculated Crs and Rrs values sequentially in respective vectors. Once the vectors are filled with 180 elements, use their averages as initial Crs and Rrs for the patient.

Step 3: Determine Pmus(t) for each breath in subsequent epochs. Use the calculated Crs and Rrs to compute Ppassive(k) from Eq. 1 and Pmus(k) from Eq. 3 for all Paw(k), Faw(k), ΔV(k), and PEEPa measurements obtained at sequential times k during the insufflation. To insure calculations take place in the region of constant Crs, defined as the analysis time, Pmus pressure-time product (PmusPTP) is calculated by numerical integration of the Pmus(t) function (trapezoidal method) from the time ΔV(t) ≥ 150 mL through 90% of the insufflation’s duration. In addition to the primary calculations, other derived metrics are: the maximum and minimum Pmus, corresponding to the peak positive and negative values of Pmus (Pmuspeak), the pressure-time product of airway pressure (PawPTP) over the analysis period, the peak value of airway pressure (Pawpeak), and tidal volume (VT), defined as the largest volume change (ΔV(t)) achieved during insufflation.

Initial Crs and Rrs values are dynamically adjusted by the algorithm to reflect changes from disease progression or treatment. Epochs with RRVI < 50% are examined for breaths fulfilling the Pmus = 0 criteria from Step 2. Crs and Rrs determined from these breaths are added to the initial vectors (FIFO), keeping a steady tally of 180 breaths. This method allows Crs and Rrs to adapt to evolving clinical conditions, while minimizing the effects of short-term variations.

2.1 Correlation analysis

Upon analyzing the data from all 250 patients using the Fig. 1 algorithm, epochs were selected for correlation analysis based on specific criteria: (1) epochs ventilated on either PC or VC mode; (2) there was no indication of PEEPi, as determined by the established criteria in Step 2, and assessed as an average across all breaths within the epoch; and (3) the epoch’s data had the capacity for robust linear regression calculation, Paw (maximum - minimum) < 4 cmH2O for VC mode or a VT range < 100 mL for PC mode.

2.2 Statistics

Occasional anomalies in data acquisition giving rise to one or two univariate outliers per epoch were corrected by the z-score method [14] with z = 3. The coefficient of determination R² was calculated using Pearson’s linear regression for correlations of Pmus PTP with Paw PTP, and Pmus PTP with VT. Normality of the R² distributions was evaluated with the Kolmogorov-Smirnov test. Depending on the normality of the data, independent sample differences were assessed using Mann–Whitney test or Student’s t-test, both corrected for multiple testing by Bonferroni’s method. Data are presented as mean (SD), unless noted otherwise. Two-sided p values are reported, with significance set at p < 0.05.

2.3 Hypothesis testing

Method validation relied on establishing a strong correlation (R2 > 0.80) between PmusPTP and PawPTP in VC mode, and between PmusPTP and VT in PC mode. Conversely, the hypothesis predicts a weak or non-existent correlation in the opposite scenarios.

3 Results

3.1 Individual epochs examples

The following examples highlight the performance of the algorithm when applied to patient data under two different modes of ventilation, PC and VC:

Fig. 2
figure 2

Epoch lasting 131.1 s acquired from a patient on VC ventilation. The upper and middle panels show Faw and Paw signals, respectively. The bottom panel depicts calculated PmusPTP as discrete points, each datum corresponding to the breath above

The epoch shown in Fig. 2 was obtained from a 70-year-old woman with acute heart failure. The patient was on constant flow, VC ventilation with fractional inspired O2 (FIO2) of 80%, mean VT of 450 mL, respiratory rate (RR) of 16 bpm, and PEEPa of 10 cmH2O.

Faw and Paw signals (upper and middle panels, respectively) are uniform in timing (RRVI = 30%) and configuration, showing minor fluctuations in Pawpeak. The epoch is typical of a sedated individual, with most breaths triggered by the ventilator. The lower panel shows calculated PmusPTP as discrete points corresponding to the breaths above. PmusPTP values are positive for all insufflations, indicating the occurrence of mild expiratory efforts not readily apparent from airway signal examination.

Figure 3 shows a subsequent epoch from the same patient, now on PC mode with FIO2 = 60%, RR = 12 bpm, Pawpeak = 22 cmH2O, and PEEPa = 5 cmH2O. All breaths are ventilator triggered with low RRVI (24%) and VT values ranging from 620 to 740 mL. Visual examination of the airway signals provides little insight into respiratory muscle activity, but the lower panel shows negative PmusPTP values ranging from − 1.8 to 0.3 cmH2O·s. The source of these inspiratory efforts is not apparent from the data, but could indicate air hunger or the presence of reverse triggering [15].

Fig. 3
figure 3

Epoch lasting 131.1 s acquired from a patient on PC ventilation. The upper and middle panels show Faw and Paw signals, respectively. The bottom panel depicts calculated PmusPTP as discrete points, each datum corresponding to the breath above

Fig. 4
figure 4

Relationships of PmusPTP vs. PawPTP and PmusPTP vs. VT for the examples shown in Figs. 2 and 3. With VC ventilation there is a strong correlation for PmusPTP vs. PawPTP (R2 = 0.85) while being absent for PmusPTP vs. VT (R2 = 0.00). Conversely, PC ventilation is characterized by minimal correlation between PmusPTP and PawPTP (R2 = 0.10) and a robust inverse correlation between PmusPTP and VT (R2 = 0.95).

Figure 4 depicts the relationship between PmusPTP with PawPTP and VT for the data of Figs. 2 and 3. With the patient on VC ventilation, there is a strong proportional relationship between PmusPTP and PawPTP (R² = 0.85) and none with VT (R² = 0.00). Conversely, on PC mode there is negligible correlation between PmusPTP and PawPTP (R² = 0.10) and a strong inverse correlation between PmusPTP and VT (R² = 0.95)

3.2 Overall data analysis

In the analysis of the entire 250 patient dataset, the algorithm failed to determine initial Crs and Rrs in 25 patients, as they lacked sufficient breaths meeting criteria for Pmus = 0. This was due to agitation following enrollment in the study in some patients and short monitoring time in others, either the result of technical difficulties or early ventilator weaning.

Application of the algorithm to the remaining 225 patients identified 551,642 epochs in which the algorithm could determine Pmus(t) for individual breaths. From this cohort, 51,268 epochs were chosen for correlation analysis since they occurred exclusively on VC or PC ventilation modes. Table 2 displays the number of patients who were included based on having at least one epoch in the analyzed ventilation mode. Since most patients received treatment with more than one ventilation modality, it is possible for the same patient to have been included in both groups of Table 2. There were twice as many epochs on PC mode as compared to VC mode. Outliers were < 5% of the epoch’s breaths, ensuring enough breaths remained for robust correlation analyses.

Table 2 Number of Analyzed Epochs and Breaths Across Ventilation Modes

Table 3 shows ventilation parameters stratified by ventilation mode across the analyzed epochs. The greater ventilatory assistance noted with PC mode, in terms of FIO2, Paw, PEEPa, VT and RR, hint at greater respiratory compromise when compared to epochs on VC mode.

Table 3 Measured Ventilation Parameters for the Analyzed Epochs

Table 4 presents the percentage of inspiratory and expiratory efforts per epoch, the average Pmus and PmusPTP per breath, and the sum of PmusPTP values per epoch, stratified by ventilation modality and Pmus directionality (inspiratory or expiratory) within an epoch. Both modes displayed a mix of inspiratory and expiratory efforts, although expiratory efforts were more vigorous, both in magnitude and frequency, in PC mode (p < 0.001).

Table 4 Pmus Related Variables Across Ventilation Modes

Table 5 lists R² values for the correlation of PmusPTP with PawPTP and VT across the analyzed epochs. In VC mode, PmusPTP demonstrates a strong positive correlation with PawPTP (PawPTP = 1.7 PmusPTP + 19.4; R² = 0.91; n = 17,648 epochs), while such relationship is absent for VT (R² = 0.03). Conversely, this pattern reverses in PC mode, resulting in a robust inverse association between PmusPTP and VT (VT = -43.6 PmusPTP + 615; R² = 0.88; 33,620 epochs) and a negligible one with PawPTP (R² = 0.06).

Table 5 R2 for the Correlation of PmusPTP with PawPTP and VT

4 Discussion

A method is proposed to estimate Pmus(t), a function describing respiratory muscle effort during individual insufflations, based on the numerical solution of a single-compartment model of the respiratory system. The method is non-invasive and may be used to continuously monitor patients on ventilatory support automatically by connecting a microprocessor to the data port of a mechanical ventilator.

A significant strength of the study is the extensive dataset used, comprising thousands of epochs collected continuously over several days from 250 patients mechanically ventilated using diverse ventilation modes. Specialized software assessed over two million individual breaths, consequently, the influence of sample size bias, random measurement variations, or the inclusion in the analysis of epochs with significant PEEPi levels is considered minimal.

Quantifying Pmus(t) is inherently difficult due to the absence of a direct method of measurement method. The present “gold standard” [16] involves the difference between esophageal pressure, measured with a fluid-filled catheter, and chest wall recoil pressure under passive conditions. However, this method is complex, as it relies on uncertain factors like chest wall elastance and a specific chest wall recoil pressure point [17]. Additionally, the variability in chest wall mechanics and the challenge in accurately distinguishing respiratory phases add to the difficulties in obtaining precise measurements of Pmus(t).

Given the challenges in directly measuring Pmus(t), it is not unreasonable to assess the validity of its estimate indirectly by evaluating its consistency with expected physiological responses. The high R² values obtained from the correlations PmusPTP vs. PawPTP in VC mode, and PmusPTP vs. VT in PC mode, across more than 50,000 epochs, indicate a strong predictability between these variables and provides robust evidence supporting the accuracy of the predicted Pmus(t).

The results of the study highlight the bidirectionality of Pmus during insufflation. Expiratory Pmus values were predicted in more than two-thirds of insufflations in either VC or PC modes. This finding, previously noted by others [18], may be significant considering the potential for lung injury due to elevated alveolar pressure during expiratory efforts. On the other hand, inspiratory efforts are often indicative of air hunger, a distressing condition with long-term psychological sequelae.

4.1 Confounders and limitations

A potential confounder is the possibility that epochs with significant PEEPi may have been unintentionally incorporated into the analysis. Failing to address intrinsic PEEPi can lead to an overestimation of expiratory Pmus and a corresponding underestimation of inspiratory Pmus. Although the automated data analysis precluded visual identification of epochs with substantial PEEPi, efforts were made to prevent this occurrence by excluding epochs meeting established criteria for this condition. Further, the database contained a limited subset of patients with the diagnosis of asthma or chronic obstructive pulmonary disease (COPD) (8.3%) that were predisposed to the development of PEEPi.

Another possible confounder is the presence of outliers related to anomalies in data acquisition or to double-triggered breaths. Outliers were systematically excluded by applying the z-score method to all PawPTP, VT and PmusPTP datasets This approach resulted in the omission of one or two outliers per epoch, while ensuring > 30 breaths remained for regression analysis (Table 2).

Since Pmus(t) was derived directly from Paw(t) (Eq. 3) and indirectly from VT (Eq. 1), the possibility must be considered that mathematic coupling of shared variables [19] might have resulted in the robust correlations noted between Pmus PTP and Paw PTP or with VT. However, mathematic coupling is unlikely, given the complete lack of association between these variables when tested in the opposite modes.

Clinical application of the method is limited by the need for specialized data acquisition equipment. This concern is mitigated by the incorporation in modern ventilators of signal sampling algorithms whose output is readily accessed through a data port. Nonetheless, the sheer number of calculations needed to produce even a single breath’s Pmus(t) function, makes the use of a digital computer mandatory in the clinical application of the method.

Until additional studies are conducted, the performance of the method using airway signals generated by specialized ventilatory support techniques, such as bi-level ventilation and Airway Pressure Release Ventilation (APRV), remains uncertain.

5 Conclusions

The proposed method provides a non-invasive, real-time estimate of respiratory muscle activity during insufflation, one capable of distinguishing between expiratory and inspiratory efforts. This could help clinicians identify harmful respiratory patterns associated with expiratory efforts [20] that may result in injurious lung strain [12], or detect severe inspiratory exertions that indicate distressing dyspnea [3]. Efforts directed at validation, as well as establishing the range of applications for this method, warrant further investigation in future studies.